2017-12-15 21:39:18 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { alias } from '@ember/object/computed';
|
|
|
|
import Controller, { inject as controller } from '@ember/controller';
|
2017-10-23 23:59:30 +00:00
|
|
|
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2018-01-25 22:18:53 +00:00
|
|
|
export default Controller.extend(WithNamespaceResetting, {
|
2017-12-15 21:39:18 +00:00
|
|
|
system: service(),
|
2018-03-23 01:59:53 +00:00
|
|
|
|
2017-12-15 21:39:18 +00:00
|
|
|
jobController: controller('jobs.job'),
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
queryParams: {
|
|
|
|
currentPage: 'page',
|
|
|
|
sortProperty: 'sort',
|
|
|
|
sortDescending: 'desc',
|
|
|
|
},
|
|
|
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
|
|
|
sortProperty: 'name',
|
|
|
|
sortDescending: false,
|
|
|
|
|
2017-12-15 21:39:18 +00:00
|
|
|
breadcrumbs: alias('jobController.breadcrumbs'),
|
|
|
|
job: alias('model'),
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
actions: {
|
|
|
|
gotoTaskGroup(taskGroup) {
|
|
|
|
this.transitionToRoute('jobs.job.task-group', taskGroup.get('job'), taskGroup);
|
|
|
|
},
|
2018-01-25 22:18:53 +00:00
|
|
|
|
|
|
|
gotoJob(job) {
|
|
|
|
this.transitionToRoute('jobs.job', job, {
|
|
|
|
queryParams: { jobNamespace: job.get('namespace.name') },
|
|
|
|
});
|
|
|
|
},
|
2017-09-19 14:47:10 +00:00
|
|
|
},
|
|
|
|
});
|