open-nomad/ui/app/components/job-page/abstract.js

33 lines
700 B
JavaScript
Raw Normal View History

import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import classic from 'ember-classic-decorator';
@classic
export default class Abstract extends Component {
@service system;
job = null;
// Provide a value that is bound to a query param
sortProperty = null;
sortDescending = null;
// Provide actions that require routing
gotoTaskGroup() {}
gotoJob() {}
2018-04-19 17:17:47 +00:00
// Set to a { title, description } to surface an error
errorMessage = null;
2018-04-19 17:17:47 +00:00
@action
clearErrorMessage() {
this.set('errorMessage', null);
}
@action
handleError(errorObject) {
this.set('errorMessage', errorObject);
}
}