Skip to content

Commit d0e24f5

Browse files
author
OpenShift Bot
authored
Merge pull request #1712 from rhamilto/issue-1699
Merged by openshift-bot
2 parents 066938a + 1c80c6b commit d0e24f5

12 files changed

+72
-5
lines changed

app/scripts/app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,15 @@ angular
495495
// content (e.g. using :before pseudo-elements).
496496
$('body').addClass('ios');
497497
}
498+
})
499+
.run(function($rootScope){
500+
// if the service catalog landing page is enabled,
501+
// set global variable for use in views
502+
// and add class to body
503+
if (_.get(window, 'OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.service_catalog_landing_page')) {
504+
$rootScope.globalTechPreviewIndicator = true;
505+
$('body').addClass('tech-preview');
506+
}
498507
});
499508

500509
hawtioPluginLoader.addModule('openshiftConsole');

app/styles/_catalog.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
}
4646

4747
@media(min-width: @screen-sm-min) {
48-
.catalog-search, .landing-side-bar {
48+
.catalog-search,
49+
.landing-side-bar {
4950
top: @navbar-os-header-height-desktop + 1; // add 1 for the bottom border
51+
.tech-preview & {
52+
top: @navbar-os-header-height-desktop + 1 + @tech-preview-banner-height; // add 1 for the bottom border
53+
}
5054
}
5155
}

app/styles/_log.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@
123123
@media (min-width: @screen-sm-min) {
124124
right: @log-scroll-top-offset-right-sm;
125125
top: (@log-scroll-offset-top + @navbar-os-header-height-desktop);
126+
.tech-preview & {
127+
top: (@log-scroll-offset-top + @navbar-os-header-height-desktop + @tech-preview-banner-height);
128+
}
126129
}
127130
@media (min-width: @screen-md-min) {
128131
right: @log-scroll-top-offset-right-lg;

app/styles/_navbar-alt.less

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
top: 0;
2828
z-index: @zindex-navbar-fixed;
2929
}
30+
.layout-pf-alt-fixed .tech-preview & {
31+
top: @tech-preview-banner-height;
32+
}
3033
.navbar-toggle {
3134
float: none;
3235
margin: 0;
@@ -350,3 +353,17 @@
350353
}
351354
}
352355
}
356+
357+
358+
.tech-preview-banner {
359+
background: @brand-warning;
360+
color: @color-pf-white;
361+
font-size: 12px;
362+
text-align: center;
363+
text-transform: uppercase;
364+
width: 100%;
365+
z-index: @zindex-navbar-fixed;
366+
@media (min-width: @screen-sm-min) {
367+
position: fixed;
368+
}
369+
}

app/styles/_substructure.less

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ html,body {
1111
}
1212
.console-os {
1313
background-color: @body-bg;
14+
&.tech-preview .top-header {
15+
height: @navbar-os-header-height-mobile + @tech-preview-banner-height;
16+
}
1417
.top-header {
1518
display: flex;
16-
position:relative;
19+
position: relative;
1720
height: @navbar-os-header-height-mobile;
21+
1822
}
1923
.wrap {
2024
display: flex;
@@ -106,11 +110,20 @@ html,body {
106110
/* width: inherit; used if parent is using width: can't use 100% or auto */
107111
}
108112
.console-os {
113+
&.tech-preview {
114+
.top-header {
115+
height: @navbar-os-header-height-desktop + @tech-preview-banner-height;
116+
}
117+
.wrap {
118+
margin-top: -(@navbar-os-header-height-desktop + @tech-preview-banner-height); /* top offset height */
119+
padding-top: @navbar-os-header-height-desktop + @tech-preview-banner-height; /* top offset height */
120+
}
121+
}
109122
.wrap {
110123
flex-direction: row;
111-
margin-top:-@navbar-os-header-height-desktop; /* top offset height */
112-
overflow:hidden;
113-
padding-top:@navbar-os-header-height-desktop; /* top offset height */
124+
margin-top: -@navbar-os-header-height-desktop; /* top offset height */
125+
overflow: hidden;
126+
padding-top: @navbar-os-header-height-desktop; /* top offset height */
114127
&.no-sidebar {
115128
.sidebar-left {
116129
display: none !important;

app/styles/_variables.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
@scrollbar-width: 15px;
106106
@status-bg-color: #E6ECF1;
107107
@status-border-color: #BFCEDB;
108+
@tech-preview-banner-height: 20px;
108109
@tileHeadingIconFontSize: 33px;
109110
@tooltip-bg: #111;
110111

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Technology preview is enabled

app/views/directives/header/default-header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<ng-include ng-if="globalTechPreviewIndicator" src="'views/directives/header/_tech-preview-banner.html'" class="tech-preview-banner"></ng-include>
12
<nav class="navbar navbar-pf-alt" role="navigation">
23
<div row>
34
<div class="navbar-header">

app/views/directives/header/project-header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<ng-include ng-if="globalTechPreviewIndicator" src="'views/directives/header/_tech-preview-banner.html'" class="tech-preview-banner"></ng-include>
12
<nav class="navbar navbar-pf-alt" role="navigation">
23
<div class="navbar-header hidden-xs">
34
<a class="navbar-home" href="./"><span class="fa-fw pficon pficon-home" aria-hidden="true"></span>

dist/scripts/scripts.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,8 @@ return h ? b(e, null) || d :a(e, null, f, g) || d;
11661166
}, 1e3);
11671167
} ]).run([ "IS_IOS", function(a) {
11681168
a && $("body").addClass("ios");
1169+
} ]).run([ "$rootScope", function(a) {
1170+
_.get(window, "OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.service_catalog_landing_page") && (a.globalTechPreviewIndicator = !0, $("body").addClass("tech-preview"));
11691171
} ]), hawtioPluginLoader.addModule("openshiftConsole"), angular.module("openshiftConsole").factory("APIDiscovery", [ "LOGGING_URL", "METRICS_URL", "$q", function(a, b, c) {
11701172
return {
11711173
getLoggingURL:function() {

dist/scripts/templates.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7021,7 +7021,13 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
70217021
);
70227022

70237023

7024+
$templateCache.put('views/directives/header/_tech-preview-banner.html',
7025+
"Technology preview is enabled"
7026+
);
7027+
7028+
70247029
$templateCache.put('views/directives/header/default-header.html',
7030+
"<ng-include ng-if=\"globalTechPreviewIndicator\" src=\"'views/directives/header/_tech-preview-banner.html'\" class=\"tech-preview-banner\"></ng-include>\n" +
70257031
"<nav class=\"navbar navbar-pf-alt\" role=\"navigation\">\n" +
70267032
"<div row>\n" +
70277033
"<div class=\"navbar-header\">\n" +
@@ -7048,6 +7054,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
70487054

70497055

70507056
$templateCache.put('views/directives/header/project-header.html',
7057+
"<ng-include ng-if=\"globalTechPreviewIndicator\" src=\"'views/directives/header/_tech-preview-banner.html'\" class=\"tech-preview-banner\"></ng-include>\n" +
70517058
"<nav class=\"navbar navbar-pf-alt\" role=\"navigation\">\n" +
70527059
"<div class=\"navbar-header hidden-xs\">\n" +
70537060
"<a class=\"navbar-home\" href=\"./\"><span class=\"fa-fw pficon pficon-home\" aria-hidden=\"true\"></span>\n" +

dist/styles/main.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)