From 6768b10638d8b2b2704abbba7f1d27aa01bcbc99 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 10 Apr 2018 12:05:10 -0400 Subject: [PATCH] use ordained list of statuses for showing cancel/delete --- awx/ui/client/features/output/details.partial.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/features/output/details.partial.html b/awx/ui/client/features/output/details.partial.html index 7e923b5758..b3f04428e7 100644 --- a/awx/ui/client/features/output/details.partial.html +++ b/awx/ui/client/features/output/details.partial.html @@ -12,7 +12,10 @@ class="List-actionButton List-actionButton--delete" data-placement="top" ng-click="vm.cancelJob()" - ng-show="vm.status.value === 'Running'|| vm.status.value ==='Pending'" + ng-show="vm.status.value === 'New' || + vm.status.value === 'Pending' || + vm.status.value === 'Waiting' || + vm.status.value === 'Running'" aw-tool-tip="{{'Cancel' | translate }}" data-original-title="" title=""> @@ -24,9 +27,11 @@ class="List-actionButton List-actionButton--delete" data-placement="top" ng-click="vm.deleteJob()" - ng-hide="!vm.canDelete - || vm.status.value === 'Running' - || vm.status.value === 'Pending'" + ng-show="vm.canDelete && ( + vm.status.value === 'Successful' || + vm.status.value === 'Failed' || + vm.status.value === 'Error' || + vm.status.value === 'Canceled')" aw-tool-tip="{{ 'Delete' | translate }}" data-original-title="" title="">