2017-12-15 21:39:18 +00:00
|
|
|
import { alias } from '@ember/object/computed';
|
|
|
|
import Controller from '@ember/controller';
|
2017-09-19 14:47:10 +00:00
|
|
|
import Sortable from 'nomad-ui/mixins/sortable';
|
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
export default class ServersController extends Controller.extend(Sortable) {
|
|
|
|
@alias('model.nodes') nodes;
|
|
|
|
@alias('model.agents') agents;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2020-06-11 13:38:33 +00:00
|
|
|
queryParams = [
|
|
|
|
{
|
|
|
|
currentPage: 'page',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
sortProperty: 'sort',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
sortDescending: 'desc',
|
|
|
|
},
|
|
|
|
];
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
currentPage = 1;
|
|
|
|
pageSize = 8;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
sortProperty = 'isLeader';
|
|
|
|
sortDescending = true;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
isForbidden = false;
|
2017-10-24 23:07:43 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@alias('agents') listToSort;
|
|
|
|
@alias('listSorted') sortedAgents;
|
|
|
|
}
|