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

25 lines
555 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() {
2019-03-26 07:46:44 +00:00
this.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);
},
},
});