open-nomad/ui/app/controllers/jobs/job/index.js

31 lines
725 B
JavaScript
Raw Normal View History

import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
2017-09-19 14:47:10 +00:00
export default Controller.extend(WithNamespaceResetting, {
system: service(),
2017-09-19 14:47:10 +00:00
queryParams: {
currentPage: 'page',
sortProperty: 'sort',
sortDescending: 'desc',
},
currentPage: 1,
sortProperty: 'name',
sortDescending: false,
actions: {
gotoTaskGroup(taskGroup) {
this.transitionToRoute('jobs.job.task-group', taskGroup.get('job'), taskGroup);
},
gotoJob(job) {
this.transitionToRoute('jobs.job', job, {
queryParams: { jobNamespace: job.get('namespace.name') },
});
},
2017-09-19 14:47:10 +00:00
},
});