open-nomad/ui/app/controllers/servers.js
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

26 lines
551 B
JavaScript

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