open-nomad/ui/app/controllers/allocations/allocation.js

37 lines
989 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.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')],
},
];
}),
});