open-nomad/ui/app/components/job-page/periodic.js
2019-04-10 14:54:36 -07:00

25 lines
555 B
JavaScript

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