Merge pull request #2809 from mabashian/launched-by-link

Fix launched by link on job details
This commit is contained in:
kensible
2016-07-07 11:14:03 -04:00
committed by GitHub

View File

@@ -1149,14 +1149,9 @@ export default
// where 5 is the ID we are trying to capture // where 5 is the ID we are trying to capture
var regex = /\/api\/v1\/schedules\/(\d+)\//; var regex = /\/api\/v1\/schedules\/(\d+)\//;
var id = scope.job.related.schedule.match(regex)[1]; 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 if(scope.job.job_template && id) {
// modal via the EditSchedule service $state.go('jobTemplateSchedules.edit', {id: scope.job.job_template, schedule_id: id});
EditSchedule({
scope: scope,
id: parseInt(id),
callback: 'SchedulesRefresh'
});
} }
}; };