github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/app/controllers/allocations/allocation/index.js (about) 1 import { alias } from '@ember/object/computed'; 2 import Controller from '@ember/controller'; 3 import Sortable from 'nomad-ui/mixins/sortable'; 4 import { lazyClick } from 'nomad-ui/helpers/lazy-click'; 5 6 export default Controller.extend(Sortable, { 7 queryParams: { 8 sortProperty: 'sort', 9 sortDescending: 'desc', 10 }, 11 12 sortProperty: 'name', 13 sortDescending: false, 14 15 listToSort: alias('model.states'), 16 sortedStates: alias('listSorted'), 17 18 actions: { 19 gotoTask(allocation, task) { 20 this.transitionToRoute('allocations.allocation.task', task); 21 }, 22 23 taskClick(allocation, task, event) { 24 lazyClick([() => this.send('gotoTask', allocation, task), event]); 25 }, 26 }, 27 });