Commit cc4fdd6d by Torkel Ödegaard

ux(): fixed issue with cach buster for temlpates, and updated on hover style for…

ux(): fixed issue with cach buster for temlpates, and updated on hover style for sidemenu to look better
parent 3781a099
...@@ -48,11 +48,14 @@ export class GrafanaApp { ...@@ -48,11 +48,14 @@ export class GrafanaApp {
this.registerFunctions.service = $provide.service; this.registerFunctions.service = $provide.service;
this.registerFunctions.filter = $filterProvider.register; this.registerFunctions.filter = $filterProvider.register;
$provide.decorator("$http", ["$delegate", function($delegate) { $provide.decorator("$http", ["$delegate", "$templateCache", function($delegate, $templateCache) {
var get = $delegate.get; var get = $delegate.get;
$delegate.get = function(url, config) { $delegate.get = function(url, config) {
if (url.match(/\.html$/)) { if (url.match(/\.html$/)) {
url += "?v=" + new Date().getTime(); // some template's already exist in the cache
if (!$templateCache.get(url)) {
url += "?v=" + new Date().getTime();
}
} }
return get(url, config); return get(url, config);
}; };
......
...@@ -166,8 +166,8 @@ $dropdownLinkColor: $text-color; ...@@ -166,8 +166,8 @@ $dropdownLinkColor: $text-color;
$dropdownLinkColorHover: $white; $dropdownLinkColorHover: $white;
$dropdownLinkColorActive: $white; $dropdownLinkColorActive: $white;
$dropdownLinkBackgroundActive: $blue-dark; $dropdownLinkBackgroundActive: $dark-4;
$dropdownLinkBackgroundHover: $blue-dark; $dropdownLinkBackgroundHover: $dark-4;
// COMPONENT VARIABLES // COMPONENT VARIABLES
...@@ -206,7 +206,7 @@ $navbarButtonBackgroundHighlight: lighten($navbarBackground, 5%); ...@@ -206,7 +206,7 @@ $navbarButtonBackgroundHighlight: lighten($navbarBackground, 5%);
// Sidemenu // Sidemenu
// ------------------------- // -------------------------
$side-menu-bg: $body-bg; $side-menu-bg: $body-bg;
$side-menu-item-hover-bg: $dark-4; $side-menu-item-hover-bg: $dark-3;
$side-menu-opacity: 0.97; $side-menu-opacity: 0.97;
// Pagination // Pagination
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
white-space: nowrap; white-space: nowrap;
background-color: $grafanaListBackground; background-color: $grafanaListBackground;
margin-bottom: 4px; margin-bottom: 4px;
.search-result-icon:before { .search-result-icon:before {
content: "\f009"; content: "\f009";
} }
......
...@@ -58,8 +58,12 @@ ...@@ -58,8 +58,12 @@
li { li {
position: relative; position: relative;
@include left-brand-border();
&:hover { &:hover {
background-color: $side-menu-item-hover-bg;
@include left-brand-border-gradient();
.dropdown-menu { .dropdown-menu {
display: block; display: block;
opacity: 0; opacity: 0;
...@@ -125,10 +129,8 @@ ...@@ -125,10 +129,8 @@
line-height: 47px; line-height: 47px;
padding: 0px 10px 0px 10px; padding: 0px 10px 0px 10px;
display: block; display: block;
border-left: 1px solid transparent;
&:hover {
background-color: $side-menu-item-hover-bg;
}
.sidemenu-item-text { .sidemenu-item-text {
padding-left: 11px; padding-left: 11px;
...@@ -180,9 +182,6 @@ ...@@ -180,9 +182,6 @@
padding: 17px 10px 15px 14px; padding: 17px 10px 15px 14px;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
&:hover {
background-color: $side-menu-item-hover-bg;
}
display: table; display: table;
position: relative; position: relative;
width: 100%; width: 100%;
......
...@@ -331,4 +331,16 @@ ...@@ -331,4 +331,16 @@
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
} }
@mixin left-brand-border() {
border-left: 1px solid transparent;
}
@mixin left-brand-border-gradient() {
border-left: 1px solid transparent;
border-image: linear-gradient(rgba(255,213,0,1) 0%, rgba(255,68,0,1) 99%, rgba(255,68,0,1) 100%);
border-image-slice: 1;
border-top: 0;
border-right: 0;
border-bottom: 0;
border-left: 1px solid transparent;
}
...@@ -30458,4 +30458,4 @@ $provide.value("$locale", { ...@@ -30458,4 +30458,4 @@ $provide.value("$locale", {
})(window, document); })(window, document);
!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); !window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment