mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Previously `Step` parameter would set a hard value for any zoom level. Now it's renamed to `Min step` and sets the minimal value of `step` parameter to Prometheus query. User would usually want to set it to the scraping interval of the target metric to avoid having shap cliffs on graphs and extra load on Prometheus. Actual `step` value is calculated as the minimum of automatically selected step (based on zoom level) and user provided minimal step. If user did not provide the step, then automatic value is used as is. Example bahavior for `60s` scrape intervals: * `5s` automatic interval, no user specified min step: * Before: `step=5` * After: `step=5` * `5s` automatic interval, `1m` user specified min step: * Before: `step=5` * After: `step=60` * `5m` automatic interval, `1m` user specified min step: * Before: `step=60` (not really visible, too dense) * After: `step=300` (automatic value is picked) See: * https://github.com/grafana/grafana/issues/8065 * https://github.com/prometheus/prometheus/issues/2564
58 lines
2.2 KiB
HTML
58 lines
2.2 KiB
HTML
<query-editor-row query-ctrl="ctrl" can-collapse="true" has-text-edit-mode="true">
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form gf-form--grow">
|
|
<textarea rows="3" class="gf-form-input" ng-model="ctrl.target.expr" spellcheck="false" placeholder="query expression" data-min-length=0 data-items=100 ng-model-onblur ng-change="ctrl.refreshMetricData()"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form max-width-26">
|
|
<label class="gf-form-label width-8">Legend format</label>
|
|
<input type="text" class="gf-form-input" ng-model="ctrl.target.legendFormat"
|
|
spellcheck='false' placeholder="legend format" data-min-length=0 data-items=1000
|
|
ng-model-onblur ng-change="ctrl.refreshMetricData()">
|
|
</input>
|
|
</div>
|
|
<div class="gf-form">
|
|
<label class="gf-form-label">Min step</label>
|
|
<input type="text" class="gf-form-input max-width-5" ng-model="ctrl.target.interval"
|
|
data-placement="right"
|
|
spellcheck='false'
|
|
placeholder="{{ctrl.panelCtrl.interval}}"
|
|
data-min-length=0 data-items=100
|
|
ng-model-onblur
|
|
ng-change="ctrl.refreshMetricData()"/>
|
|
<info-popover mode="right-absolute">
|
|
Leave blank for auto handling based on time range and panel width
|
|
</info-popover>
|
|
</div>
|
|
<div class="gf-form">
|
|
<label class="gf-form-label">Resolution</label>
|
|
<div class="gf-form-select-wrapper max-width-15">
|
|
<select ng-model="ctrl.target.intervalFactor" class="gf-form-input"
|
|
ng-options="r.factor as r.label for r in ctrl.resolutions"
|
|
ng-change="ctrl.refreshMetricData()">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="gf-form max-width-22">
|
|
<label class="gf-form-label">Metric lookup</label>
|
|
<input type="text" class="gf-form-input" ng-model="ctrl.target.metric" spellcheck='false' bs-typeahead="ctrl.suggestMetrics" placeholder="metric name" data-min-length=0 data-items=100>
|
|
</div>
|
|
|
|
<div class="gf-form">
|
|
<label class="gf-form-label">
|
|
<a href="{{ctrl.linkToPrometheus}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
|
|
<i class="fa fa-share-square-o"></i>
|
|
</a>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="gf-form gf-form--grow">
|
|
<div class="gf-form-label gf-form-label--grow"></div>
|
|
</div>
|
|
</div>
|
|
|
|
</query-editor-row>
|