mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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)
|
||||
|
||||
### New Features
|
||||
|
@ -82,7 +82,11 @@ function (_, queryDef) {
|
||||
|
||||
value = bucket[metric.id];
|
||||
if (value !== undefined) {
|
||||
newSeries.datapoints.push([value.value, bucket.key]);
|
||||
if (value.normalized_value) {
|
||||
newSeries.datapoints.push([value.normalized_value, bucket.key]);
|
||||
} else {
|
||||
newSeries.datapoints.push([value.value, bucket.key]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,6 +39,18 @@
|
||||
|
||||
<div class="tight-form" ng-if="showOptions">
|
||||
<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'">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 75px;">
|
||||
|
@ -73,7 +73,9 @@ function (_) {
|
||||
{text: 'window', default: 5},
|
||||
{text: 'model', default: 'simple'}
|
||||
],
|
||||
'derivative': []
|
||||
'derivative': [
|
||||
{text: 'unit', default: undefined},
|
||||
]
|
||||
},
|
||||
|
||||
getMetricAggTypes: function(esVersion) {
|
||||
|
Loading…
Reference in New Issue
Block a user