Skip to content

Commit

Permalink
Show consistent status messages for deleted instances and bindings
Browse files Browse the repository at this point in the history
Use consistent text and icons for service instances and bindings that
are marked for deletion, both on the overview and service instance page.
  • Loading branch information
spadgett committed Sep 19, 2017
1 parent e1ba88d commit 7c74cb5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
6 changes: 6 additions & 0 deletions app/views/browse/service-instance.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ <h1 class="contains-actions">
<div class="container-fluid">
<div class="row" ng-if="serviceInstance">
<div class="col-md-12">
<div ng-if="serviceInstance.metadata.deletionTimestamp" class="alert word-break alert-warning">
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
<span class="sr-only">warning</span>
<span class="strong">The service was marked for deletion</span>
<span class="strong" am-time-ago="serviceInstance.metadata.deletionTimestamp"></span>.
</div>
<uib-tabset>
<uib-tab active="selectedTab.details">
<uib-tab-heading>Details</uib-tab-heading>
Expand Down
6 changes: 5 additions & 1 deletion app/views/directives/_service-binding.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ <h3 ng-if="$ctrl.serviceClass">
<small>created <span am-time-ago="$ctrl.binding.metadata.creationTimestamp"></span></small>
</h3>
</div>
<div class="col-sm-7 col-md-6" ng-if="!($ctrl.binding | isBindingReady)">
<div class="col-sm-7 col-md-6" ng-if="$ctrl.binding.metadata.deletionTimestamp">
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
Marked for Deletion
</div>
<div class="col-sm-7 col-md-6" ng-if="!$ctrl.binding.metadata.deletionTimestamp && !($ctrl.binding | isBindingReady)">
<status-icon status="'Pending'"></status-icon>Pending
</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions app/views/overview/_service-instance-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h3>
</span>
<span ng-switch-when="deleted">
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
<span>Marked for Deletion</span>
Marked for Deletion
</span>
<span ng-switch-when="pending">
<span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span>
Expand Down Expand Up @@ -102,7 +102,7 @@ <h3>
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
<span class="sr-only">warning</span>
<span class="strong">The service was marked for deletion</span>
<span class="strong" am-time-ago="row.apiObject.metadata.deletionTimestamp"></span>
<span class="strong" am-time-ago="row.apiObject.metadata.deletionTimestamp"></span>.
</div>
</div>
</div>
Expand Down Expand Up @@ -162,7 +162,8 @@ <h3>
</div>
<div class="col-sm-7 col-md-6 overview-bindings">
<span ng-if="binding.metadata.deletionTimestamp">
<status-icon status="'Pending'"></status-icon> Deleting
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
Marked for Deletion
</span>
<span ng-if="!(binding | isBindingReady) && !binding.metadata.deletionTimestamp">
<status-icon status="'Pending'"></status-icon> Pending
Expand Down
19 changes: 15 additions & 4 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3712,6 +3712,12 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div class=\"container-fluid\">\n" +
"<div class=\"row\" ng-if=\"serviceInstance\">\n" +
"<div class=\"col-md-12\">\n" +
"<div ng-if=\"serviceInstance.metadata.deletionTimestamp\" class=\"alert word-break alert-warning\">\n" +
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
"<span class=\"sr-only\">warning</span>\n" +
"<span class=\"strong\">The service was marked for deletion</span>\n" +
"<span class=\"strong\" am-time-ago=\"serviceInstance.metadata.deletionTimestamp\"></span>.\n" +
"</div>\n" +
"<uib-tabset>\n" +
"<uib-tab active=\"selectedTab.details\">\n" +
"<uib-tab-heading>Details</uib-tab-heading>\n" +
Expand Down Expand Up @@ -5610,7 +5616,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<small>created <span am-time-ago=\"$ctrl.binding.metadata.creationTimestamp\"></span></small>\n" +
"</h3>\n" +
"</div>\n" +
"<div class=\"col-sm-7 col-md-6\" ng-if=\"!($ctrl.binding | isBindingReady)\">\n" +
"<div class=\"col-sm-7 col-md-6\" ng-if=\"$ctrl.binding.metadata.deletionTimestamp\">\n" +
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
"Marked for Deletion\n" +
"</div>\n" +
"<div class=\"col-sm-7 col-md-6\" ng-if=\"!$ctrl.binding.metadata.deletionTimestamp && !($ctrl.binding | isBindingReady)\">\n" +
"<status-icon status=\"'Pending'\"></status-icon>Pending\n" +
"</div>\n" +
"</div>\n" +
Expand Down Expand Up @@ -12283,7 +12293,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</span>\n" +
"<span ng-switch-when=\"deleted\">\n" +
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
"<span>Marked for Deletion</span>\n" +
"Marked for Deletion\n" +
"</span>\n" +
"<span ng-switch-when=\"pending\">\n" +
"<span class=\"spinner spinner-xs spinner-inline\" aria-hidden=\"true\"></span>\n" +
Expand Down Expand Up @@ -12352,7 +12362,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
"<span class=\"sr-only\">warning</span>\n" +
"<span class=\"strong\">The service was marked for deletion</span>\n" +
"<span class=\"strong\" am-time-ago=\"row.apiObject.metadata.deletionTimestamp\"></span>\n" +
"<span class=\"strong\" am-time-ago=\"row.apiObject.metadata.deletionTimestamp\"></span>.\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
Expand Down Expand Up @@ -12411,7 +12421,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<div class=\"col-sm-7 col-md-6 overview-bindings\">\n" +
"<span ng-if=\"binding.metadata.deletionTimestamp\">\n" +
"<status-icon status=\"'Pending'\"></status-icon> Deleting\n" +
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
"Marked for Deletion\n" +
"</span>\n" +
"<span ng-if=\"!(binding | isBindingReady) && !binding.metadata.deletionTimestamp\">\n" +
"<status-icon status=\"'Pending'\"></status-icon> Pending\n" +
Expand Down

0 comments on commit 7c74cb5

Please sign in to comment.