2018-01-25 22:18:53 +00:00
|
|
|
import AbstractJobPage from './abstract';
|
2018-01-26 22:32:11 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
2018-01-25 22:18:53 +00:00
|
|
|
|
2018-01-26 22:32:11 +00:00
|
|
|
export default AbstractJobPage.extend({
|
|
|
|
store: service(),
|
2018-03-21 00:44:16 +00:00
|
|
|
|
2018-04-19 17:17:47 +00:00
|
|
|
errorMessage: null,
|
2018-03-21 00:44:16 +00:00
|
|
|
|
2018-01-26 22:32:11 +00:00
|
|
|
actions: {
|
|
|
|
forceLaunch() {
|
2019-03-26 07:46:44 +00:00
|
|
|
this.job
|
2018-01-26 22:32:11 +00:00
|
|
|
.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.',
|
|
|
|
});
|
2018-01-26 22:32:11 +00:00
|
|
|
});
|
|
|
|
},
|
2018-03-21 00:44:16 +00:00
|
|
|
clearErrorMessage() {
|
2018-04-19 17:17:47 +00:00
|
|
|
this.set('errorMessage', null);
|
2018-03-21 00:44:16 +00:00
|
|
|
},
|
2018-01-26 22:32:11 +00:00
|
|
|
},
|
|
|
|
});
|