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

22 lines
565 B
JavaScript
Raw Normal View History

import Controller from '@ember/controller';
import { computed } from '@ember/object';
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'),
args: [
'jobs.job',
this.get('model.plainId'),
qpBuilder({
jobNamespace: this.get('model.namespace.name') || 'default',
}),
],
2017-10-23 17:27:22 +00:00
},
2017-09-19 14:47:10 +00:00
];
}),
});