Skip to content

Commit

Permalink
Merge pull request #1712 from rhamilto/issue-1699
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Jun 26, 2017
2 parents 066938a + 1c80c6b commit d0e24f5
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 5 deletions.
9 changes: 9 additions & 0 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,15 @@ angular
// content (e.g. using :before pseudo-elements).
$('body').addClass('ios');
}
})
.run(function($rootScope){
// if the service catalog landing page is enabled,
// set global variable for use in views
// and add class to body
if (_.get(window, 'OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.service_catalog_landing_page')) {
$rootScope.globalTechPreviewIndicator = true;
$('body').addClass('tech-preview');
}
});

hawtioPluginLoader.addModule('openshiftConsole');
6 changes: 5 additions & 1 deletion app/styles/_catalog.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
}

@media(min-width: @screen-sm-min) {
.catalog-search, .landing-side-bar {
.catalog-search,
.landing-side-bar {
top: @navbar-os-header-height-desktop + 1; // add 1 for the bottom border
.tech-preview & {
top: @navbar-os-header-height-desktop + 1 + @tech-preview-banner-height; // add 1 for the bottom border
}
}
}
3 changes: 3 additions & 0 deletions app/styles/_log.less
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
@media (min-width: @screen-sm-min) {
right: @log-scroll-top-offset-right-sm;
top: (@log-scroll-offset-top + @navbar-os-header-height-desktop);
.tech-preview & {
top: (@log-scroll-offset-top + @navbar-os-header-height-desktop + @tech-preview-banner-height);
}
}
@media (min-width: @screen-md-min) {
right: @log-scroll-top-offset-right-lg;
Expand Down
17 changes: 17 additions & 0 deletions app/styles/_navbar-alt.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
top: 0;
z-index: @zindex-navbar-fixed;
}
.layout-pf-alt-fixed .tech-preview & {
top: @tech-preview-banner-height;
}
.navbar-toggle {
float: none;
margin: 0;
Expand Down Expand Up @@ -350,3 +353,17 @@
}
}
}


.tech-preview-banner {
background: @brand-warning;
color: @color-pf-white;
font-size: 12px;
text-align: center;
text-transform: uppercase;
width: 100%;
z-index: @zindex-navbar-fixed;
@media (min-width: @screen-sm-min) {
position: fixed;
}
}
21 changes: 17 additions & 4 deletions app/styles/_substructure.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ html,body {
}
.console-os {
background-color: @body-bg;
&.tech-preview .top-header {
height: @navbar-os-header-height-mobile + @tech-preview-banner-height;
}
.top-header {
display: flex;
position:relative;
position: relative;
height: @navbar-os-header-height-mobile;

}
.wrap {
display: flex;
Expand Down Expand Up @@ -106,11 +110,20 @@ html,body {
/* width: inherit; used if parent is using width: can't use 100% or auto */
}
.console-os {
&.tech-preview {
.top-header {
height: @navbar-os-header-height-desktop + @tech-preview-banner-height;
}
.wrap {
margin-top: -(@navbar-os-header-height-desktop + @tech-preview-banner-height); /* top offset height */
padding-top: @navbar-os-header-height-desktop + @tech-preview-banner-height; /* top offset height */
}
}
.wrap {
flex-direction: row;
margin-top:-@navbar-os-header-height-desktop; /* top offset height */
overflow:hidden;
padding-top:@navbar-os-header-height-desktop; /* top offset height */
margin-top: -@navbar-os-header-height-desktop; /* top offset height */
overflow: hidden;
padding-top: @navbar-os-header-height-desktop; /* top offset height */
&.no-sidebar {
.sidebar-left {
display: none !important;
Expand Down
1 change: 1 addition & 0 deletions app/styles/_variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
@scrollbar-width: 15px;
@status-bg-color: #E6ECF1;
@status-border-color: #BFCEDB;
@tech-preview-banner-height: 20px;
@tileHeadingIconFontSize: 33px;
@tooltip-bg: #111;

Expand Down
1 change: 1 addition & 0 deletions app/views/directives/header/_tech-preview-banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Technology preview is enabled
1 change: 1 addition & 0 deletions app/views/directives/header/default-header.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<ng-include ng-if="globalTechPreviewIndicator" src="'views/directives/header/_tech-preview-banner.html'" class="tech-preview-banner"></ng-include>
<nav class="navbar navbar-pf-alt" role="navigation">
<div row>
<div class="navbar-header">
Expand Down
1 change: 1 addition & 0 deletions app/views/directives/header/project-header.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<ng-include ng-if="globalTechPreviewIndicator" src="'views/directives/header/_tech-preview-banner.html'" class="tech-preview-banner"></ng-include>
<nav class="navbar navbar-pf-alt" role="navigation">
<div class="navbar-header hidden-xs">
<a class="navbar-home" href="./"><span class="fa-fw pficon pficon-home" aria-hidden="true"></span>
Expand Down
2 changes: 2 additions & 0 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,8 @@ return h ? b(e, null) || d :a(e, null, f, g) || d;
}, 1e3);
} ]).run([ "IS_IOS", function(a) {
a && $("body").addClass("ios");
} ]).run([ "$rootScope", function(a) {
_.get(window, "OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.service_catalog_landing_page") && (a.globalTechPreviewIndicator = !0, $("body").addClass("tech-preview"));
} ]), hawtioPluginLoader.addModule("openshiftConsole"), angular.module("openshiftConsole").factory("APIDiscovery", [ "LOGGING_URL", "METRICS_URL", "$q", function(a, b, c) {
return {
getLoggingURL:function() {
Expand Down
7 changes: 7 additions & 0 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -7021,7 +7021,13 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
);


$templateCache.put('views/directives/header/_tech-preview-banner.html',
"Technology preview is enabled"
);


$templateCache.put('views/directives/header/default-header.html',
"<ng-include ng-if=\"globalTechPreviewIndicator\" src=\"'views/directives/header/_tech-preview-banner.html'\" class=\"tech-preview-banner\"></ng-include>\n" +
"<nav class=\"navbar navbar-pf-alt\" role=\"navigation\">\n" +
"<div row>\n" +
"<div class=\"navbar-header\">\n" +
Expand All @@ -7048,6 +7054,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/directives/header/project-header.html',
"<ng-include ng-if=\"globalTechPreviewIndicator\" src=\"'views/directives/header/_tech-preview-banner.html'\" class=\"tech-preview-banner\"></ng-include>\n" +
"<nav class=\"navbar navbar-pf-alt\" role=\"navigation\">\n" +
"<div class=\"navbar-header hidden-xs\">\n" +
"<a class=\"navbar-home\" href=\"./\"><span class=\"fa-fw pficon pficon-home\" aria-hidden=\"true\"></span>\n" +
Expand Down
8 changes: 8 additions & 0 deletions dist/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0e24f5

Please sign in to comment.