open-nomad/ui/app/controllers/servers.js
2018-01-17 09:02:04 -08:00

26 lines
536 B
JavaScript

import { alias } from '@ember/object/computed';
import Controller from '@ember/controller';
import Sortable from 'nomad-ui/mixins/sortable';
export default Controller.extend(Sortable, {
nodes: alias('model.nodes'),
agents: alias('model.agents'),
queryParams: {
currentPage: 'page',
sortProperty: 'sort',
sortDescending: 'desc',
},
currentPage: 1,
pageSize: 8,
sortProperty: 'isLeader',
sortDescending: true,
isForbidden: false,
listToSort: alias('agents'),
sortedAgents: alias('listSorted'),
});