Commit 26c9a193 by Torkel Ödegaard

A lot of css style polish for submenu (template var selection, and new dashlinks)

parent 2c3aad78
<a class="pointer"> <a class="pointer dash-nav-link" bs-tooltip="'asd'">
<i class="fa fa-th-large"></i> <i class="fa fa-th-large"></i>
<span></span> <span></span>
</a> </a>
...@@ -32,6 +32,10 @@ function (angular, _) { ...@@ -32,6 +32,10 @@ function (angular, _) {
var linkInfo = linkSrv.getPanelLinkAnchorInfo(scope.link); var linkInfo = linkSrv.getPanelLinkAnchorInfo(scope.link);
elem.find("span").text(linkInfo.title); elem.find("span").text(linkInfo.title);
elem.find("a").attr("href", linkInfo.href); elem.find("a").attr("href", linkInfo.href);
if (scope.link.type === 'dashboard') {
scope.tooltip = 'Go to dashboard';
}
} }
update(); update();
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div class="tight-form borderless"> <div class="tight-form borderless">
<ul class="tight-form-list" ng-if="dashboard.templating.list.length > 0"> <ul class="tight-form-list" ng-if="dashboard.templating.list.length > 0">
<li ng-repeat="variable in variables" class="tight-form-item template-param-name dropdown"> <li ng-repeat="variable in variables" class="submenu-item">
<variable-value-select variable="variable" on-updated="variableUpdated(variable)"></variable-value-select> <variable-value-select variable="variable" on-updated="variableUpdated(variable)"></variable-value-select>
</li> </li>
</ul> </ul>
<ul class="tight-form-list" ng-if="dashboard.annotations.list.length > 0"> <ul class="tight-form-list" ng-if="dashboard.annotations.list.length > 0">
<li ng-repeat="annotation in dashboard.annotations.list" class="tight-form-item annotation-segment" ng-class="{'annotation-disabled': !annotation.enable}"> <li ng-repeat="annotation in dashboard.annotations.list" class="submenu-item annotation-segment" ng-class="{'annotation-disabled': !annotation.enable}">
<a ng-click="disableAnnotation(annotation)"> <a ng-click="disableAnnotation(annotation)">
<i class="fa fa-bolt"></i> <i class="fa fa-bolt"></i>
{{annotation.name}} {{annotation.name}}
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</ul> </ul>
<ul class="tight-form-list pull-right" ng-if="dashboard.links.length > 0"> <ul class="tight-form-list pull-right" ng-if="dashboard.links.length > 0">
<dash-link ng-repeat="link in dashboard.links" link="link" class="tight-form-item"></dash-link> <dash-link ng-repeat="link in dashboard.links" link="link" class="submenu-item"></dash-link>
</ul> </ul>
<div class="clearfix"></div> <div class="clearfix"></div>
......
...@@ -64,16 +64,17 @@ ...@@ -64,16 +64,17 @@
border-radius: 3px; border-radius: 3px;
font-size: 1.4em; font-size: 1.4em;
color: #a2a2a2; color: #a2a2a2;
border: @grafanaTriggerBorder; border: 1px solid @grafanaTargetFuncHightlight;
a { a {
.buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
display: inline-block; display: inline-block;
background: @grafanaTargetFuncBackground; //background: @btnInverseBackground;
padding: 5px 15px 5px 10px; padding: 5px 15px 5px 10px;
border-radius: 3px; border-radius: 3px;
color: #a2a2a2; color: #a2a2a2;
&:hover { &:hover {
background: @grafanaTargetFuncHightlight; background: @grafanaTargetFuncBackground;
.fa { .fa {
color: @linkColor; color: @linkColor;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
.submenu-controls { .submenu-controls {
margin: 10px 29px 1px 0px; margin: 10px 10px 8px 14px;
font-size: 16px; font-size: 16px;
} }
...@@ -19,9 +19,26 @@ ...@@ -19,9 +19,26 @@
} }
} }
.submenu-item {
padding: 8px 7px;
margin-right: 20px;
display: inline-block;
border-radius: 3px;
background-color: @grafanaPanelBackground;
border: @grafanaPanelBorder;
margin-right: 10px;
display: inline-block;
.fa-caret-down {
font-size: 75%;
position: relative;
top: 1px;
}
}
.variable-value-link { .variable-value-link {
font-size: 16px; font-size: 16px;
margin-right: 20px; padding-right: 10px;
} }
.variable-value-dropdown { .variable-value-dropdown {
...@@ -76,3 +93,5 @@ ...@@ -76,3 +93,5 @@
} }
} }
.dash-nav-link {
}
...@@ -82,24 +82,10 @@ ...@@ -82,24 +82,10 @@
background: @grafanaTargetFuncBackground; background: @grafanaTargetFuncBackground;
} }
&.template-param-name {
border-right: none;
padding-right: 0;
padding-left: 18px;
}
&.annotation-segment {
padding: 8px 13px;
}
&.last { &.last {
border-right: none; border-right: none;
} }
.fa-caret-down {
font-size: 75%;
position: relative;
top: 1px;
}
} }
.tight-form-item-icon { .tight-form-item-icon {
......
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