Skip to content

Commit 041ded1

Browse files
committed
Switch to a specific class .icon-wrap instead of :first-child selector for icon-row
Fixes openshift#1144 (comment)
1 parent 4690daf commit 041ded1

File tree

8 files changed

+37
-37
lines changed

8 files changed

+37
-37
lines changed

app/scripts/extensions/javalink/javaLink.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'ng-show="item.url" ',
1818
'class="icon-row" ',
1919
'title="Connect to container">',
20-
'<div>',
20+
'<div class="icon-wrap">',
2121
'<i class="fa fa-share" aria-hidden="true"></i>',
2222
'</div>',
2323
'<div flex>',

app/styles/_components.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
[flex] {
170170
min-width: 0;
171171
}
172-
[row] {
172+
.icon-row {
173173
border-left: 3px solid @gray-lighter;
174174
padding: 2px 0 0 2px;
175175
}

app/styles/_openshift-icon.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ you can use the generic selector below, but it's slower:
324324
}
325325

326326
.icon-row {
327-
div:first-child {
327+
.icon-wrap {
328328
text-align: center;
329329
width: 30px;
330330
}

app/views/_pod-template.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<div class="pod-template">
2222
<div class="component-label">Container: {{container.name}}</div>
2323
<div row ng-if="container.image" class="pod-template-image icon-row">
24-
<div>
24+
<div class="icon-wrap">
2525
<span class="pficon pficon-image" aria-hidden="true"></span>
2626
</div>
2727
<div flex class="word-break">
@@ -38,7 +38,7 @@
3838
</div>
3939
<div ng-if="imagesByDockerReference && container.image && (image = imagesByDockerReference[container.image])" class="pod-template-build">
4040
<div row class="icon-row" ng-if="build = (image | buildForImage : builds)">
41-
<div>
41+
<div class="icon-wrap">
4242
<span class="fa fa-refresh" aria-hidden="true"></span>
4343
</div>
4444
<div flex class="word-break">
@@ -53,7 +53,7 @@
5353
</div>
5454
</div>
5555
<div row class="icon-row" ng-if="build.spec.source">
56-
<div>
56+
<div class="icon-wrap">
5757
<span class="fa fa-code" aria-hidden="true"></span>
5858
</div>
5959
<div flex>
@@ -83,7 +83,7 @@
8383
</div>
8484

8585
<div row ng-if="detailed && (container.command.length || container.args.length)" class="icon-row">
86-
<div>
86+
<div class="icon-wrap">
8787
<span aria-hidden="true" class="fa fa-terminal"></span>
8888
</div>
8989
<div flex class="word-break">
@@ -105,7 +105,7 @@
105105
</div>
106106

107107
<div row ng-if="container.ports.length > 0" class="pod-template-ports icon-row">
108-
<div>
108+
<div class="icon-wrap">
109109
<span data-icon="" aria-hidden="true" style="font-size:16px;line-height:normal"></span>
110110
</div>
111111
<div flex class="word-break">
@@ -121,7 +121,7 @@
121121
</div>
122122

123123
<div row ng-if="detailed" ng-repeat="mount in container.volumeMounts" class="icon-row">
124-
<div>
124+
<div class="icon-wrap">
125125
<span aria-hidden="true" class="fa fa-database"></span>
126126
</div>
127127
<div flex class="word-break">
@@ -134,7 +134,7 @@
134134
</div>
135135

136136
<div row ng-if="detailed && (container.resources.requests.cpu || container.resources.limits.cpu)" class="icon-row">
137-
<div>
137+
<div class="icon-wrap">
138138
<i class="fa fa-area-chart" aria-hidden="true"></i>
139139
</div>
140140
<div flex>
@@ -152,7 +152,7 @@
152152
</div>
153153

154154
<div row ng-if="detailed && (container.resources.requests.memory || container.resources.limits.memory)" class="icon-row">
155-
<div>
155+
<div class="icon-wrap">
156156
<i class="fa fa-area-chart" aria-hidden="true"></i>
157157
</div>
158158
<div flex>
@@ -170,7 +170,7 @@
170170
</div>
171171

172172
<div row ng-if="detailed && container.readinessProbe" class="icon-row">
173-
<div>
173+
<div class="icon-wrap">
174174
<i class="fa fa-medkit" aria-hidden="true"></i>
175175
</div>
176176
<div flex>
@@ -180,7 +180,7 @@
180180
</div>
181181

182182
<div row ng-if="detailed && container.livenessProbe" class="icon-row">
183-
<div>
183+
<div class="icon-wrap">
184184
<i class="fa fa-medkit" aria-hidden="true"></i>
185185
</div>
186186
<div flex>

app/views/_volume-claim-templates.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="component-label">Storage claim: {{template.metadata.name}}</div>
66

77
<div row class="pod-template-image icon-row">
8-
<div>
8+
<div class="icon-wrap">
99
<span class="fa fa-lock" aria-hidden="true"></span>
1010
</div>
1111
<div flex class="word-break">
@@ -17,7 +17,7 @@
1717
</div>
1818

1919
<div row class="pod-template-image icon-row">
20-
<div>
20+
<div class="icon-wrap">
2121
<span class="fa fa-database" aria-hidden="true"></span>
2222
</div>
2323
<div flex class="word-break">
@@ -31,14 +31,15 @@
3131
<div
3232
row class="pod-template-image icon-row"
3333
ng-if="template.spec.selector.matchLabels">
34-
<div>
34+
<div class="icon-wrap">
3535
<span class="fa fa-tag" aria-hidden="true"></span>
3636
</div>
3737
<div flex class="word-break">
3838
<span class="pod-template-key">Selector:</span>
39-
<span ng-repeat="(key, value) in template.spec.selector.matchLabels">
39+
<!-- <span ng-repeat="(key, value) in template.spec.selector.matchLabels">
4040
{{key}}={{value}}<span ng-if="!$last">, </span>
41-
</span>
41+
</span> -->
42+
<selector selector="template.spec.selector"></selector>
4243
</div>
4344
</div>
4445

dist/scripts/scripts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14987,7 +14987,7 @@ archiveUri:j
1498714987
} ]), function() {
1498814988
var a = "javaLinkExtension";
1498914989
angular.module(a, [ "openshiftConsole" ]).run([ "AuthService", "BaseHref", "DataService", "extensionRegistry", function(a, b, c, d) {
14990-
var e = [ "<div row ", 'ng-show="item.url" ', 'class="icon-row" ', 'title="Connect to container">', "<div>", '<i class="fa fa-share" aria-hidden="true"></i>', "</div>", "<div flex>", '<a ng-click="item.onClick($event)" ', 'ng-href="item.url">', "Open Java Console", "</a>", "</div>", "</div>" ].join(""), f = function(a, b, d) {
14990+
var e = [ "<div row ", 'ng-show="item.url" ', 'class="icon-row" ', 'title="Connect to container">', '<div class="icon-wrap">', '<i class="fa fa-share" aria-hidden="true"></i>', "</div>", "<div flex>", '<a ng-click="item.onClick($event)" ', 'ng-href="item.url">', "Open Java Console", "</a>", "</div>", "</div>" ].join(""), f = function(a, b, d) {
1499114991
return new URI(c.url({
1499214992
resource:"pods/proxy",
1499314993
name:[ "https", b, d || "" ].join(":"),

dist/scripts/templates.js

+15-16
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
310310
"<div class=\"pod-template\">\n" +
311311
"<div class=\"component-label\">Container: {{container.name}}</div>\n" +
312312
"<div row ng-if=\"container.image\" class=\"pod-template-image icon-row\">\n" +
313-
"<div>\n" +
313+
"<div class=\"icon-wrap\">\n" +
314314
"<span class=\"pficon pficon-image\" aria-hidden=\"true\"></span>\n" +
315315
"</div>\n" +
316316
"<div flex class=\"word-break\">\n" +
@@ -327,7 +327,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
327327
"</div>\n" +
328328
"<div ng-if=\"imagesByDockerReference && container.image && (image = imagesByDockerReference[container.image])\" class=\"pod-template-build\">\n" +
329329
"<div row class=\"icon-row\" ng-if=\"build = (image | buildForImage : builds)\">\n" +
330-
"<div>\n" +
330+
"<div class=\"icon-wrap\">\n" +
331331
"<span class=\"fa fa-refresh\" aria-hidden=\"true\"></span>\n" +
332332
"</div>\n" +
333333
"<div flex class=\"word-break\">\n" +
@@ -342,7 +342,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
342342
"</div>\n" +
343343
"</div>\n" +
344344
"<div row class=\"icon-row\" ng-if=\"build.spec.source\">\n" +
345-
"<div>\n" +
345+
"<div class=\"icon-wrap\">\n" +
346346
"<span class=\"fa fa-code\" aria-hidden=\"true\"></span>\n" +
347347
"</div>\n" +
348348
"<div flex>\n" +
@@ -368,7 +368,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
368368
"</div>\n" +
369369
"</div>\n" +
370370
"<div row ng-if=\"detailed && (container.command.length || container.args.length)\" class=\"icon-row\">\n" +
371-
"<div>\n" +
371+
"<div class=\"icon-wrap\">\n" +
372372
"<span aria-hidden=\"true\" class=\"fa fa-terminal\"></span>\n" +
373373
"</div>\n" +
374374
"<div flex class=\"word-break\">\n" +
@@ -384,7 +384,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
384384
"</div>\n" +
385385
"</div>\n" +
386386
"<div row ng-if=\"container.ports.length > 0\" class=\"pod-template-ports icon-row\">\n" +
387-
"<div>\n" +
387+
"<div class=\"icon-wrap\">\n" +
388388
"<span data-icon=\"\" aria-hidden=\"true\" style=\"font-size:16px;line-height:normal\"></span>\n" +
389389
"</div>\n" +
390390
"<div flex class=\"word-break\">\n" +
@@ -399,7 +399,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
399399
"</div>\n" +
400400
"</div>\n" +
401401
"<div row ng-if=\"detailed\" ng-repeat=\"mount in container.volumeMounts\" class=\"icon-row\">\n" +
402-
"<div>\n" +
402+
"<div class=\"icon-wrap\">\n" +
403403
"<span aria-hidden=\"true\" class=\"fa fa-database\"></span>\n" +
404404
"</div>\n" +
405405
"<div flex class=\"word-break\">\n" +
@@ -411,7 +411,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
411411
"</div>\n" +
412412
"</div>\n" +
413413
"<div row ng-if=\"detailed && (container.resources.requests.cpu || container.resources.limits.cpu)\" class=\"icon-row\">\n" +
414-
"<div>\n" +
414+
"<div class=\"icon-wrap\">\n" +
415415
"<i class=\"fa fa-area-chart\" aria-hidden=\"true\"></i>\n" +
416416
"</div>\n" +
417417
"<div flex>\n" +
@@ -428,7 +428,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
428428
"</div>\n" +
429429
"</div>\n" +
430430
"<div row ng-if=\"detailed && (container.resources.requests.memory || container.resources.limits.memory)\" class=\"icon-row\">\n" +
431-
"<div>\n" +
431+
"<div class=\"icon-wrap\">\n" +
432432
"<i class=\"fa fa-area-chart\" aria-hidden=\"true\"></i>\n" +
433433
"</div>\n" +
434434
"<div flex>\n" +
@@ -445,7 +445,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
445445
"</div>\n" +
446446
"</div>\n" +
447447
"<div row ng-if=\"detailed && container.readinessProbe\" class=\"icon-row\">\n" +
448-
"<div>\n" +
448+
"<div class=\"icon-wrap\">\n" +
449449
"<i class=\"fa fa-medkit\" aria-hidden=\"true\"></i>\n" +
450450
"</div>\n" +
451451
"<div flex>\n" +
@@ -454,7 +454,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
454454
"</div>\n" +
455455
"</div>\n" +
456456
"<div row ng-if=\"detailed && container.livenessProbe\" class=\"icon-row\">\n" +
457-
"<div>\n" +
457+
"<div class=\"icon-wrap\">\n" +
458458
"<i class=\"fa fa-medkit\" aria-hidden=\"true\"></i>\n" +
459459
"</div>\n" +
460460
"<div flex>\n" +
@@ -803,7 +803,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
803803
"<div ng-repeat=\"template in templates\" class=\"pod-template\">\n" +
804804
"<div class=\"component-label\">Storage claim: {{template.metadata.name}}</div>\n" +
805805
"<div row class=\"pod-template-image icon-row\">\n" +
806-
"<div>\n" +
806+
"<div class=\"icon-wrap\">\n" +
807807
"<span class=\"fa fa-lock\" aria-hidden=\"true\"></span>\n" +
808808
"</div>\n" +
809809
"<div flex class=\"word-break\">\n" +
@@ -814,7 +814,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
814814
"</div>\n" +
815815
"</div>\n" +
816816
"<div row class=\"pod-template-image icon-row\">\n" +
817-
"<div>\n" +
817+
"<div class=\"icon-wrap\">\n" +
818818
"<span class=\"fa fa-database\" aria-hidden=\"true\"></span>\n" +
819819
"</div>\n" +
820820
"<div flex class=\"word-break\">\n" +
@@ -825,14 +825,13 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
825825
"</div>\n" +
826826
"</div>\n" +
827827
"<div row class=\"pod-template-image icon-row\" ng-if=\"template.spec.selector.matchLabels\">\n" +
828-
"<div>\n" +
828+
"<div class=\"icon-wrap\">\n" +
829829
"<span class=\"fa fa-tag\" aria-hidden=\"true\"></span>\n" +
830830
"</div>\n" +
831831
"<div flex class=\"word-break\">\n" +
832832
"<span class=\"pod-template-key\">Selector:</span>\n" +
833-
"<span ng-repeat=\"(key, value) in template.spec.selector.matchLabels\">\n" +
834-
"{{key}}={{value}}<span ng-if=\"!$last\">, </span>\n" +
835-
"</span>\n" +
833+
"\n" +
834+
"<selector selector=\"template.spec.selector\"></selector>\n" +
836835
"</div>\n" +
837836
"</div>\n" +
838837
"</div>\n" +

dist/styles/main.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -3688,7 +3688,7 @@ to{opacity:0}
36883688
.pod-template-block+.pod-template-block{margin-top:15px}
36893689
.pod-template-block .component-label{font-size:11px;padding:0 10px 4px 0;text-transform:uppercase}
36903690
.pod-template-block .pod-template [flex]{min-width:0}
3691-
.pod-template-block .pod-template [row]{border-left:3px solid #f1f1f1;padding:2px 0 0 2px}
3691+
.pod-template-block .pod-template .icon-row{border-left:3px solid #f1f1f1;padding:2px 0 0 2px}
36923692
.pod-template-block .pod-template .fa,.pod-template-block .pod-template .pficon,.pod-template-block .pod-template span[data-icon]{color:#888}
36933693
.pod-template-block .pod-template .pod-template-build{word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;min-width:0}
36943694
.pod-template-block .pod-template .pod-template-key{font-weight:700}
@@ -4299,7 +4299,7 @@ ul.messenger-theme-flat .messenger-message.alert-info .messenger-message-inner:b
42994299
.font-icon-block .font-icon:nth-child(n+2){position:absolute;left:0;top:0;text-shadow:none}
43004300
.font-icon{display:inline-block;top:0;font-family:openshift-logos-icon!important;font-style:normal}
43014301
.font-icon.font-icon-inline{position:relative}
4302-
.icon-row div:first-child{text-align:center;width:30px}
4302+
.icon-row .icon-wrap{text-align:center;width:30px}
43034303
@font-face{font-family:openshift-logos-icon;src:url(../styles/fonts/openshift-logos-icon.ttf) format('truetype'),url(../styles/fonts/openshift-logos-icon.woff) format('woff'),url(../styles/fonts/openshift-logos-icon.svg#openshift-logos-icon) format('svg');font-weight:400;font-style:normal}
43044304
.icon-js:before{content:"\f157"}
43054305
.icon-symfony:before{content:"\f156"}

0 commit comments

Comments
 (0)