27 lines
597 B
JavaScript
27 lines
597 B
JavaScript
import { action } from '@ember/object';
|
|
import Component from '@glimmer/component';
|
|
import { tracked } from '@glimmer/tracking';
|
|
import messageForError from 'nomad-ui/utils/message-from-adapter-error';
|
|
|
|
export default class JobPage extends Component {
|
|
@tracked errorMessage = null;
|
|
|
|
@action
|
|
clearErrorMessage() {
|
|
this.errorMessage = null;
|
|
}
|
|
|
|
@action
|
|
handleError(errorObject) {
|
|
this.errorMessage = errorObject;
|
|
}
|
|
|
|
@action
|
|
setError(err) {
|
|
this.errorMessage = {
|
|
title: 'Could Not Force Launch',
|
|
description: messageForError(err, 'submit jobs'),
|
|
};
|
|
}
|
|
}
|