2021-12-28 15:31:49 +00:00
|
|
|
/* eslint-disable ember/no-controller-access-in-routes */
|
2020-03-24 23:22:16 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
export default class TaskRoute extends Route {
|
|
|
|
@service store;
|
2020-03-24 23:22:16 +00:00
|
|
|
|
|
|
|
model({ task_name }) {
|
|
|
|
const allocationQueryParam = this.paramsFor('exec').allocation;
|
2020-04-06 18:52:42 +00:00
|
|
|
const taskGroupName = this.paramsFor('exec.task-group').task_group_name;
|
2020-03-24 23:22:16 +00:00
|
|
|
|
2020-04-06 18:52:42 +00:00
|
|
|
return {
|
|
|
|
allocationShortId: allocationQueryParam,
|
|
|
|
taskName: task_name,
|
|
|
|
taskGroupName,
|
|
|
|
};
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
2020-03-24 23:22:16 +00:00
|
|
|
|
2020-04-06 18:52:42 +00:00
|
|
|
setupController(controller, { allocationShortId, taskGroupName, taskName }) {
|
|
|
|
this.controllerFor('exec').send('setTaskProperties', {
|
|
|
|
allocationShortId,
|
|
|
|
taskName,
|
|
|
|
taskGroupName,
|
|
|
|
});
|
2020-03-24 23:22:16 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
super.setupController(...arguments);
|
|
|
|
}
|
|
|
|
}
|