Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show consistent status messages for deleted instances and bindings #2112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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