Skip to content

Commit 1b1696d

Browse files
committed
Adjust pipeline-stage widths to accomodate more stages based on browser widths.
Fixes openshift#925
1 parent 8bca523 commit 1b1696d

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

app/styles/_pipeline.less

+20-6
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@
145145
text-align: center;
146146
}
147147
// hide arrow on last stage
148-
&:last-child:before {
149-
display: none;
148+
&:last-child {
149+
&:before {
150+
display: none;
151+
}
152+
150153
}
151154
&.no-stages {
152155
align-items: center;
@@ -261,7 +264,7 @@
261264
.pipeline .pipeline-stage {
262265
padding-right: (@pipeline-padding * 5.2);
263266
padding-bottom: (@pipeline-padding + 5);
264-
width: 50%;
267+
width: calc(100% / 2);
265268
&:before {
266269
bottom: auto;
267270
content: '\2192';
@@ -286,21 +289,32 @@
286289
.build-summary {
287290
border-bottom-width: 0;
288291
border-right: 1px solid @build-pipeline-border-color;
289-
.flex(@columns: 0 0 175px);
292+
.flex(@columns: 0 0 135px);
290293
.flex-direction(@direction: column);
291294
.justify-content(@justify: center);
292295
}
293296
}
294297

295298
@media (min-width: @screen-md-min) {
296299
.pipeline .pipeline-stage {
297-
width: 33.333333%;
300+
width: calc(100% / 4);
298301
}
299302
}
300303

301304
@media (min-width: @screen-lg-min) {
302305
.pipeline .pipeline-stage {
303-
width: 25%;
306+
width: calc(100% / 5);
307+
}
308+
}
309+
@media (min-width: (@screen-lg-min + 200)) {
310+
.pipeline .pipeline-stage {
311+
width: calc(100% / 6);
312+
}
313+
}
314+
315+
@media (min-width: @screen-xlg-min) {
316+
.pipeline .pipeline-stage {
317+
width: calc(100% / 7);
304318
}
305319
}
306320

app/views/directives/_build-pipeline-expanded.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<div class="pipeline">
3232
<div class="pipeline-stage" ng-repeat="stage in jenkinsStatus.stages track by stage.id">
3333
<div column class="pipeline-stage-column">
34-
<div class="pipeline-stage-name" ng-class="build.status.phase">
34+
<div title="{{stage.name}}" class="pipeline-stage-name" ng-class="build.status.phase">
3535
{{stage.name}}
3636
</div>
3737
<pipeline-status ng-if="stage.status" status="stage.status"></pipeline-status>

dist/scripts/templates.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5242,7 +5242,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
52425242
"<div class=\"pipeline\">\n" +
52435243
"<div class=\"pipeline-stage\" ng-repeat=\"stage in jenkinsStatus.stages track by stage.id\">\n" +
52445244
"<div column class=\"pipeline-stage-column\">\n" +
5245-
"<div class=\"pipeline-stage-name\" ng-class=\"build.status.phase\">\n" +
5245+
"<div title=\"{{stage.name}}\" class=\"pipeline-stage-name\" ng-class=\"build.status.phase\">\n" +
52465246
"{{stage.name}}\n" +
52475247
"</div>\n" +
52485248
"<pipeline-status ng-if=\"stage.status\" status=\"stage.status\"></pipeline-status>\n" +

dist/styles/main.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -4570,18 +4570,22 @@ to{background-color:transparent}
45704570
.build-summary,.stage{text-align:center}
45714571
.build-summary{border-bottom:1px solid #d1d1d1;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:-ms-flex;display:flex;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-moz-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:space-around;-moz-justify-content:space-around;justify-content:space-around;padding:5px;position:relative}
45724572
.build-timestamp{color:#9c9c9c}
4573-
@media (min-width:400px){.pipeline .pipeline-stage{padding-right:52px;padding-bottom:15px;width:50%}
4573+
@media (min-width:400px){.pipeline .pipeline-stage{padding-right:52px;padding-bottom:15px;width:calc(50%)}
45744574
.pipeline .pipeline-stage:before{bottom:auto;content:'\2192';left:auto;right:10px;top:37%}
45754575
}
45764576
@media (min-width:600px){.build-links,.build-timestamp{padding-top:0}
45774577
.build-pipeline{-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:-ms-flex;display:flex}
45784578
.build-pipeline .build-name{white-space:nowrap}
4579-
.build-summary{border-bottom-width:0;border-right:1px solid #d1d1d1;-webkit-flex:0 0 175px;-moz-flex:0 0 175px;-ms-flex:0 0 175px;flex:0 0 175px;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center}
4579+
.build-summary{border-bottom-width:0;border-right:1px solid #d1d1d1;-webkit-flex:0 0 135px;-moz-flex:0 0 135px;-ms-flex:0 0 135px;flex:0 0 135px;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center}
45804580
}
45814581
.console-os .top-header,.pipeline-status-bar{display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:-ms-flex}
4582-
@media (min-width:992px){.pipeline .pipeline-stage{width:33.333333%}
4582+
@media (min-width:992px){.pipeline .pipeline-stage{width:calc(25%)}
45834583
}
4584-
@media (min-width:1200px){.pipeline .pipeline-stage{width:25%}
4584+
@media (min-width:1200px){.pipeline .pipeline-stage{width:calc(20%)}
4585+
}
4586+
@media (min-width:1400px){.pipeline .pipeline-stage{width:calc(16.66666667%)}
4587+
}
4588+
@media (min-width:1600px){.pipeline .pipeline-stage{width:calc(14.28571429%)}
45854589
}
45864590
.pipeline-status-bar .clip1:before,.pipeline-status-bar .clip2:before,.pipeline-status-bar .pipeline-line:before{background-color:#d1d1d1}
45874591
.pipeline-status-bar .inner-circle-fill{background-color:#fff;opacity:0}

0 commit comments

Comments
 (0)