From 021988f69bd04431cfb4dadc7efc32147f1c649c Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Wed, 6 Jul 2016 10:19:21 -0400 Subject: [PATCH] Send the user to the correct schedule edit when they click the launched by link from job details --- awx/ui/client/src/job-detail/job-detail.controller.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/awx/ui/client/src/job-detail/job-detail.controller.js b/awx/ui/client/src/job-detail/job-detail.controller.js index adcd3e76ff..b0262ddb0b 100644 --- a/awx/ui/client/src/job-detail/job-detail.controller.js +++ b/awx/ui/client/src/job-detail/job-detail.controller.js @@ -1139,14 +1139,9 @@ export default // where 5 is the ID we are trying to capture var regex = /\/api\/v1\/schedules\/(\d+)\//; var id = scope.job.related.schedule.match(regex)[1]; - if (id) { - // If we get an ID from the regular expression go ahead and open up the - // modal via the EditSchedule service - EditSchedule({ - scope: scope, - id: parseInt(id), - callback: 'SchedulesRefresh' - }); + + if(scope.job.job_template && id) { + $state.go('jobTemplateSchedules.edit', {id: scope.job.job_template, schedule_id: id}); } };