2018-08-14 20:06:26 +00:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
|
|
|
|
export default Route.extend({
|
|
|
|
store: service(),
|
2018-08-15 00:29:51 +00:00
|
|
|
system: service(),
|
2018-08-14 20:06:26 +00:00
|
|
|
|
|
|
|
breadcrumbs: [
|
|
|
|
{
|
|
|
|
label: 'Run',
|
|
|
|
args: ['jobs.run'],
|
|
|
|
},
|
|
|
|
],
|
2018-08-15 00:29:51 +00:00
|
|
|
|
|
|
|
model() {
|
|
|
|
return this.get('store').createRecord('job', {
|
|
|
|
namespace: this.get('system.activeNamespace'),
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
resetController(controller, isExiting) {
|
|
|
|
if (isExiting) {
|
|
|
|
controller.get('model').deleteRecord();
|
|
|
|
}
|
|
|
|
},
|
2018-08-14 20:06:26 +00:00
|
|
|
});
|