github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/controllers/clients/client.js (about) 1 import Ember from 'ember'; 2 import Sortable from 'nomad-ui/mixins/sortable'; 3 import Searchable from 'nomad-ui/mixins/searchable'; 4 5 const { Controller, computed } = Ember; 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: computed.alias('model.allocations'), 24 listToSearch: computed.alias('listSorted'), 25 sortedAllocations: computed.alias('listSearched'), 26 27 actions: { 28 gotoAllocation(allocation) { 29 this.transitionToRoute('allocations.allocation', allocation); 30 }, 31 }, 32 });