mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
added reset value
This commit is contained in:
@@ -102,6 +102,19 @@
|
|||||||
ng-blur="targetBlur()"
|
ng-blur="targetBlur()"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="grafana-target-segment" ng-hide="!target.isCounter">
|
||||||
|
Counter Reset Value:
|
||||||
|
</li>
|
||||||
|
<li ng-hide="!target.isCounter">
|
||||||
|
<input type="text"
|
||||||
|
class="grafana-target-segment-input input-medium"
|
||||||
|
ng-disabled="!target.shouldComputeRate"
|
||||||
|
ng-model="target.counterResetValue"
|
||||||
|
spellcheck='false'
|
||||||
|
placeholder="Counter reset value"
|
||||||
|
ng-blur="targetBlur()"
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
<li class="grafana-target-segment">
|
<li class="grafana-target-segment">
|
||||||
Alias:
|
Alias:
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -138,7 +138,11 @@ function (angular, _, kbn) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (target.counterMax && target.counterMax.length) {
|
if (target.counterMax && target.counterMax.length) {
|
||||||
query.rateOptions['counterMax'] = parseInt(target.counterMax);
|
query.rateOptions.counterMax = parseInt(target.counterMax);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target.counterResetValue && target.counterResetValue.length) {
|
||||||
|
query.rateOptions.resetValue = parseInt(target.counterResetValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user