Skip to content

Commit da5310c

Browse files
committed
Addition of truncate class to tile headers and when no deployments have started.
Fixes #1175
1 parent 63ae71a commit da5310c

10 files changed

+49
-55
lines changed

app/styles/_overview.less

+13-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,9 @@
380382
.service-name {
381383
.h3();
382384
font-weight: @overview-font-weight;
383-
margin-top: 3px;
384-
margin-bottom: 3px;
385+
line-height: 1.2;
386+
margin-top: 2px;
387+
margin-bottom: 2px;
385388
.pficon {
386389
margin-right: 7px;
387390
vertical-align: -2px;
@@ -398,8 +401,10 @@
398401
.rc-header {
399402
.text-muted();
400403
padding: 5px 10px;
401-
// Prevent the content from overlapping the deployment shield
402-
margin-right: @shield-width-lg;
404+
&.rc-header-shield {
405+
// Prevent the content from overlapping the deployment shield
406+
margin-right: @shield-width-lg;
407+
}
403408
}
404409
image-names {
405410
// truncate long image names
@@ -570,7 +575,6 @@
570575
width: 50%;
571576
}
572577
.no-child-services-message, .no-deployments-message {
573-
.text-center();
574578
.text-muted();
575579
.well();
576580
margin-bottom: 0;
@@ -589,7 +593,7 @@
589593
}
590594
}
591595
.no-deployments-message {
592-
.flex(@columns: 1 0 0%); // the parent overview-service is where width with flex-basis is set.
596+
width: 100%;
593597
}
594598
.no-child-services-message {
595599
display: none;
@@ -600,12 +604,13 @@
600604
}
601605
}
602606
.empty-tile {
603-
padding: 50px;
607+
.text-center();
608+
padding: 50px 20px;
604609
}
605610
.empty-dc {
606611
.text-center();
607612
.text-muted();
608-
padding: 0 50px 70px;
613+
padding: 0 20px 70px;
609614
}
610615
@media (min-width: @screen-md-min) {
611616
.overview-services.single-alternate-service {

app/views/overview/_dc.html

+5-8
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,8 @@ <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+
<div class="truncate mar-bottom-xl"><a ng-href="{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}">
47+
{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.</div>
4848
</span>
4949
<span ng-if="imageChangeParams.length > 1">
5050
one of the images for this deployment config changes.
@@ -63,11 +63,8 @@ <h2>No deployments.</h2>
6363
</div>
6464
</div>
6565
<div ng-if="!pipelinesForDC[deploymentConfig.metadata.name].length">
66-
<p>
6766
No deployments have started for
68-
<a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>.
69-
</p>
70-
67+
<div class="truncate mar-bottom-xl"><a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>.</div>
7168
<button ng-if="'deploymentconfigs' | canI : 'update'" class="btn btn-primary" ng-click="startDeployment(deploymentConfig)">
7269
Start Deployment
7370
</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

+2-4
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ <h3 class="route-title truncate">
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>.
74+
No services are grouped with <div class="word-break-all"><a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a>.</div>
7675
<span ng-if="(services | hashSize) > 1 && ('services' | canI : 'update')">Add a service to group them together.</span>
77-
</p>
7876
<div ng-if="(services | hashSize) > 1 && ('services' | canI : 'update')">
79-
<button class="btn btn-primary" ng-click="linkService()">
77+
<button class="btn btn-primary mar-lg" ng-click="linkService()">
8078
Group Service
8179
</button>
8280
</div>

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+
<div class="word-break-all">Service <a ng-href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a></div>
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
@@ -11335,8 +11335,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1133511335
"<div class=\"overview-tile\" ng-class=\"{ 'deployment-in-progress': inProgressDeployment }\">\n" +
1133611336
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1133711337
"<div class=\"overview-tile-header\">\n" +
11338-
"<div class=\"rc-header\">\n" +
11339-
"<div>\n" +
11338+
"<div class=\"rc-header\" ng-class=\"{ 'rc-header-shield' : activeReplicationController}\">\n" +
11339+
"<div class=\"truncate\">\n" +
1134011340
"Deployment Config\n" +
1134111341
"<a ng-href=\"{{deploymentConfig | navigateResourceURL}}\">{{deploymentConfig.metadata.name}}</a>\n" +
1134211342
"<small class=\"overview-timestamp\" ng-if=\"activeReplicationController && !inProgressDeployment\">\n" +
@@ -11374,8 +11374,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1137411374
"A new deployment will start automatically when\n" +
1137511375
"<span ng-if=\"imageChangeTriggers.length === 1\">\n" +
1137611376
"an image is available for\n" +
11377-
"<a ng-href=\"{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}\">\n" +
11378-
"{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.\n" +
11377+
"<div class=\"truncate mar-bottom-xl\"><a ng-href=\"{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}\">\n" +
11378+
"{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.</div>\n" +
1137911379
"</span>\n" +
1138011380
"<span ng-if=\"imageChangeParams.length > 1\">\n" +
1138111381
"one of the images for this deployment config changes.\n" +
@@ -11394,10 +11394,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1139411394
"</div>\n" +
1139511395
"</div>\n" +
1139611396
"<div ng-if=\"!pipelinesForDC[deploymentConfig.metadata.name].length\">\n" +
11397-
"<p>\n" +
1139811397
"No deployments have started for\n" +
11399-
"<a ng-href=\"{{deploymentConfig | navigateResourceURL}}\">{{deploymentConfig.metadata.name}}</a>.\n" +
11400-
"</p>\n" +
11398+
"<div class=\"truncate mar-bottom-xl\"><a ng-href=\"{{deploymentConfig | navigateResourceURL}}\">{{deploymentConfig.metadata.name}}</a>.</div>\n" +
1140111399
"<button ng-if=\"'deploymentconfigs' | canI : 'update'\" class=\"btn btn-primary\" ng-click=\"startDeployment(deploymentConfig)\">\n" +
1140211400
"Start Deployment\n" +
1140311401
"</button>\n" +
@@ -11466,8 +11464,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1146611464
"<div class=\"overview-tile\" ng-class=\"{ 'deployment-in-progress': inProgressDeployment }\">\n" +
1146711465
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1146811466
"<div class=\"overview-tile-header\">\n" +
11469-
"<div class=\"rc-header\">\n" +
11470-
"<div>\n" +
11467+
"<div class=\"rc-header\" ng-class=\"{ 'rc-header-shield' : latestReplicaSet && latestRevision && !inProgressDeployment}\">\n" +
11468+
"<div class=\"truncate\">\n" +
1147111469
"Deployment\n" +
1147211470
"<a ng-href=\"{{deployment | navigateResourceURL}}\">{{deploymentName}}</a>\n" +
1147311471
"<small class=\"overview-timestamp\" ng-if=\"latestReplicaSet\">\n" +
@@ -11537,7 +11535,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1153711535
"<div class=\"overview-tile\" ng-if=\"pod.kind === 'Pod'\">\n" +
1153811536
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1153911537
"<div class=\"rc-header\"> \n" +
11540-
"<div>\n" +
11538+
"<div class=\"truncate\">\n" +
1154111539
"Pod\n" +
1154211540
"<a ng-href=\"{{pod | navigateResourceURL}}\">{{pod.metadata.name}}</a>\n" +
1154311541
"<small class=\"overview-timestamp\">\n" +
@@ -11626,12 +11624,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1162611624
"<div class=\"no-child-services-message\">\n" +
1162711625
"<div class=\"empty-tile\">\n" +
1162811626
"<h2>No grouped services.</h2>\n" +
11629-
"<p>\n" +
11630-
"No services are grouped with <a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>.\n" +
11627+
"No services are grouped with <div class=\"word-break-all\"><a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>.</div>\n" +
1163111628
"<span ng-if=\"(services | hashSize) > 1 && ('services' | canI : 'update')\">Add a service to group them together.</span>\n" +
11632-
"</p>\n" +
1163311629
"<div ng-if=\"(services | hashSize) > 1 && ('services' | canI : 'update')\">\n" +
11634-
"<button class=\"btn btn-primary\" ng-click=\"linkService()\">\n" +
11630+
"<button class=\"btn btn-primary mar-lg\" ng-click=\"linkService()\">\n" +
1163511631
"Group Service\n" +
1163611632
"</button>\n" +
1163711633
"</div>\n" +
@@ -11647,7 +11643,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1164711643

1164811644
$templateCache.put('views/overview/_service-header.html',
1164911645
"<div row class=\"service-title\" ng-if=\"service\">\n" +
11650-
"<div class=\"service-name\">\n" +
11646+
"<div class=\"service-name truncate\">\n" +
1165111647
"<span class=\"pficon pficon-service\" aria-hidden=\"true\" title=\"Service\"></span>\n" +
1165211648
"<span class=\"sr-only\">Service</span>\n" +
1165311649
"<a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>\n" +
@@ -11675,13 +11671,12 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1167511671

1167611672
$templateCache.put('views/overview/_service.html',
1167711673
"<div ng-if=\"!tileCount\" class=\"no-deployments-block\">\n" +
11678-
"<div column class=\"no-deployments-message\">\n" +
11674+
"<div column class=\"no-deployments-message overview-tile\">\n" +
1167911675
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1168011676
"<div class=\"empty-tile\">\n" +
1168111677
"<h2>No deployments or pods.</h2>\n" +
1168211678
"<p>\n" +
11683-
"Service\n" +
11684-
"<a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a>\n" +
11679+
"<div class=\"word-break-all\">Service <a ng-href=\"{{service | navigateResourceURL}}\">{{service.metadata.name}}</a></div>\n" +
1168511680
"does not route to any deployments or pods.\n" +
1168611681
"</p>\n" +
1168711682
"</div>\n" +
@@ -11728,7 +11723,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
1172811723
"<ng-include src=\"'views/overview/_service-header.html'\"></ng-include>\n" +
1172911724
"<div class=\"overview-tile-header\">\n" +
1173011725
"<div class=\"rc-header\">\n" +
11731-
"<div>\n" +
11726+
"<div class=\"truncate\">\n" +
1173211727
"{{set.kind | humanizeKind : true}}\n" +
1173311728
"<a ng-href=\"{{set | navigateResourceURL}}\">{{set.metadata.name}}</a>\n" +
1173411729
"<small class=\"overview-timestamp\">\n" +

0 commit comments

Comments
 (0)