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

25 lines
562 B
JavaScript
Raw Normal View History

import AbstractJobPage from './abstract';
import { inject as service } from '@ember/service';
export default AbstractJobPage.extend({
store: service(),
2018-04-19 17:17:47 +00:00
errorMessage: null,
actions: {
forceLaunch() {
this.get('job')
.forcePeriodic()
2018-04-19 17:17:47 +00:00
.catch(() => {
this.set('errorMessage', {
title: 'Could Not Force Launch',
description: 'Your ACL token does not grant permission to submit jobs.',
});
});
},
clearErrorMessage() {
2018-04-19 17:17:47 +00:00
this.set('errorMessage', null);
},
},
});