Handle undefined schedule value in job detail component

This commit is contained in:
Marliana Lara 2019-10-21 16:13:52 -04:00
parent 5bb7e69a4d
commit 9c9bf0ed84
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
2 changed files with 4 additions and 2 deletions

View File

@ -282,10 +282,12 @@ function getLaunchedByDetails () {
tooltip = strings.get('tooltips.SCHEDULE');
link = `/#/templates/job_template/${jobTemplate.id}/schedules/${schedule.id}`;
value = $filter('sanitize')(schedule.name);
} else {
} else if (schedule) {
tooltip = null;
link = null;
value = $filter('sanitize')(schedule.name);
} else {
return null;
}
return { label, link, tooltip, value };

View File

@ -5,7 +5,7 @@
<!-- LEFT PANE HEADER ACTIONS -->
<div class="JobResults-panelHeaderButtonActions">
<!-- RELAUNCH ACTION -->
<at-relaunch job="vm.job"></at-relaunch>
<at-relaunch ng-if="vm.job" job="vm.job"></at-relaunch>
<!-- CANCEL ACTION -->
<button