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