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