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

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

27 lines
597 B
JavaScript
Raw Normal View History

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'),
};
}
}