Skip to content

Commit 914ef64

Browse files
rhamiltof0x11
authored andcommitted
Making display of errors for service rows consistent with others
Fixes openshift#2108
1 parent b9bc897 commit 914ef64

File tree

2 files changed

+49
-37
lines changed

2 files changed

+49
-37
lines changed

app/views/overview/_service-instance-row.html

+23-35
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,20 @@ <h3>
99
<a ng-href="{{row.apiObject | navigateResourceURL}}" ng-bind-html="row.displayName | highlightKeywords : row.state.filterKeywords"></a>
1010
<div ng-bind-html="row.apiObject.metadata.name | highlightKeywords : row.state.filterKeywords" class="list-row-longname"></div>
1111
</h3>
12-
<div class="status-icons" ng-if="!row.expanded" ng-init="tooltipID = 'instance-status-tooltip-' + $id">
12+
<div class="status-icons" ng-if="!row.expanded">
1313
<notification-icon alerts="row.notifications"></notification-icon>
14-
<div ng-switch="row.instanceStatus" class="instance-status-notification" id="{{tooltipID}}">
15-
<!-- Set the tooltip container so we can add write CSS rules that target the message. -->
14+
<div ng-switch="row.instanceStatus">
1615
<span ng-switch-when="failed"
17-
dynamic-content="{{row.getFailedTooltipText()}}"
16+
dynamic-content="{{row.apiObject | serviceInstanceFailedMessage}}"
1817
data-toggle="tooltip"
1918
data-trigger="hover"
20-
data-container="#{{tooltipID}}">
19+
class="notification-icon-count">
2120
<span class="pficon pficon-error-circle-o" aria-hidden="true"></span>
22-
<translate>Error</translate>
21+
<span translate>Error</span>
2322
</span>
2423
<span ng-switch-when="deleted" class="notification-icon-count">
2524
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
26-
<translate>Marked for Deletion</translate>
25+
<translate>Marked for Deletion</translate>
2726
</span>
2827
<span ng-switch-when="pending" class="notification-icon-count">
2928
<span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span>
@@ -32,41 +31,30 @@ <h3>
3231
</div>
3332
</div>
3433
</div>
35-
<div class="list-pf-details" ng-if="!row.expanded" ng-switch="row.instanceStatus">
36-
37-
<span ng-switch-when="failed"
38-
dynamic-content="{{row.apiObject | serviceInstanceFailedMessage}}"
39-
data-toggle="tooltip"
40-
data-trigger="hover">
41-
<span class="pficon pficon-error-circle-o" aria-hidden="true"></span>
42-
<span>Error</span>
43-
</span>
44-
<span ng-switch-when="deleted">
45-
<span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
46-
<span>Marked for Deletion</span>
47-
</span>
48-
<span ng-switch-when="pending">
49-
<span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span>
50-
<span>Pending</span>
34+
<div class="list-pf-details" ng-if="!row.expanded">
35+
<span ng-if="!row.bindings.length
36+
&& row.isBindable
37+
&& ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')"
38+
class="hidden-xs hidden-sm">
39+
<a href="" ng-click="row.showOverlayPanel('bindService', {target: row.apiObject})">
40+
<span class="pficon pficon-add-circle-o" aria-hidden="true"></span>
41+
<translate>Create Binding</translate>
42+
</a>
5143
</span>
52-
<div ng-switch-default>
53-
<div class="hidden-xs hidden-sm">
54-
<span ng-if="!row.bindings.length
55-
&& row.isBindable
56-
&& ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')">
57-
<a href="" ng-click="row.showOverlayPanel('bindService', {target: row.apiObject})">
58-
<span class="pficon pficon-add-circle-o" aria-hidden="true"></span>
59-
<translate>Create Binding</translate>
60-
</a>
44+
<div ng-if="row.bindings.length" class="hidden-xs hidden-sm">
45+
<span class="component-label" translate>Bindings</span>
46+
<p ng-if="firstBinding = row.bindings[0]" class="bindings">
47+
<span ng-if="application = row.state.applicationsByBinding[firstBinding.metadata.name][0]">
48+
{{application.metadata.name}}
6149
</span>
6250
<span ng-if="!application">
63-
{{firstBinding.metadata.name}}
51+
{{firstBinding.spec.secretName}}
6452
</span>
6553
<span ng-if="row.bindings.length > 1">
66-
<translate>and</translate>
54+
and
6755
<a
6856
ng-if="row.bindings.length > 1"
69-
ng-click="row.toggleExpand($event, true)" translate>
57+
ng-click="row.toggleExpand($event, true)">
7058
{{row.bindings.length -1}} other<span ng-if="row.bindings.length > 2">s</span></a>
7159
</span>
7260
</p>

dist/scripts/templates.js

+26-2
Original file line numberDiff line numberDiff line change
@@ -14621,6 +14621,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1462114621
"<a ng-href=\"{{row.apiObject | navigateResourceURL}}\" ng-bind-html=\"row.displayName | highlightKeywords : row.state.filterKeywords\"></a>\n" +
1462214622
"<div ng-bind-html=\"row.apiObject.metadata.name | highlightKeywords : row.state.filterKeywords\" class=\"list-row-longname\"></div>\n" +
1462314623
"</h3>\n" +
14624+
<<<<<<< ebfb4713833677f09810434073ce6f54f5dd263d
1462414625
"<div class=\"status-icons\" ng-if=\"!row.expanded\" ng-init=\"tooltipID = 'instance-status-tooltip-' + $id\">\n" +
1462514626
"<notification-icon alerts=\"row.notifications\"></notification-icon>\n" +
1462614627
"<div ng-switch=\"row.instanceStatus\" class=\"instance-status-notification\" id=\"{{tooltipID}}\">\n" +
@@ -14645,17 +14646,24 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1464514646
=======
1464614647
"<div class=\"list-pf-details\" ng-if=\"!row.expanded\" ng-switch=\"row.instanceStatus\">\n" +
1464714648
"<span ng-switch-when=\"failed\" dynamic-content=\"{{row.apiObject | serviceInstanceFailedMessage}}\" data-toggle=\"tooltip\" data-trigger=\"hover\">\n" +
14649+
=======
14650+
"<div class=\"status-icons\" ng-if=\"!row.expanded\">\n" +
14651+
"<notification-icon alerts=\"row.notifications\"></notification-icon>\n" +
14652+
"<div ng-switch=\"row.instanceStatus\">\n" +
14653+
"<span ng-switch-when=\"failed\" dynamic-content=\"{{row.apiObject | serviceInstanceFailedMessage}}\" data-toggle=\"tooltip\" data-trigger=\"hover\" class=\"notification-icon-count\">\n" +
14654+
>>>>>>> Making display of errors for service rows consistent with others
1464814655
"<span class=\"pficon pficon-error-circle-o\" aria-hidden=\"true\"></span>\n" +
1464914656
"<span>Error</span>\n" +
1465014657
"</span>\n" +
14651-
"<span ng-switch-when=\"deleted\">\n" +
14658+
"<span ng-switch-when=\"deleted\" class=\"notification-icon-count\">\n" +
1465214659
"<span class=\"pficon pficon-warning-triangle-o\" aria-hidden=\"true\"></span>\n" +
1465314660
"<span>Marked for Deletion</span>\n" +
1465414661
"</span>\n" +
14655-
"<span ng-switch-when=\"pending\">\n" +
14662+
"<span ng-switch-when=\"pending\" class=\"notification-icon-count\">\n" +
1465614663
"<span class=\"spinner spinner-xs spinner-inline\" aria-hidden=\"true\"></span>\n" +
1465714664
"<span>Pending</span>\n" +
1465814665
"</span>\n" +
14666+
<<<<<<< ebfb4713833677f09810434073ce6f54f5dd263d
1465914667
"<div ng-switch-default>\n" +
1466014668
"<div class=\"hidden-xs hidden-sm\">\n" +
1466114669
>>>>>>> Show provision status of service instances on the overview page.
@@ -14669,14 +14677,27 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1466914677
=======
1467014678
" && row.isBindable\n" +
1467114679
" && ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')\">\n" +
14680+
=======
14681+
"</div>\n" +
14682+
"</div>\n" +
14683+
"</div>\n" +
14684+
"<div class=\"list-pf-details\" ng-if=\"!row.expanded\">\n" +
14685+
"<span ng-if=\"!row.bindings.length\n" +
14686+
" && row.isBindable\n" +
14687+
" && ({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'create')\" class=\"hidden-xs hidden-sm\">\n" +
14688+
>>>>>>> Making display of errors for service rows consistent with others
1467214689
"<a href=\"\" ng-click=\"row.showOverlayPanel('bindService', {target: row.apiObject})\">\n" +
1467314690
"<span class=\"pficon pficon-add-circle-o\" aria-hidden=\"true\"></span>\n" +
1467414691
"Create Binding\n" +
1467514692
>>>>>>> Add bindings list to resource pages
1467614693
"</a>\n" +
1467714694
"</span>\n" +
1467814695
"<div ng-if=\"row.bindings.length\" class=\"hidden-xs hidden-sm\">\n" +
14696+
<<<<<<< ebfb4713833677f09810434073ce6f54f5dd263d
1467914697
"<span class=\"component-label\" translate>Bindings</span>\n" +
14698+
=======
14699+
"<span class=\"component-label\">Bindings</span>\n" +
14700+
>>>>>>> Making display of errors for service rows consistent with others
1468014701
"<p ng-if=\"firstBinding = row.bindings[0]\" class=\"bindings\">\n" +
1468114702
"<span ng-if=\"application = row.state.applicationsByBinding[firstBinding.metadata.name][0]\">\n" +
1468214703
"{{application.metadata.name}}\n" +
@@ -14691,10 +14712,13 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1469114712
"</span>\n" +
1469214713
"</p>\n" +
1469314714
"</div>\n" +
14715+
<<<<<<< ebfb4713833677f09810434073ce6f54f5dd263d
1469414716
<<<<<<< 72f2428654a3a28b0425e786505ad4ce7b45f7f6
1469514717
=======
1469614718
"</div>\n" +
1469714719
>>>>>>> Show provision status of service instances on the overview page.
14720+
=======
14721+
>>>>>>> Making display of errors for service rows consistent with others
1469814722
"<div class=\"hidden-xs\" ng-if=\"(!row.instanceStatus || row.instanceStatus === 'ready') && row.apiObject.status.dashboardURL\">\n" +
1469914723
"<a ng-href=\"{{row.apiObject.status.dashboardURL}}\" target=\"_blank\">\n" +
1470014724
"<translate>Dashboard</translate> <i class=\"fa fa-external-link small\" aria-hidden=\"true\"></i>\n" +

0 commit comments

Comments
 (0)