mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge remote-tracking branch 'origin/master' into develop
Conflicts: src/app/features/opentsdb/datasource.js
This commit is contained in:
commit
09f2950256
11
CHANGELOG.md
11
CHANGELOG.md
@ -6,9 +6,6 @@
|
||||
- [Issue #171](https://github.com/grafana/grafana/issues/171). Panel: Different time periods, panels can override dashboard relative time and/or add a time shift
|
||||
- [Issue #1488](https://github.com/grafana/grafana/issues/1488). Dashboard: Clone dashboard / Save as
|
||||
|
||||
**Changes**
|
||||
- Dashboard title change & save will no longer create a new dashboard, it will just change the title.
|
||||
|
||||
**Enhancements**
|
||||
- [Issue #1366](https://github.com/grafana/grafana/issues/1366). Graph & Singlestat: Support for additional units, Fahrenheit (°F) and Celsius (°C), Humidity (%H), kW, watt-hour (Wh), kilowatt-hour (kWh), velocities (m/s, km/h, mpg, knot)
|
||||
- [Issue #978](https://github.com/grafana/grafana/issues/978). Graph: Shared tooltip improvement, can now support metrics of different resolution/intervals
|
||||
@ -26,6 +23,14 @@
|
||||
- [Issue #1359](https://github.com/grafana/grafana/issues/1359). Graph: Fix for all series tooltip showing series with all null values when ``Hide Empty`` option is enabled
|
||||
- [Issue #1497](https://github.com/grafana/grafana/issues/1497). Dashboard: Fixed memory leak when switching dashboards
|
||||
|
||||
**Changes**
|
||||
- Dashboard title change & save will no longer create a new dashboard, it will just change the title.
|
||||
|
||||
**OpenTSDB breaking change**
|
||||
- [Issue #1438](https://github.com/grafana/grafana/issues/1438). OpenTSDB: Automatic downsample interval passed to OpenTSDB (depends on timespan and graph width)
|
||||
- NOTICE, Downsampling is now enabled by default, so if you have not picked a downsample aggregator in your metric query do so or your graphs will be missleading
|
||||
- This will make Grafana a lot quicker for OpenTSDB users when viewing large time spans without having to change the downsample interval manually.
|
||||
|
||||
**Tech**
|
||||
- [Issue #1311](https://github.com/grafana/grafana/issues/1311). Tech: Updated Font-Awesome from 3.2 to 4.2
|
||||
|
||||
|
@ -24,7 +24,16 @@ function (angular, _, kbn) {
|
||||
OpenTSDBDatasource.prototype.query = function(options) {
|
||||
var start = convertToTSDBTime(options.range.from);
|
||||
var end = convertToTSDBTime(options.range.to);
|
||||
var queries = _.compact(_.map(options.targets, convertTargetToQuery));
|
||||
var qs = [];
|
||||
|
||||
if (options.interval.match(/\.[0-9]+s/)) {
|
||||
options.interval = parseFloat(options.interval)*1000 + "ms";
|
||||
}
|
||||
_.each(options.targets, function(target) {
|
||||
qs.push(convertTargetToQuery(target, options.interval));
|
||||
});
|
||||
|
||||
var queries = _.compact(qs);
|
||||
|
||||
// No valid targets, return the empty result to save a round trip.
|
||||
if (_.isEmpty(queries)) {
|
||||
@ -119,7 +128,7 @@ function (angular, _, kbn) {
|
||||
return metric;
|
||||
}
|
||||
|
||||
function convertTargetToQuery(target) {
|
||||
function convertTargetToQuery(target, interval) {
|
||||
if (!target.metric || target.hide) {
|
||||
return null;
|
||||
}
|
||||
@ -148,8 +157,9 @@ function (angular, _, kbn) {
|
||||
}
|
||||
}
|
||||
|
||||
if (target.shouldDownsample) {
|
||||
query.downsample = templateSrv.replace(target.downsampleInterval) + "-" + target.downsampleAggregator;
|
||||
if (!target.disableDownsampling) {
|
||||
var buf = target.downsampleInterval || interval;
|
||||
query.downsample = templateSrv.replace(buf) + "-" + target.downsampleAggregator;
|
||||
}
|
||||
|
||||
query.tags = angular.copy(target.tags);
|
||||
|
@ -43,14 +43,18 @@
|
||||
</ul>
|
||||
|
||||
<ul class="tight-form-list" role="menu">
|
||||
<li class="tight-form-item" style="width: 86px">
|
||||
Metric
|
||||
</li>
|
||||
<li>
|
||||
<input type="text"
|
||||
class="tight-form-input"
|
||||
class="input-large tight-form-input"
|
||||
ng-model="target.metric"
|
||||
spellcheck='false'
|
||||
bs-typeahead="suggestMetrics"
|
||||
placeholder="metric name"
|
||||
data-min-length=0 data-items=100
|
||||
ng-model-onblur
|
||||
ng-blur="targetBlur()"
|
||||
>
|
||||
<a bs-tooltip="target.errors.metric"
|
||||
@ -75,49 +79,7 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item">
|
||||
Rate:
|
||||
<input type="checkbox"
|
||||
class="tight-form-checkbox"
|
||||
ng-model="target.shouldComputeRate"
|
||||
ng-change="targetBlur()"
|
||||
>
|
||||
</li>
|
||||
<li class="tight-form-item" ng-hide="!target.shouldComputeRate">
|
||||
Counter:
|
||||
<input type="checkbox"
|
||||
class="tight-form-checkbox"
|
||||
ng-disabled="!target.shouldComputeRate"
|
||||
ng-model="target.isCounter"
|
||||
ng-change="targetBlur()">
|
||||
</li>
|
||||
<li class="tight-form-item" ng-hide="!target.isCounter">
|
||||
Counter Max:
|
||||
</li>
|
||||
<li ng-hide="!target.isCounter">
|
||||
<input type="text"
|
||||
class="tight-form-input input-medium"
|
||||
ng-disabled="!target.shouldComputeRate"
|
||||
ng-model="target.counterMax"
|
||||
spellcheck='false'
|
||||
placeholder="Counter max value"
|
||||
ng-blur="targetBlur()"
|
||||
/>
|
||||
</li>
|
||||
<li class="tight-form-item" ng-hide="!target.isCounter">
|
||||
Counter Reset Value:
|
||||
</li>
|
||||
<li ng-hide="!target.isCounter">
|
||||
<input type="text"
|
||||
class="tight-form-input input-medium"
|
||||
ng-disabled="!target.shouldComputeRate"
|
||||
ng-model="target.counterResetValue"
|
||||
spellcheck='false'
|
||||
placeholder="Counter reset value"
|
||||
ng-blur="targetBlur()"
|
||||
/>
|
||||
</li>
|
||||
<li class="tight-form-item">
|
||||
<li class="tight-form-item">
|
||||
Alias:
|
||||
</li>
|
||||
<li>
|
||||
@ -137,32 +99,30 @@
|
||||
</div>
|
||||
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list" role="menu">
|
||||
<ul class="tight-form-list" role="menu">
|
||||
<li class="tight-form-item">
|
||||
<i class="fa fa-eye invisible"></i>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item" style="width: 86px">
|
||||
Down sample
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<input type="text"
|
||||
class="input-large tight-form-input"
|
||||
ng-model="target.downsampleInterval"
|
||||
ng-model-onblur
|
||||
ng-change="targetBlur()"
|
||||
placeholder="interval (empty = auto)"
|
||||
>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item">
|
||||
Downsample:
|
||||
<input type="checkbox"
|
||||
class="tight-form-checkbox"
|
||||
ng-model="target.shouldDownsample"
|
||||
ng-change="targetBlur(target)"
|
||||
>
|
||||
</li>
|
||||
|
||||
<li ng-hide="!target.shouldDownsample">
|
||||
<input type="text"
|
||||
class="input-small tight-form-input"
|
||||
ng-disabled="!target.shouldDownsample"
|
||||
ng-model="target.downsampleInterval"
|
||||
ng-change="targetBlur()"
|
||||
placeholder="interval"
|
||||
>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item" ng-hide="!target.shouldDownsample">
|
||||
Aggregator
|
||||
</li>
|
||||
|
||||
<li ng-hide="!target.shouldDownsample">
|
||||
<li>
|
||||
<select ng-model="target.downsampleAggregator"
|
||||
class="tight-form-input input-small"
|
||||
ng-options="agg for agg in aggregators"
|
||||
@ -170,8 +130,25 @@
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item">
|
||||
Tags:
|
||||
<li class="tight-form-item">
|
||||
Disable downsampling
|
||||
<input class="cr1" id="target.disableDownsampling" type="checkbox"
|
||||
ng-model="target.disableDownsampling" ng-checked="target.disableDownsampling" ng-change="targetBlur()">
|
||||
<label for="target.disableDownsampling" class="cr1"></label>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list" role="menu">
|
||||
<li class="tight-form-item">
|
||||
<i class="fa fa-eye invisible"></i>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item" style="width: 86px">
|
||||
Tags
|
||||
</li>
|
||||
<li ng-repeat="(key, value) in target.tags track by $index" class="tight-form-item">
|
||||
{{key}} = {{value}}
|
||||
@ -202,7 +179,7 @@
|
||||
ng-model="target.currentTagValue"
|
||||
placeholder="value">
|
||||
<a ng-click="addTag()">
|
||||
<i class="fa fa-plus"></i>
|
||||
add tag
|
||||
</a>
|
||||
<a bs-tooltip="target.errors.tags"
|
||||
style="color: rgb(229, 189, 28)"
|
||||
@ -213,5 +190,60 @@
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list" role="menu">
|
||||
<li class="tight-form-item">
|
||||
<i class="fa fa-eye invisible"></i>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item" style="width: 86px">
|
||||
Rate
|
||||
<input class="cr1" id="target.shouldComputeRate" type="checkbox"
|
||||
ng-model="target.shouldComputeRate" ng-checked="target.shouldComputeRate" ng-change="targetBlur()">
|
||||
<label for="target.shouldComputeRate" class="cr1"></label>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item" ng-hide="!target.shouldComputeRate">
|
||||
Counter
|
||||
<input class="cr1" id="target.isCounter" type="checkbox"
|
||||
ng-model="target.isCounter" ng-checked="target.isCounter" ng-change="targetBlur()">
|
||||
<label for="target.isCounter" class="cr1"></label>
|
||||
</li>
|
||||
|
||||
<li class="tight-form-item" ng-hide="!target.isCounter">
|
||||
Counter Max:
|
||||
</li>
|
||||
|
||||
<li ng-hide="!target.isCounter">
|
||||
<input type="text"
|
||||
class="tight-form-input input-small"
|
||||
ng-disabled="!target.shouldComputeRate"
|
||||
ng-model="target.counterMax"
|
||||
spellcheck='false'
|
||||
placeholder="max value"
|
||||
ng-model-onblur
|
||||
ng-blur="targetBlur()"
|
||||
/>
|
||||
</li>
|
||||
<li class="tight-form-item" ng-hide="!target.isCounter">
|
||||
Reset Value:
|
||||
</li>
|
||||
<li ng-hide="!target.isCounter">
|
||||
<input type="text"
|
||||
class="tight-form-input input-small"
|
||||
ng-disabled="!target.shouldComputeRate"
|
||||
ng-model="target.counterResetValue"
|
||||
spellcheck='false'
|
||||
placeholder="reset value"
|
||||
ng-model-onblur
|
||||
ng-blur="targetBlur()"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user