Skip to content

Commit 339c8d4

Browse files
committed
Grafana plugin: add downsampler param and more help for metrics
add downsampler in the query control add more to the info tooltip
1 parent 2af5467 commit 339c8d4

File tree

5 files changed

+60
-14
lines changed

5 files changed

+60
-14
lines changed

dist/partials/query.editor.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<query-editor-row query-ctrl="ctrl" class="generic-datasource-query-row" has-text-edit-mode="true">
22
<div class="gf-form-inline">
3-
<label class="gf-form-label query-keyword width-8">Cluster<info-popover mode="right-normal">
3+
<label class="gf-form-label query-keyword width-12">Cluster<info-popover mode="right-normal">
44
The name of the cluster in the url
55
</info-popover></label>
66
<div class="gf-form">
@@ -10,7 +10,7 @@
1010
</div>
1111
</div>
1212
<div class="gf-form-inline">
13-
<label class="gf-form-label width-8">Alias<info-popover mode="right-normal">
13+
<label class="gf-form-label width-12">Alias<info-popover mode="right-normal">
1414
Optional name to give this series
1515
</info-popover></label>
1616
<div class="gf-form">
@@ -27,8 +27,10 @@
2727
</div>
2828
<div class="gf-form-inline" ng-if="!ctrl.target.rawQuery">
2929
<div class="gf-form">
30-
<label class="gf-form-label query-keyword width-8">Metric<info-popover mode="right-normal">
31-
Metric urlname. Example: tasks, rssram.
30+
<label class="gf-form-label query-keyword width-12">Metric<info-popover mode="right-normal">
31+
Metric urlname. Example: tasks, rssram. Simple operations can be performed on metrics using
32+
RPN notation. For example if you wanted to divide the ram per task you would do:
33+
expr(rssram tasks /)
3234
</info-popover></label>
3335
</div>
3436
<div>
@@ -46,14 +48,13 @@
4648
<div class="gf-form" ng-if="!ctrl.target.rawQuery">
4749
<div class="gf-form-inline">
4850
<div class="gf-form">
49-
<label class="gf-form-label query-keyword width-8">
51+
<label class="gf-form-label query-keyword width-12">
5052
Tags <info-popover mode="right-normal">
5153
Example tag values are; h: host, j: job, u: user. Value can be '*' for all or a
5254
specific value.
5355
</info-popover>
5456
</label>
5557
</div>
56-
5758
<div class="gf-form" ng-repeat="(key, value) in ctrl.target.tags track by $index" class="gf-form">
5859
<label class="gf-form-label">
5960
{{key}}&nbsp;=&nbsp;{{value}}
@@ -96,4 +97,18 @@
9697
</div>
9798
</div>
9899
</div>
100+
<div class="gf-form-inline" ng-if="!ctrl.target.rawQuery">
101+
<label class="gf-form-label width-12">Downsample
102+
<info-popover mode="right-normal">
103+
Downsampler to use
104+
</info-popover>
105+
</label>
106+
<div class="gf-form">
107+
<input type="text"
108+
class="gf-form-input" spellcheck='false'
109+
bs-typeahead="ctrl.suggestDownsamplerValues" data-min-length=0 data-items=100
110+
ng-model="ctrl.target.downsampler" placeholder="" ng-blur="ctrl.onChangeInternal()">
111+
</input>
112+
</div>
113+
</div>
99114
</query-editor-row>

dist/query_ctrl.js

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)