mirror of https://github.com/grafana/grafana.git
feat(elasticsearch): added unit option to derivative metric, closes #3512
This commit is contained in:
parent
b63471ebe9
commit
aca9d3965d
|
@ -1,3 +1,8 @@
|
||||||
|
# 2.6.1
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
* **Elasticsearch**: Support for derivative unit option, closes [#3512](https://github.com/grafana/grafana/issues/3512)
|
||||||
|
|
||||||
# 2.6.0 (2015-12-14)
|
# 2.6.0 (2015-12-14)
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
|
@ -82,8 +82,12 @@ function (_, queryDef) {
|
||||||
|
|
||||||
value = bucket[metric.id];
|
value = bucket[metric.id];
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
|
if (value.normalized_value) {
|
||||||
|
newSeries.datapoints.push([value.normalized_value, bucket.key]);
|
||||||
|
} else {
|
||||||
newSeries.datapoints.push([value.value, bucket.key]);
|
newSeries.datapoints.push([value.value, bucket.key]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
seriesList.push(newSeries);
|
seriesList.push(newSeries);
|
||||||
|
|
|
@ -39,6 +39,18 @@
|
||||||
|
|
||||||
<div class="tight-form" ng-if="showOptions">
|
<div class="tight-form" ng-if="showOptions">
|
||||||
<div class="tight-form-inner-box tight-form-container">
|
<div class="tight-form-inner-box tight-form-container">
|
||||||
|
<div class="tight-form" ng-if="agg.type === 'derivative'">
|
||||||
|
<ul class="tight-form-list">
|
||||||
|
<li class="tight-form-item" style="width: 75px;">
|
||||||
|
Unit
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="text" class="input-medium tight-form-input last" ng-model="agg.settings.unit" ng-blur="onChangeInternal()" spellcheck='false'>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tight-form" ng-if="agg.type === 'moving_avg'">
|
<div class="tight-form" ng-if="agg.type === 'moving_avg'">
|
||||||
<ul class="tight-form-list">
|
<ul class="tight-form-list">
|
||||||
<li class="tight-form-item" style="width: 75px;">
|
<li class="tight-form-item" style="width: 75px;">
|
||||||
|
|
|
@ -73,7 +73,9 @@ function (_) {
|
||||||
{text: 'window', default: 5},
|
{text: 'window', default: 5},
|
||||||
{text: 'model', default: 'simple'}
|
{text: 'model', default: 'simple'}
|
||||||
],
|
],
|
||||||
'derivative': []
|
'derivative': [
|
||||||
|
{text: 'unit', default: undefined},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
getMetricAggTypes: function(esVersion) {
|
getMetricAggTypes: function(esVersion) {
|
||||||
|
|
Loading…
Reference in New Issue