mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into cloudwatch
This commit is contained in:
commit
3cbfe21b2c
@ -44,7 +44,10 @@ function (angular, _) {
|
|||||||
return '(' + value.join('|') + ')';
|
return '(' + value.join('|') + ')';
|
||||||
}
|
}
|
||||||
case "lucene": {
|
case "lucene": {
|
||||||
return '(' + value.join(' OR ') + ')';
|
var quotedValues = _.map(value, function(val) {
|
||||||
|
return '\\\"' + val + '\\\"';
|
||||||
|
});
|
||||||
|
return '(' + quotedValues.join(' OR ') + ')';
|
||||||
}
|
}
|
||||||
case "pipe": {
|
case "pipe": {
|
||||||
return value.join('|');
|
return value.join('|');
|
||||||
|
@ -262,7 +262,10 @@ function (angular, _, kbn) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'lucene': {
|
case 'lucene': {
|
||||||
allValue = '(' + _.pluck(variable.options, 'text').join(' OR ') + ')';
|
var quotedValues = _.map(variable.options, function(val) {
|
||||||
|
return '\\\"' + val.text + '\\\"';
|
||||||
|
});
|
||||||
|
allValue = '(' + quotedValues.join(' OR ') + ')';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'regex values': {
|
case 'regex values': {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="tight-form">
|
<div class="tight-form">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 80px">
|
<li class="tight-form-item" style="width: 80px">
|
||||||
<strong>Left Y</strong>
|
Left Y
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Unit
|
Unit
|
||||||
@ -46,10 +46,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tight-form">
|
<div class="tight-form last">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 80px">
|
<li class="tight-form-item" style="width: 80px">
|
||||||
<strong>Right Y</strong>
|
Right Y
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Unit
|
Unit
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<div class="tight-form">
|
<div class="tight-form">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 80px">
|
<li class="tight-form-item" style="width: 80px">
|
||||||
<strong>Show Axis</strong>
|
Show Axis
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
X-Axis
|
X-Axis
|
||||||
@ -114,10 +114,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tight-form">
|
<div class="tight-form last">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 80px">
|
<li class="tight-form-item" style="width: 80px">
|
||||||
<strong>Thresholds</strong>
|
Thresholds
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Level 1
|
Level 1
|
||||||
@ -140,11 +140,7 @@
|
|||||||
<spectrum-picker ng-model="panel.grid.threshold2Color" ng-change="render()" ></spectrum-picker>
|
<spectrum-picker ng-model="panel.grid.threshold2Color" ng-change="render()" ></spectrum-picker>
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item last">
|
<li class="tight-form-item last">
|
||||||
Line mode
|
<editor-checkbox text="Line mode" model="panel.grid.thresholdLine" change="render()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.grid.thresholdLine" type="checkbox"
|
|
||||||
ng-model="panel.grid.thresholdLine" ng-checked="panel.grid.thresholdLine" ng-change="render()">
|
|
||||||
<label for="panel.grid.thresholdLine" class="cr1"></label>
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
@ -157,31 +153,19 @@
|
|||||||
<div class="tight-form last">
|
<div class="tight-form last">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 110px">
|
<li class="tight-form-item" style="width: 110px">
|
||||||
<strong>Legend</strong>
|
Legend
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Show
|
<editor-checkbox text="Show" model="panel.legend.show" change="get_data()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.show" type="checkbox"
|
|
||||||
ng-model="panel.legend.show" ng-checked="panel.legend.show" ng-change="get_data()">
|
|
||||||
<label for="panel.legend.show" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Table
|
<editor-checkbox text="Table" model="panel.legend.alignAsTable" change="render()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.alignAsTable" type="checkbox"
|
|
||||||
ng-model="panel.legend.alignAsTable" ng-checked="panel.legend.alignAsTable" ng-change="render()">
|
|
||||||
<label for="panel.legend.alignAsTable" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Right side
|
<editor-checkbox text="Right side" model="panel.legend.rightSide" change="render()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.rightSide" type="checkbox"
|
|
||||||
ng-model="panel.legend.rightSide" ng-checked="panel.legend.rightSide" ng-change="render()">
|
|
||||||
<label for="panel.legend.rightSide" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item last">
|
<li class="tight-form-item last">
|
||||||
<span bs-tooltip="'Hides series with only null values'">Hide empty <span>
|
<editor-checkbox text="Hide empty" model="panel.legend.hideEmpty" change="render()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.hideEmpty" type="checkbox"
|
|
||||||
ng-model="panel.legend.hideEmpty" ng-checked="panel.legend.hideEmpty" ng-change="render()">
|
|
||||||
<label for="panel.legend.hideEmpty" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
@ -191,37 +175,22 @@
|
|||||||
<div class="tight-form">
|
<div class="tight-form">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 105px">
|
<li class="tight-form-item" style="width: 105px">
|
||||||
<strong>Legend values</strong>
|
Legend values
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Min
|
<editor-checkbox text="Min" model="panel.legend.min" change="legendValuesOptionChanged()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.min" type="checkbox"
|
|
||||||
ng-model="panel.legend.min" ng-checked="panel.legend.min" ng-change="legendValuesOptionChanged()">
|
|
||||||
<label for="panel.legend.min" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Max
|
<editor-checkbox text="Max" model="panel.legend.max" change="legendValuesOptionChanged()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.max" type="checkbox"
|
|
||||||
ng-model="panel.legend.max" ng-checked="panel.legend.max" ng-change="legendValuesOptionChanged()">
|
|
||||||
<label for="panel.legend.max" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Avg
|
<editor-checkbox text="Avg" model="panel.legend.avg" change="legendValuesOptionChanged()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.avg" type="checkbox"
|
|
||||||
ng-model="panel.legend.avg" ng-checked="panel.legend.avg" ng-change="legendValuesOptionChanged()">
|
|
||||||
<label for="panel.legend.avg" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Current
|
<editor-checkbox text="Current" model="panel.legend.current" change="legendValuesOptionChanged()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.current" type="checkbox"
|
|
||||||
ng-model="panel.legend.current" ng-checked="panel.legend.current" ng-change="legendValuesOptionChanged()">
|
|
||||||
<label for="panel.legend.current" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="tight-form-item last">
|
<li class="tight-form-item last">
|
||||||
Total
|
<editor-checkbox text="Total" model="panel.legend.total" change="legendValuesOptionChanged()"></editor-checkbox>
|
||||||
<input class="cr1" id="panel.legend.total" type="checkbox"
|
|
||||||
ng-model="panel.legend.total" ng-checked="panel.legend.total" ng-change="legendValuesOptionChanged()">
|
|
||||||
<label for="panel.legend.total" class="cr1"></label>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
@ -186,6 +186,14 @@ function (angular, app, _, kbn, TimeSeries, PanelMeta) {
|
|||||||
$scope.setValues = function(data) {
|
$scope.setValues = function(data) {
|
||||||
data.flotpairs = [];
|
data.flotpairs = [];
|
||||||
|
|
||||||
|
if($scope.series.length > 1) {
|
||||||
|
$scope.inspector.error = new Error();
|
||||||
|
$scope.inspector.error.message = 'Multiple Series Error';
|
||||||
|
$scope.inspector.error.data = 'Metric query returns ' + $scope.series.length +
|
||||||
|
' series. Single Stat Panel expects a single series.\n\nResponse:\n'+JSON.stringify($scope.series);
|
||||||
|
throw $scope.inspector.error;
|
||||||
|
}
|
||||||
|
|
||||||
if ($scope.series && $scope.series.length > 0) {
|
if ($scope.series && $scope.series.length > 0) {
|
||||||
var lastPoint = _.last($scope.series[0].datapoints);
|
var lastPoint = _.last($scope.series[0].datapoints);
|
||||||
var lastValue = _.isArray(lastPoint) ? lastPoint[0] : null;
|
var lastValue = _.isArray(lastPoint) ? lastPoint[0] : null;
|
||||||
|
@ -122,8 +122,8 @@ function (angular, app, _, $) {
|
|||||||
xaxis: {
|
xaxis: {
|
||||||
show: false,
|
show: false,
|
||||||
mode: "time",
|
mode: "time",
|
||||||
min: scope.range.from.getTime(),
|
min: scope.range.from.valueOf(),
|
||||||
max: scope.range.to.getTime(),
|
max: scope.range.to.valueOf(),
|
||||||
},
|
},
|
||||||
grid: { hoverable: false, show: false },
|
grid: { hoverable: false, show: false },
|
||||||
};
|
};
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gf-box-body">
|
<div class="gf-box-body">
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row-fluid" style="margin-bottom: 10px;">
|
||||||
<div class="span6">
|
<div class="span12">
|
||||||
<div style="display: inline-block">
|
<div style="display: inline-block">
|
||||||
<div class="tight-form">
|
<div class="tight-form last">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Search
|
Search
|
||||||
@ -28,13 +28,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="span6">
|
|
||||||
<h5>Playlist dashboards</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row-fluid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
|
<h5>Search result</h5>
|
||||||
<table class="grafana-options-table">
|
<table class="grafana-options-table">
|
||||||
<tr ng-repeat="dashboard in filteredHits">
|
<tr ng-repeat="dashboard in filteredHits">
|
||||||
<td style="white-space: nowrap;">
|
<td style="white-space: nowrap;">
|
||||||
@ -55,6 +53,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
|
<h5>Playlist dashboards</h5>
|
||||||
|
|
||||||
<table class="grafana-options-table">
|
<table class="grafana-options-table">
|
||||||
<tr ng-repeat="dashboard in playlist">
|
<tr ng-repeat="dashboard in playlist">
|
||||||
<td style="white-space: nowrap;">
|
<td style="white-space: nowrap;">
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<div class="tight-form">
|
<div class="tight-form last">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item">
|
||||||
Timespan between dashboard change
|
Timespan between dashboard change
|
||||||
|
@ -174,6 +174,7 @@ function (angular) {
|
|||||||
"1": {
|
"1": {
|
||||||
"terms": {
|
"terms": {
|
||||||
"field": queryDef.field,
|
"field": queryDef.field,
|
||||||
|
"size": 0,
|
||||||
"order": {
|
"order": {
|
||||||
"_term": "asc"
|
"_term": "asc"
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
@altFontFamily: @serifFontFamily;
|
@altFontFamily: @serifFontFamily;
|
||||||
|
|
||||||
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
||||||
@headingsFontWeight: normal; // instead of browser default, bold
|
@headingsFontWeight: bold; // instead of browser default, bold
|
||||||
@headingsColor: darken(@white,11%); // empty to use BS default, @textColor
|
@headingsColor: darken(@white,11%); // empty to use BS default, @textColor
|
||||||
@inputText: @black;
|
@inputText: @black;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
@altFontFamily: @serifFontFamily;
|
@altFontFamily: @serifFontFamily;
|
||||||
|
|
||||||
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
||||||
@headingsFontWeight: normal; // instead of browser default, bold
|
@headingsFontWeight: bold; // instead of browser default, bold
|
||||||
@headingsColor: @textColor; // empty to use BS default, @textColor
|
@headingsColor: @textColor; // empty to use BS default, @textColor
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ define([
|
|||||||
value: ['test','test2'],
|
value: ['test','test2'],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
expect(result).to.be('(test OR test2)');
|
expect(result).to.be('(\\\"test\\\" OR \\\"test2\\\")');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('multi value and regex format should render regex string', function() {
|
it('multi value and regex format should render regex string', function() {
|
||||||
|
@ -321,7 +321,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should add lucene glob', function() {
|
it('should add lucene glob', function() {
|
||||||
expect(scenario.variable.options[0].value).to.be('(backend1 OR backend2)');
|
expect(scenario.variable.options[0].value).to.be('(\\\"backend1\\\" OR \\\"backend2\\\")');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user