Skip to content

Commit

Permalink
Making display of errors for service rows consistent with others
Browse files Browse the repository at this point in the history
Fixes #2108
  • Loading branch information
rhamilto committed Sep 22, 2017
1 parent 6bac146 commit a2cb3dc
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 58 deletions.
89 changes: 45 additions & 44 deletions app/views/overview/_service-instance-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,55 @@ <h3>
<a ng-href="{{row.apiObject | navigateResourceURL}}" ng-bind-html="row.displayName | highlightKeywords : row.state.filterKeywords"></a>
<div ng-bind-html="row.apiObject.metadata.name | highlightKeywords : row.state.filterKeywords" class="list-row-longname"></div>
</h3>
<div class="status-icons">
<notification-icon ng-if="!row.expanded" alerts="row.notifications"></notification-icon>
<div class="status-icons" ng-if="!row.expanded">
<notification-icon alerts="row.notifications"></notification-icon>
<div ng-switch="row.instanceStatus">
<span ng-switch-when="failed"
dynamic-content="{{row.apiObject | serviceInstanceFailedMessage}}"
data-toggle="tooltip"
data-trigger="hover"
class="notification-icon-count">
<span class="pficon pficon-error-circle-o" aria-hidden="true"></span>
<span>Error</span>
</span>
<span ng-switch-when="deleted" class="notification-icon-count">
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
Marked for Deletion
</span>
<span ng-switch-when="pending" class="notification-icon-count">
<span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span>
<span>Pending</span>
</span>
</div>
</div>
</div>
<div class="list-pf-details" ng-if="!row.expanded" ng-switch="row.instanceStatus">

<span ng-switch-when="failed"
dynamic-content="{{row.apiObject | serviceInstanceFailedMessage}}"
data-toggle="tooltip"
data-trigger="hover">
<span class="pficon pficon-error-circle-o" aria-hidden="true"></span>
<span>Error</span>
</span>
<span ng-switch-when="deleted">
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
Marked for Deletion
<div class="list-pf-details" ng-if="!row.expanded">
<span ng-if="!row.bindings.length
&& row.isBindable
&& ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')"
class="hidden-xs hidden-sm">
<a href="" ng-click="row.showOverlayPanel('bindService', {target: row.apiObject})">
<span class="pficon pficon-add-circle-o" aria-hidden="true"></span>
Create Binding
</a>
</span>
<span ng-switch-when="pending">
<span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span>
<span>Pending</span>
</span>
<div ng-switch-default>
<div class="hidden-xs hidden-sm">
<span ng-if="!row.bindings.length
&& row.isBindable
&& ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')">
<a href="" ng-click="row.showOverlayPanel('bindService', {target: row.apiObject})">
<span class="pficon pficon-add-circle-o" aria-hidden="true"></span>
Create Binding
</a>
<div ng-if="row.bindings.length" class="hidden-xs hidden-sm">
<span class="component-label">Bindings</span>
<p ng-if="firstBinding = row.bindings[0]" class="bindings">
<span ng-if="application = row.state.applicationsByBinding[firstBinding.metadata.name][0]">
{{application.metadata.name}}
</span>
<span ng-if="row.bindings.length" class="component-label">Bindings</span>
<p ng-if="firstBinding = row.bindings[0]" class="bindings">
<span ng-if="application = row.state.applicationsByBinding[firstBinding.metadata.name][0]">
{{application.metadata.name}}
</span>
<span ng-if="!application">
{{firstBinding.spec.secretName}}
</span>
<span ng-if="row.bindings.length > 1">
and
<a
ng-if="row.bindings.length > 1"
ng-click="row.toggleExpand($event, true)">
{{row.bindings.length -1}} other<span ng-if="row.bindings.length > 2">s</span></a>
</span>
</p>
</div>
<span ng-if="!application">
{{firstBinding.spec.secretName}}
</span>
<span ng-if="row.bindings.length > 1">
and
<a
ng-if="row.bindings.length > 1"
ng-click="row.toggleExpand($event, true)">
{{row.bindings.length -1}} other<span ng-if="row.bindings.length > 2">s</span></a>
</span>
</p>
</div>
<div
class="hidden-xs"
Expand Down
28 changes: 14 additions & 14 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -12313,34 +12313,35 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<a ng-href=\"{{row.apiObject | navigateResourceURL}}\" ng-bind-html=\"row.displayName | highlightKeywords : row.state.filterKeywords\"></a>\n" +
"<div ng-bind-html=\"row.apiObject.metadata.name | highlightKeywords : row.state.filterKeywords\" class=\"list-row-longname\"></div>\n" +
"</h3>\n" +
"<div class=\"status-icons\">\n" +
"<notification-icon ng-if=\"!row.expanded\" alerts=\"row.notifications\"></notification-icon>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"list-pf-details\" ng-if=\"!row.expanded\" ng-switch=\"row.instanceStatus\">\n" +
"<span ng-switch-when=\"failed\" dynamic-content=\"{{row.apiObject | serviceInstanceFailedMessage}}\" data-toggle=\"tooltip\" data-trigger=\"hover\">\n" +
"<div class=\"status-icons\" ng-if=\"!row.expanded\">\n" +
"<notification-icon alerts=\"row.notifications\"></notification-icon>\n" +
"<div ng-switch=\"row.instanceStatus\">\n" +
"<span ng-switch-when=\"failed\" dynamic-content=\"{{row.apiObject | serviceInstanceFailedMessage}}\" data-toggle=\"tooltip\" data-trigger=\"hover\" class=\"notification-icon-count\">\n" +
"<span class=\"pficon pficon-error-circle-o\" aria-hidden=\"true\"></span>\n" +
"<span>Error</span>\n" +
"</span>\n" +
"<span ng-switch-when=\"deleted\">\n" +
"<span ng-switch-when=\"deleted\" class=\"notification-icon-count\">\n" +
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
"Marked for Deletion\n" +
"</span>\n" +
"<span ng-switch-when=\"pending\">\n" +
"<span ng-switch-when=\"pending\" class=\"notification-icon-count\">\n" +
"<span class=\"spinner spinner-xs spinner-inline\" aria-hidden=\"true\"></span>\n" +
"<span>Pending</span>\n" +
"</span>\n" +
"<div ng-switch-default>\n" +
"<div class=\"hidden-xs hidden-sm\">\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"list-pf-details\" ng-if=\"!row.expanded\">\n" +
"<span ng-if=\"!row.bindings.length\n" +
" && row.isBindable\n" +
" && ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')\">\n" +
" && row.isBindable\n" +
" && ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')\" class=\"hidden-xs hidden-sm\">\n" +
"<a href=\"\" ng-click=\"row.showOverlayPanel('bindService', {target: row.apiObject})\">\n" +
"<span class=\"pficon pficon-add-circle-o\" aria-hidden=\"true\"></span>\n" +
"Create Binding\n" +
"</a>\n" +
"</span>\n" +
"<span ng-if=\"row.bindings.length\" class=\"component-label\">Bindings</span>\n" +
"<div ng-if=\"row.bindings.length\" class=\"hidden-xs hidden-sm\">\n" +
"<span class=\"component-label\">Bindings</span>\n" +
"<p ng-if=\"firstBinding = row.bindings[0]\" class=\"bindings\">\n" +
"<span ng-if=\"application = row.state.applicationsByBinding[firstBinding.metadata.name][0]\">\n" +
"{{application.metadata.name}}\n" +
Expand All @@ -12355,7 +12356,6 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</span>\n" +
"</p>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"hidden-xs\" ng-if=\"(!row.instanceStatus || row.instanceStatus === 'ready') && row.apiObject.status.dashboardURL\">\n" +
"<a ng-href=\"{{row.apiObject.status.dashboardURL}}\" target=\"_blank\">\n" +
"Console\n" +
Expand Down

0 comments on commit a2cb3dc

Please sign in to comment.