github.com/emate/nomad@v0.8.2-wo-binpacking/ui/app/controllers/clients/client.js (about) 1 import { alias } from '@ember/object/computed'; 2 import Controller from '@ember/controller'; 3 import { computed } from '@ember/object'; 4 import Sortable from 'nomad-ui/mixins/sortable'; 5 import Searchable from 'nomad-ui/mixins/searchable'; 6 7 export default Controller.extend(Sortable, Searchable, { 8 queryParams: { 9 currentPage: 'page', 10 searchTerm: 'search', 11 sortProperty: 'sort', 12 sortDescending: 'desc', 13 }, 14 15 currentPage: 1, 16 pageSize: 8, 17 18 sortProperty: 'modifyIndex', 19 sortDescending: true, 20 21 searchProps: computed(() => ['shortId', 'name']), 22 23 listToSort: alias('model.allocations'), 24 listToSearch: alias('listSorted'), 25 sortedAllocations: alias('listSearched'), 26 27 actions: { 28 gotoAllocation(allocation) { 29 this.transitionToRoute('allocations.allocation', allocation); 30 }, 31 }, 32 });