2017-12-15 21:39:18 +00:00
|
|
|
import Controller from '@ember/controller';
|
2018-03-13 21:58:22 +00:00
|
|
|
import { computed } from '@ember/object';
|
|
|
|
import { qpBuilder } from 'nomad-ui/utils/classes/query-params';
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2018-03-13 21:58:22 +00:00
|
|
|
export default Controller.extend({
|
|
|
|
breadcrumbs: computed('model.job', function() {
|
|
|
|
return [
|
|
|
|
{ label: 'Jobs', args: ['jobs'] },
|
|
|
|
{
|
|
|
|
label: this.get('model.job.name'),
|
|
|
|
args: [
|
|
|
|
'jobs.job',
|
|
|
|
this.get('model.job'),
|
|
|
|
qpBuilder({
|
|
|
|
jobNamespace: this.get('model.namespace.name') || 'default',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: this.get('model.taskGroupName'),
|
|
|
|
args: [
|
|
|
|
'jobs.job.task-group',
|
|
|
|
this.get('model.job'),
|
|
|
|
this.get('model.taskGroupName'),
|
|
|
|
qpBuilder({
|
|
|
|
jobNamespace: this.get('model.namespace.name') || 'default',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: this.get('model.shortId'),
|
|
|
|
args: ['allocations.allocation', this.get('model')],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}),
|
|
|
|
});
|