github.com/anuvu/nomad@v0.8.7-atom1/ui/app/controllers/allocations/allocation/index.js (about) 1 import { alias } from '@ember/object/computed'; 2 import Controller, { inject as 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 allocationController: controller('allocations.allocation'), 8 9 queryParams: { 10 sortProperty: 'sort', 11 sortDescending: 'desc', 12 }, 13 14 sortProperty: 'name', 15 sortDescending: false, 16 17 breadcrumbs: alias('allocationController.breadcrumbs'), 18 19 listToSort: alias('model.states'), 20 sortedStates: alias('listSorted'), 21 22 actions: { 23 gotoTask(allocation, task) { 24 this.transitionToRoute('allocations.allocation.task', task); 25 }, 26 27 taskClick(allocation, task, event) { 28 lazyClick([() => this.send('gotoTask', allocation, task), event]); 29 }, 30 }, 31 });