Skip to content

Commit 901d64f

Browse files
committed
Addition of truncate class to tile headers and when no deployments have started.
And add word-break to empty-dc and empty-rc Fixes #1175
1 parent 7195b40 commit 901d64f

10 files changed

+57
-58
lines changed

app/styles/_overview.less

+17-8
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@
299299
.flex-wrap(@wrap: wrap);
300300
.flex-direction(@direction: column);
301301
overview-service {
302+
// default width needed to enable truncation on elements within
303+
width: 100%;
302304
&:nth-child(n+3) {
303305
margin-top: @service-group-vertical-margin;
304306
}
@@ -380,8 +382,10 @@
380382
.service-name {
381383
.h3();
382384
font-weight: @overview-font-weight;
383-
margin-top: 3px;
384-
margin-bottom: 3px;
385+
// minimum line-height to prevent descender clipping since they use truncate
386+
line-height: 1.2;
387+
margin-top: 2px;
388+
margin-bottom: 2px;
385389
.pficon {
386390
margin-right: 7px;
387391
vertical-align: -2px;
@@ -398,8 +402,10 @@
398402
.rc-header {
399403
.text-muted();
400404
padding: 5px 10px;
401-
// Prevent the content from overlapping the deployment shield
402-
margin-right: @shield-width-lg;
405+
&.rc-header-shield {
406+
// Prevent the content from overlapping the deployment shield
407+
margin-right: @shield-width-lg;
408+
}
403409
}
404410
image-names {
405411
// truncate long image names
@@ -570,7 +576,6 @@
570576
width: 50%;
571577
}
572578
.no-child-services-message, .no-deployments-message {
573-
.text-center();
574579
.text-muted();
575580
.well();
576581
margin-bottom: 0;
@@ -589,23 +594,27 @@
589594
}
590595
}
591596
.no-deployments-message {
592-
.flex(@columns: 1 0 0%); // the parent overview-service is where width with flex-basis is set.
597+
width: 100%;
593598
}
594599
.no-child-services-message {
595600
display: none;
596601
@media (min-width: @two-column-min-width) {
597602
.flex-display(@display: flex);
598603
.flex(@columns: 1 0 0%);
599604
.flex-direction(@direction: column);
605+
height: 100%;
600606
}
601607
}
602608
.empty-tile {
603-
padding: 50px;
609+
.text-center();
610+
padding: 50px 20px;
611+
.word-break();
604612
}
605613
.empty-dc {
606614
.text-center();
607615
.text-muted();
608-
padding: 0 50px 70px;
616+
padding: 0 20px 70px;
617+
.word-break();
609618
}
610619
@media (min-width: @screen-md-min) {
611620
.overview-services.single-alternate-service {

app/views/overview/_dc.html

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="overview-tile" ng-class="{ 'deployment-in-progress': inProgressDeployment }">
22
<ng-include src="'views/overview/_service-header.html'"></ng-include>
33
<div class="overview-tile-header">
4-
<div class="rc-header">
5-
<div>
4+
<div class="rc-header" ng-class="{ 'rc-header-shield' : activeReplicationController}">
5+
<div class="truncate">
66
Deployment Config
77
<a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>
88
<small class="overview-timestamp" ng-if="activeReplicationController && !inProgressDeployment">
@@ -43,8 +43,7 @@ <h2>No deployments.</h2>
4343
A new deployment will start automatically when
4444
<span ng-if="imageChangeTriggers.length === 1">
4545
an image is available for
46-
<a ng-href="{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}">
47-
{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.
46+
<a ng-href="{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}">{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.
4847
</span>
4948
<span ng-if="imageChangeParams.length > 1">
5049
one of the images for this deployment config changes.
@@ -63,11 +62,8 @@ <h2>No deployments.</h2>
6362
</div>
6463
</div>
6564
<div ng-if="!pipelinesForDC[deploymentConfig.metadata.name].length">
66-
<p>
67-
No deployments have started for
68-
<a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>.
69-
</p>
70-
65+
<p>No deployments have started for
66+
<a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>.</p>
7167
<button ng-if="'deploymentconfigs' | canI : 'update'" class="btn btn-primary" ng-click="startDeployment(deploymentConfig)">
7268
Start Deployment
7369
</button>

app/views/overview/_deployment.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="overview-tile" ng-class="{ 'deployment-in-progress': inProgressDeployment }">
22
<ng-include src="'views/overview/_service-header.html'"></ng-include>
33
<div class="overview-tile-header">
4-
<div class="rc-header">
5-
<div>
4+
<div class="rc-header" ng-class="{ 'rc-header-shield' : latestReplicaSet && latestRevision && !inProgressDeployment}">
5+
<div class="truncate">
66
Deployment
77
<a ng-href="{{deployment | navigateResourceURL}}">{{deploymentName}}</a>
88
<small class="overview-timestamp" ng-if="latestReplicaSet">

app/views/overview/_pod.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="overview-tile" ng-if="pod.kind === 'Pod'">
22
<ng-include src="'views/overview/_service-header.html'"></ng-include>
33
<div class="rc-header"> <!-- TODO may want different treatment for a pod-name? -->
4-
<div>
4+
<div class="truncate">
55
Pod
66
<a ng-href="{{pod | navigateResourceURL}}">{{pod.metadata.name}}</a>
77
<small class="overview-timestamp">

app/views/overview/_service-group.html

+4-5
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ <h3 class="route-title truncate">
6767
ng-repeat="service in childServices">
6868
</overview-service>
6969

70-
<div flex column ng-if="alternateServices.length === 0 && childServices.length === 0 && service" class="no-child-services-block">
70+
<div column ng-if="alternateServices.length === 0 && childServices.length === 0 && service" class="no-child-services-block">
7171
<div class="no-child-services-message">
7272
<div class="empty-tile">
7373
<h2>No grouped services.</h2>
74-
<p>
75-
No services are grouped with <a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a>.
76-
<span ng-if="(services | hashSize) > 1 && ('services' | canI : 'update')">Add a service to group them together.</span>
77-
</p>
74+
<p>No services are grouped with <a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a>.
75+
<span ng-if="(services | hashSize) > 1 && ('services' | canI : 'update')">Add a service to group them together.</span>
76+
</p>
7877
<div ng-if="(services | hashSize) > 1 && ('services' | canI : 'update')">
7978
<button class="btn btn-primary" ng-click="linkService()">
8079
Group Service

app/views/overview/_service-header.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div row class="service-title" ng-if="service">
2-
<div class="service-name">
2+
<div class="service-name truncate">
33
<span class="pficon pficon-service" aria-hidden="true" title="Service"></span>
44
<span class="sr-only">Service</span>
55
<a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a>

app/views/overview/_service.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<div ng-if="!tileCount" class="no-deployments-block">
2-
<div column class="no-deployments-message">
2+
<div column class="no-deployments-message overview-tile">
33
<ng-include src="'views/overview/_service-header.html'"></ng-include>
44
<div class="empty-tile">
55
<h2>No deployments or pods.</h2>
66
<p>
7-
Service
8-
<a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a>
7+
Service <a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a>
98
does not route to any deployments or pods.
109
</p>
1110
</div>

app/views/overview/_set.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ng-include src="'views/overview/_service-header.html'"></ng-include>
33
<div class="overview-tile-header">
44
<div class="rc-header">
5-
<div>
5+
<div class="truncate">
66
{{set.kind | humanizeKind : true}}
77
<a ng-href="{{set | navigateResourceURL}}">{{set.metadata.name}}</a>
88
<small class="overview-timestamp">

dist/scripts/templates.js

+14-19
Original file line numberDiff line numberDiff line change
@@ -11374,8 +11374,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1137411374
"<div class=\"overview-tile\" ng-class=\"{ 'deployment-in-progress': inProgressDeployment }\">\n" +
1137511375
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1137611376
"<div class=\"overview-tile-header\">\n" +
11377-
"<div class=\"rc-header\">\n" +
11378-
"<div>\n" +
11377+
"<div class=\"rc-header\" ng-class=\"{ 'rc-header-shield' : activeReplicationController}\">\n" +
11378+
"<div class=\"truncate\">\n" +
1137911379
"Deployment Config\n" +
1138011380
"<a ng-href=\"{{deploymentConfig | navigateResourceURL}}\">{{deploymentConfig.metadata.name}}</a>\n" +
1138111381
"<small class=\"overview-timestamp\" ng-if=\"activeReplicationController && !inProgressDeployment\">\n" +
@@ -11413,8 +11413,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1141311413
"A new deployment will start automatically when\n" +
1141411414
"<span ng-if=\"imageChangeTriggers.length === 1\">\n" +
1141511415
"an image is available for\n" +
11416-
"<a ng-href=\"{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}\">\n" +
11417-
"{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.\n" +
11416+
"<a ng-href=\"{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}\">{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.\n" +
1141811417
"</span>\n" +
1141911418
"<span ng-if=\"imageChangeParams.length > 1\">\n" +
1142011419
"one of the images for this deployment config changes.\n" +
@@ -11433,10 +11432,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1143311432
"</div>\n" +
1143411433
"</div>\n" +
1143511434
"<div ng-if=\"!pipelinesForDC[deploymentConfig.metadata.name].length\">\n" +
11436-
"<p>\n" +
11437-
"No deployments have started for\n" +
11438-
"<a ng-href=\"{{deploymentConfig | navigateResourceURL}}\">{{deploymentConfig.metadata.name}}</a>.\n" +
11439-
"</p>\n" +
11435+
"<p>No deployments have started for\n" +
11436+
"<a ng-href=\"{{deploymentConfig | navigateResourceURL}}\">{{deploymentConfig.metadata.name}}</a>.</p>\n" +
1144011437
"<button ng-if=\"'deploymentconfigs' | canI : 'update'\" class=\"btn btn-primary\" ng-click=\"startDeployment(deploymentConfig)\">\n" +
1144111438
"Start Deployment\n" +
1144211439
"</button>\n" +
@@ -11505,8 +11502,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1150511502
"<div class=\"overview-tile\" ng-class=\"{ 'deployment-in-progress': inProgressDeployment }\">\n" +
1150611503
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1150711504
"<div class=\"overview-tile-header\">\n" +
11508-
"<div class=\"rc-header\">\n" +
11509-
"<div>\n" +
11505+
"<div class=\"rc-header\" ng-class=\"{ 'rc-header-shield' : latestReplicaSet && latestRevision && !inProgressDeployment}\">\n" +
11506+
"<div class=\"truncate\">\n" +
1151011507
"Deployment\n" +
1151111508
"<a ng-href=\"{{deployment | navigateResourceURL}}\">{{deploymentName}}</a>\n" +
1151211509
"<small class=\"overview-timestamp\" ng-if=\"latestReplicaSet\">\n" +
@@ -11576,7 +11573,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1157611573
"<div class=\"overview-tile\" ng-if=\"pod.kind === 'Pod'\">\n" +
1157711574
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1157811575
"<div class=\"rc-header\"> \n" +
11579-
"<div>\n" +
11576+
"<div class=\"truncate\">\n" +
1158011577
"Pod\n" +
1158111578
"<a ng-href=\"{{pod | navigateResourceURL}}\">{{pod.metadata.name}}</a>\n" +
1158211579
"<small class=\"overview-timestamp\">\n" +
@@ -11661,12 +11658,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1166111658
"</overview-service>\n" +
1166211659
"<overview-service ng-init=\"isChild = true\" ng-repeat=\"service in childServices\">\n" +
1166311660
"</overview-service>\n" +
11664-
"<div flex column ng-if=\"alternateServices.length === 0 && childServices.length === 0 && service\" class=\"no-child-services-block\">\n" +
11661+
"<div column ng-if=\"alternateServices.length === 0 && childServices.length === 0 && service\" class=\"no-child-services-block\">\n" +
1166511662
"<div class=\"no-child-services-message\">\n" +
1166611663
"<div class=\"empty-tile\">\n" +
1166711664
"<h2>No grouped services.</h2>\n" +
11668-
"<p>\n" +
11669-
"No services are grouped with <a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>.\n" +
11665+
"<p>No services are grouped with <a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>.\n" +
1167011666
"<span ng-if=\"(services | hashSize) > 1 && ('services' | canI : 'update')\">Add a service to group them together.</span>\n" +
1167111667
"</p>\n" +
1167211668
"<div ng-if=\"(services | hashSize) > 1 && ('services' | canI : 'update')\">\n" +
@@ -11686,7 +11682,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1168611682

1168711683
$templateCache.put('views/overview/_service-header.html',
1168811684
"<div row class=\"service-title\" ng-if=\"service\">\n" +
11689-
"<div class=\"service-name\">\n" +
11685+
"<div class=\"service-name truncate\">\n" +
1169011686
"<span class=\"pficon pficon-service\" aria-hidden=\"true\" title=\"Service\"></span>\n" +
1169111687
"<span class=\"sr-only\">Service</span>\n" +
1169211688
"<a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>\n" +
@@ -11714,13 +11710,12 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1171411710

1171511711
$templateCache.put('views/overview/_service.html',
1171611712
"<div ng-if=\"!tileCount\" class=\"no-deployments-block\">\n" +
11717-
"<div column class=\"no-deployments-message\">\n" +
11713+
"<div column class=\"no-deployments-message overview-tile\">\n" +
1171811714
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1171911715
"<div class=\"empty-tile\">\n" +
1172011716
"<h2>No deployments or pods.</h2>\n" +
1172111717
"<p>\n" +
11722-
"Service\n" +
11723-
"<a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>\n" +
11718+
"Service <a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>\n" +
1172411719
"does not route to any deployments or pods.\n" +
1172511720
"</p>\n" +
1172611721
"</div>\n" +
@@ -11767,7 +11762,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1176711762
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1176811763
"<div class=\"overview-tile-header\">\n" +
1176911764
"<div class=\"rc-header\">\n" +
11770-
"<div>\n" +
11765+
"<div class=\"truncate\">\n" +
1177111766
"{{set.kind | humanizeKind : true}}\n" +
1177211767
"<a ng-href=\"{{set | navigateResourceURL}}\">{{set.metadata.name}}</a>\n" +
1177311768
"<small class=\"overview-timestamp\">\n" +

0 commit comments

Comments
 (0)