2017-12-15 21:39:18 +00:00
|
|
|
import Route from '@ember/routing/route';
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
export default Route.extend({
|
|
|
|
model() {
|
|
|
|
const job = this.modelFor('jobs.job');
|
|
|
|
return job.fetchRawDefinition().then(definition => ({
|
|
|
|
job,
|
|
|
|
definition,
|
|
|
|
}));
|
|
|
|
},
|
2018-08-21 23:46:24 +00:00
|
|
|
|
|
|
|
resetController(controller, isExiting) {
|
|
|
|
if (isExiting) {
|
|
|
|
const job = controller.get('job');
|
|
|
|
job.rollbackAttributes();
|
|
|
|
job.resetId();
|
|
|
|
controller.set('isEditing', false);
|
|
|
|
}
|
|
|
|
},
|
2017-09-19 14:47:10 +00:00
|
|
|
});
|