mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'felixbarny-global_interval'
This commit is contained in:
commit
28e7f0f74f
@ -59,7 +59,9 @@ function (angular, _, $, kbn, dateMath, rangeUtil) {
|
||||
scope.resolution = Math.ceil($(window).width() * (scope.panel.span / 12));
|
||||
}
|
||||
|
||||
scope.interval = kbn.calculateInterval(scope.range, scope.resolution, scope.panel.interval);
|
||||
var panelInterval = scope.panel.interval;
|
||||
var datasourceInterval = (scope.datasource || {}).interval;
|
||||
scope.interval = kbn.calculateInterval(scope.range, scope.resolution, panelInterval || datasourceInterval);
|
||||
};
|
||||
|
||||
this.applyPanelTimeOverrides = function(scope) {
|
||||
|
@ -26,6 +26,7 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
|
||||
this.timeField = datasource.jsonData.timeField;
|
||||
this.esVersion = datasource.jsonData.esVersion;
|
||||
this.indexPattern = new IndexPattern(datasource.index, datasource.jsonData.interval);
|
||||
this.interval = datasource.jsonData.timeInterval;
|
||||
this.queryBuilder = new ElasticQueryBuilder({
|
||||
timeField: this.timeField,
|
||||
esVersion: this.esVersion,
|
||||
|
@ -42,3 +42,22 @@
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>Default query settings</h5>
|
||||
|
||||
<div class="tight-form last">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 200px">
|
||||
Group by time interval
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="input-medium tight-form-input input-xlarge" ng-model="current.jsonData.timeInterval"
|
||||
spellcheck='false' placeholder="example: >10s">
|
||||
</li>
|
||||
<li class="tight-form-item">
|
||||
<i class="fa fa-question-circle" bs-tooltip="'Set a low limit by having a greater sign: example: >10s'" data-placement="right"></i>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user