Commit a517b30d by Torkel Ödegaard

filter panel styling

parent 78e8ab80
...@@ -3,13 +3,18 @@ ...@@ -3,13 +3,18 @@
.filtering-container { .filtering-container {
float: left; float: left;
} }
.filtering-container label {
float: left;
font-size: inherit;
}
.filtering-container input[type=checkbox] {
margin: 0;
}
.filter-panel-filter { .filter-panel-filter {
display:inline-block; display:inline-block;
vertical-align: top; vertical-align: top;
padding: 3px 10px 0px 10px; padding: 3px 10px 0px 10px;
margin: 0px 5px; border-right: 1px solid #202020;
border-left: 1px solid #111;
border-right: 1px solid #111;
} }
.filter-panel-filter ul { .filter-panel-filter ul {
margin-bottom: 3px; margin-bottom: 3px;
...@@ -25,6 +30,7 @@ ...@@ -25,6 +30,7 @@
margin-top: 4px; margin-top: 4px;
} }
.add-filter-action { .add-filter-action {
padding: 3px 10px 0px 10px;
position: relative; position: relative;
top: 4px; top: 4px;
} }
...@@ -38,9 +44,7 @@ ...@@ -38,9 +44,7 @@
</style> </style>
<div class='filtering-container'> <div class='filtering-container'>
<span ng-show="filterSrv.list.length == 0">
<h5>No filters available</h5>
</span>
<div ng-repeat="filter in filterSrv.list" class="small filter-panel-filter"> <div ng-repeat="filter in filterSrv.list" class="small filter-panel-filter">
<div> <div>
<i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(filter)"></i> <i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(filter)"></i>
...@@ -74,7 +78,8 @@ ...@@ -74,7 +78,8 @@
<input type='text' ng-model="filter.query"> <input type='text' ng-model="filter.query">
</li> </li>
<li> <li>
<strong>Include All</strong> : <input type='checkbox' ng-model="filter.includeAll"> <label for="includeAll">Include all</label>:
<input id="includeAll" type='checkbox' ng-model="filter.includeAll">
</li> </li>
</ul> </ul>
<div> <div>
......
...@@ -44,7 +44,8 @@ function (angular, app, _) { ...@@ -44,7 +44,8 @@ function (angular, app, _) {
if (filter.includeAll) { if (filter.includeAll) {
filter.options.unshift({text: 'All', value: '*'}); filter.options.unshift({text: 'All', value: '*'});
} }
filter.current = filter.options[0];
filterSrv.filterOptionSelected(filter, filter.options[0]);
}); });
}; };
......
...@@ -49,6 +49,10 @@ define([ ...@@ -49,6 +49,10 @@ define([
if (!self.filterTemplateData) { if (!self.filterTemplateData) {
self.filterTemplateData = {}; self.filterTemplateData = {};
_.each(self.list, function(filter) { _.each(self.list, function(filter) {
if (!filter.current || !filter.current.value) {
return;
}
self.filterTemplateData[filter.name] = filter.current.value; self.filterTemplateData[filter.name] = filter.current.value;
}); });
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
@grayDark: #303030; @grayDark: #303030;
@grayLighter: #BBBFC2; @grayLighter: #BBBFC2;
.navbar-static-top {
border-bottom: 1px solid black;
}
.grafana-dashboard-hide-controls { .grafana-dashboard-hide-controls {
padding: 0; padding: 0;
.extra, .grafana-row { .extra, .grafana-row {
...@@ -21,7 +25,7 @@ ...@@ -21,7 +25,7 @@
} }
.selected td, tr.selected:nth-child(odd)>td { .selected td, tr.selected:nth-child(odd)>td {
background: darken(@blue, 20%); background: @blue;
color: white; color: white;
text-shadow: -1px -1px 1px rgba(0,0,0,0.3); text-shadow: -1px -1px 1px rgba(0,0,0,0.3);
a { a {
...@@ -31,9 +35,15 @@ ...@@ -31,9 +35,15 @@
} }
.filter-pulldown { .filter-pulldown {
background: #444; background: rgba(31, 31, 31, 0.42);
border-top: 1px solid #111; border-top: 1px solid #444;
border-bottom: 1px solid #111; border-left: 1px solid @grayDarker;
border-right: 1px solid @grayDarker;
border-bottom: 1px solid @grayDarker;
}
.top-row-close {
border-right: 1px solid #202020;
} }
.top-row-open { .top-row-open {
......
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