github.com/thomasobenaus/nomad@v0.11.1/ui/app/utils/generate-exec-url.js (about) 1 export default function generateExecUrl(router, { job, taskGroup, task, allocation }) { 2 const queryParams = router.currentRoute.queryParams; 3 4 if (task) { 5 return router.urlFor('exec.task-group.task', job, taskGroup, task, { 6 queryParams: { 7 allocation, 8 ...queryParams, 9 }, 10 }); 11 } else if (taskGroup) { 12 return router.urlFor('exec.task-group', job, taskGroup, { queryParams }); 13 } else if (allocation) { 14 return router.urlFor('exec', job, { queryParams: { allocation, ...queryParams } }); 15 } else { 16 return router.urlFor('exec', job, { queryParams }); 17 } 18 }