github.com/hernad/nomad@v1.6.112/ui/app/routes/exec/task-group/task.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 /* eslint-disable ember/no-controller-access-in-routes */ 7 import { inject as service } from '@ember/service'; 8 import Route from '@ember/routing/route'; 9 10 export default class TaskRoute extends Route { 11 @service store; 12 13 model({ task_name }) { 14 const allocationQueryParam = this.paramsFor('exec').allocation; 15 const taskGroupName = this.paramsFor('exec.task-group').task_group_name; 16 17 return { 18 allocationShortId: allocationQueryParam, 19 taskName: task_name, 20 taskGroupName, 21 }; 22 } 23 24 setupController(controller, { allocationShortId, taskGroupName, taskName }) { 25 this.controllerFor('exec').send('setTaskProperties', { 26 allocationShortId, 27 taskName, 28 taskGroupName, 29 }); 30 31 super.setupController(...arguments); 32 } 33 }