mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
Check for inventory id before trying to build a link to it in job results
This commit is contained in:
@@ -65,11 +65,16 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(key === 'inventory') {
|
else if(key === 'inventory') {
|
||||||
if($scope.job.summary_fields.inventory && $scope.job.summary_fields.inventory.kind && $scope.job.summary_fields.inventory.kind === 'smart') {
|
if($scope.job.summary_fields.inventory && $scope.job.summary_fields.inventory.id) {
|
||||||
return '/#/inventories/smart/' + $scope.job.summary_fields.inventory.id;
|
if($scope.job.summary_fields.inventory.kind && $scope.job.summary_fields.inventory.kind === 'smart') {
|
||||||
|
return '/#/inventories/smart/' + $scope.job.summary_fields.inventory.id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return '/#/inventories/inventory/' + $scope.job.summary_fields.inventory.id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return '/#/inventories/inventory/' + $scope.job.summary_fields.inventory.id;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user