mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
31 lines
567 B
JavaScript
31 lines
567 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { assert } from '@ember/debug';
|
|
import { action } from '@ember/object';
|
|
import BreadcrumbsTemplate from './default';
|
|
|
|
export default class BreadcrumbsJob extends BreadcrumbsTemplate {
|
|
get job() {
|
|
return this.args.crumb.job;
|
|
}
|
|
|
|
get hasParent() {
|
|
return !!this.job.belongsTo('parent').id();
|
|
}
|
|
|
|
@action
|
|
onError(err) {
|
|
assert(`Error: ${err.message}`);
|
|
}
|
|
|
|
@action
|
|
fetchParent() {
|
|
if (this.hasParent) {
|
|
return this.job.get('parent');
|
|
}
|
|
}
|
|
}
|