open-nomad/ui/app/components/breadcrumbs/job.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
458 B
JavaScript
Raw Normal View History

import { assert } from '@ember/debug';
import { action } from '@ember/object';
import Component from '@glimmer/component';
export default class BreadcrumbsJob extends Component {
get job() {
return this.args.crumb.job;
}
@action
onError(err) {
assert(`Error: ${err.message}`);
}
@action
fetchParent() {
const hasParent = !!this.job.belongsTo('parent').id();
if (hasParent) {
return this.job.get('parent');
}
}
}