open-nomad/ui/app/controllers/servers.js

26 lines
572 B
JavaScript
Raw Normal View History

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';
export default class ServersController extends Controller.extend(Sortable) {
@alias('model.nodes') nodes;
@alias('model.agents') agents;
2017-09-19 14:47:10 +00:00
queryParams = {
2017-09-19 14:47:10 +00:00
currentPage: 'page',
sortProperty: 'sort',
sortDescending: 'desc',
};
2017-09-19 14:47:10 +00:00
currentPage = 1;
pageSize = 8;
2017-09-19 14:47:10 +00:00
sortProperty = 'isLeader';
sortDescending = true;
2017-09-19 14:47:10 +00:00
isForbidden = false;
@alias('agents') listToSort;
@alias('listSorted') sortedAgents;
}