Commit 923e18b2 by Torkel Ödegaard

Small design change for the submenu (templating, annotations), #1503

parent 596dfc30
...@@ -14,7 +14,7 @@ function (angular, app, _, $) { ...@@ -14,7 +14,7 @@ function (angular, app, _, $) {
' class="tight-form-clear-input input-medium"' + ' class="tight-form-clear-input input-medium"' +
' spellcheck="false" style="display:none"></input>'; ' spellcheck="false" style="display:none"></input>';
var buttonTemplate = '<a class="tight-form-item tabindex="1">{{variable.current.text}}</a>'; var buttonTemplate = '<a class="tight-form-item tabindex="1">{{variable.current.text}} <i class="fa fa-caret-down"></i></a>';
return { return {
link: function($scope, elem) { link: function($scope, elem) {
......
<div class="submenu-controls" ng-controller="SubmenuCtrl"> <div class="submenu-controls" ng-controller="SubmenuCtrl">
<div class="tight-form" style="border-top: none"> <div class="tight-form borderless">
<ul class="tight-form-list" ng-if="dashboard.templating.enable"> <ul class="tight-form-list" ng-if="dashboard.templating.enable">
<li class="tight-form-item">
<strong>Variables:</strong>
</li>
<li ng-repeat-start="variable in variables" class="tight-form-item template-param-name"> <li ng-repeat-start="variable in variables" class="tight-form-item template-param-name">
<span class="template-variable "> <span class="template-variable ">
${{variable.name}}: ${{variable.name}}:
...@@ -13,6 +16,7 @@ ...@@ -13,6 +16,7 @@
</ul> </ul>
<ul class="tight-form-list" ng-if="dashboard.annotations.enable"> <ul class="tight-form-list" ng-if="dashboard.annotations.enable">
<strong>ANNOTATIONS</strong>
<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="tight-form-item annotation-segment" ng-class="{'annotation-disabled': !annotation.enable}">
<a ng-click="disableAnnotation(annotation)"> <a ng-click="disableAnnotation(annotation)">
<i class="annotation-color-icon fa fa-bolt"></i> <i class="annotation-color-icon fa fa-bolt"></i>
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
} }
} }
.submenu-controls {
margin: 5px 5px 0 10px;
}
.annotation-disabled, .annotation-disabled a { .annotation-disabled, .annotation-disabled a {
color: @linkColorDisabled; color: @linkColorDisabled;
} }
......
...@@ -12,6 +12,18 @@ ...@@ -12,6 +12,18 @@
&:last-child, &.last { &:last-child, &.last {
border-bottom: 1px solid @grafanaTargetBorder; border-bottom: 1px solid @grafanaTargetBorder;
} }
&.borderless {
background: transparent;
border: none;
}
}
.borderless {
.tight-form-item,
.tight-form-input {
border: none;
}
} }
.tight-form-container { .tight-form-container {
...@@ -27,7 +39,6 @@ ...@@ -27,7 +39,6 @@
padding: 8px 12px; padding: 8px 12px;
} }
// old graphite-segment-list
.tight-form-list { .tight-form-list {
list-style: none; list-style: none;
margin: 0; margin: 0;
...@@ -40,7 +51,6 @@ ...@@ -40,7 +51,6 @@
margin-top: 35px; margin-top: 35px;
} }
// old grafana-target-segment {
.tight-form-item { .tight-form-item {
padding: 8px 7px; padding: 8px 7px;
display: inline-block; display: inline-block;
...@@ -53,7 +63,6 @@ ...@@ -53,7 +63,6 @@
padding-top: 25px; padding-top: 25px;
} }
// old .grafana-target-hidden & {
.tight-form-disabled & { .tight-form-disabled & {
color: @grafanaTargetColorHide; color: @grafanaTargetColorHide;
} }
...@@ -77,9 +86,14 @@ ...@@ -77,9 +86,14 @@
&.last { &.last {
border-right: none; border-right: none;
} }
.fa-caret-down {
font-size: 75%;
position: relative;
top: 1px;
}
} }
//.grafana-target-segment-icon {
.tight-form-item-icon { .tight-form-item-icon {
i { i {
width: 15px; width: 15px;
...@@ -88,7 +102,6 @@ ...@@ -88,7 +102,6 @@
} }
} }
//.grafana-target-function {
.tight-form-func { .tight-form-func {
background: @grafanaTargetFuncBackground; background: @grafanaTargetFuncBackground;
> a { > a {
...@@ -105,7 +118,6 @@ ...@@ -105,7 +118,6 @@
} }
} }
//input[type=text].grafana-function-param-input {
input[type=text].tight-form-func-param { input[type=text].tight-form-func-param {
background: transparent; background: transparent;
border: none; border: none;
...@@ -113,7 +125,6 @@ input[type=text].tight-form-func-param { ...@@ -113,7 +125,6 @@ input[type=text].tight-form-func-param {
padding: 0; padding: 0;
} }
//input[type=text].grafana-target-text-input {
input[type=text].tight-form-clear-input { input[type=text].tight-form-clear-input {
padding: 8px 7px; padding: 8px 7px;
border: none; border: none;
...@@ -142,7 +153,6 @@ input[type=text].tight-form-clear-input { ...@@ -142,7 +153,6 @@ input[type=text].tight-form-clear-input {
} }
} }
//input[type=checkbox].grafana-target-option-checkbox {
input[type=checkbox].tight-form-checkbox { input[type=checkbox].tight-form-checkbox {
margin: 0; margin: 0;
} }
...@@ -159,7 +169,6 @@ select.tight-form-input { ...@@ -159,7 +169,6 @@ select.tight-form-input {
} }
} }
//.graphite-func-controls {
.tight-form-func-controls { .tight-form-func-controls {
display: none; display: none;
text-align: center; text-align: center;
......
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