| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <div class="editor-row">
- <div ng-repeat="target in panel.targets" ng-controller="InfluxQueryCtrl_08" ng-init="init()" ng-class="{'tight-form-disabled': target.hide}" class="tight-form-container">
- <div class="tight-form">
- <ul class="tight-form-list pull-right">
- <li class="tight-form-item">
- <div class="dropdown">
- <a class="pointer dropdown-toggle"
- data-toggle="dropdown"
- tabindex="1">
- <i class="fa fa-bars"></i>
- </a>
- <ul class="dropdown-menu pull-right" role="menu">
- <li role="menuitem"><a tabindex="1" ng-click="duplicate()">Duplicate</a></li>
- <li role="menuitem"><a tabindex="1" ng-click="showQuery()" ng-hide="target.rawQuery">Raw query mode</a></li>
- <li role="menuitem"><a tabindex="1" ng-click="hideQuery()" ng-show="target.rawQuery">Query editor mode</a></li>
- <li role="menuitem"><a tabindex="1" ng-click="moveMetricQuery($index, $index-1)">Move up </a></li>
- <li role="menuitem"><a tabindex="1" ng-click="moveMetricQuery($index, $index+1)">Move down</a></li>
- </ul>
- </div>
- </li>
- <li class="tight-form-item last">
- <a class="pointer" tabindex="1" ng-click="removeDataQuery(target)">
- <i class="fa fa-remove"></i>
- </a>
- </li>
- </ul>
- <ul class="tight-form-list">
- <li>
- <a class="tight-form-item" ng-click="target.hide = !target.hide; get_data();" role="menuitem">
- <i class="fa fa-eye"></i>
- </a>
- </li>
- </ul>
- <!-- Raw Query mode -->
- <ul class="tight-form-list" ng-show="target.rawQuery">
- <li>
- <input type="text"
- class="tight-form-input span10"
- ng-model="target.query"
- placeholder="select ..."
- focus-me="target.rawQuery"
- spellcheck='false'
- data-min-length=0 data-items=100
- ng-model-onblur
- ng-blur="get_data()">
- </li>
- </ul>
- <!-- Query editor mode -->
- <ul class="tight-form-list" role="menu" ng-hide="target.rawQuery">
- <li class="tight-form-item">
- series
- </li>
- <li>
- <input type="text"
- class="tight-form-input span8"
- ng-model="target.series"
- spellcheck='false'
- bs-typeahead="listSeries"
- match-all="true"
- min-length="3"
- placeholder="series name"
- data-min-length=0 data-items=100
- ng-blur="seriesBlur()">
- </li>
- <li class="tight-form-item">
- alias
- </li>
- <li>
- <input type="text" class="input-medium tight-form-input" ng-model="target.alias"
- spellcheck='false' placeholder="alias" ng-blur="get_data()">
- </li>
- </ul>
- <div class="clearfix"></div>
- </div>
- <div class="tight-form">
- <!-- Raw Query mode -->
- <ul class="tight-form-list" ng-show="target.rawQuery">
- <li class="tight-form-item">
- <i class="fa fa-eye invisible"></i>
- </li>
- <li class="tight-form-item">
- alias
- </li>
- <li>
- <input type="text"
- class="input-medium tight-form-input"
- ng-model="target.alias"
- spellcheck='false'
- placeholder="alias"
- ng-blur="get_data()">
- </li>
- <li class="tight-form-item">
- group by time
- </li>
- <li>
- <input type="text" class="input-mini tight-form-input" ng-model="target.interval"
- spellcheck='false' placeholder="{{interval}}" data-placement="right"
- bs-tooltip="'Leave blank for auto handling based on time range and panel width'"
- ng-model-onblur ng-change="get_data()" >
- </li>
- </ul>
- <!-- Query editor mode -->
- <ul class="tight-form-list" role="menu" ng-hide="target.rawQuery">
- <li class="tight-form-item">
- <i class="fa fa-eye invisible"></i>
- </li>
- <li class="tight-form-item">
- select
- </li>
- <li class="dropdown">
- <span influxdb-func-editor class="tight-form-item tight-form-func">
- </span>
- </li>
- <li class="tight-form-item">
- where
- </li>
- <li>
- <input type="text" class="input-medium tight-form-input" ng-model="target.condition"
- bs-tooltip="'Add a where clause'" data-placement="right" spellcheck='false' placeholder="column ~= value" ng-blur="get_data()">
- </li>
- <li class="tight-form-item">
- group by time
- </li>
- <li>
- <input type="text" class="input-mini tight-form-input" ng-model="target.interval"
- spellcheck='false' placeholder="{{interval}}" data-placement="right"
- bs-tooltip="'Leave blank for auto handling based on time range and panel width'"
- ng-model-onblur ng-change="get_data()" >
- </li>
- <li class="tight-form-item">
- and
- </li>
- <li>
- <input type="text" class="input-small tight-form-input" ng-model="target.groupby_field" bs-tooltip="'Add a group by column or leave blank'"
- placeholder="column" spellcheck="false" bs-typeahead="listColumns" data-min-length=0 ng-blur="get_data()">
- </li>
- <li class="dropdown">
- <a class="tight-form-item pointer" data-toggle="dropdown" bs-tooltip="'Insert missing values, important when stacking'" data-placement="right">
- <span ng-show="target.fill">
- fill ({{target.fill}})
- </span>
- <span ng-show="!target.fill">
- no fill
- </span>
- </a>
- <ul class="dropdown-menu">
- <li><a ng-click="target.fill = ''">no fill</a></li>
- <li><a ng-click="target.fill = 'null'">fill (null)</a></li>
- <li><a ng-click="target.fill = '0'">fill (0)</a></li>
- </ul>
- </li>
- </ul>
- <div class="clearfix"></div>
- </div>
- </div>
- </div>
- <section class="grafana-metric-options">
- <div class="tight-form">
- <ul class="tight-form-list">
- <li class="tight-form-item tight-form-item-icon">
- <i class="fa fa-wrench"></i>
- </li>
- <li class="tight-form-item">
- group by time
- </li>
- <li>
- <input type="text" class="input-medium tight-form-input" ng-model="panel.interval" ng-blur="get_data();"
- 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: >60s'" data-placement="right"></i>
- </li>
- </ul>
- <div class="clearfix"></div>
- </div>
- <div class="tight-form">
- <ul class="tight-form-list">
- <li class="tight-form-item tight-form-item-icon">
- <i class="fa fa-info-circle"></i>
- </li>
- <li class="tight-form-item">
- <a ng-click="toggleEditorHelp(1);" bs-tooltip="'click to show helpful info'" data-placement="bottom">
- alias patterns
- </a>
- </li>
- <li class="tight-form-item">
- <a ng-click="toggleEditorHelp(2)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
- stacking & and fill
- </a>
- </li>
- <li class="tight-form-item">
- <a ng-click="toggleEditorHelp(3)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
- group by time
- </a>
- </li>
- </ul>
- <div class="clearfix"></div>
- </div>
- </section>
- <div class="editor-row">
- <div class="pull-left" style="margin-top: 30px;">
- <div class="grafana-info-box span6" ng-if="editorHelpIndex === 1">
- <h5>Alias patterns</h5>
- <ul>
- <li>$s = series name</li>
- <li>$g = group by</li>
- <li>$[0-9] part of series name for series names seperated by dots.</li>
- </ul>
- </div>
- <div class="grafana-info-box span6" ng-if="editorHelpIndex === 2">
- <h5>Stacking and fill</h5>
- <ul>
- <li>When stacking is enabled it important that points align</li>
- <li>If there are missing points for one series it can cause gaps or missing bars</li>
- <li>You must use fill(0), and select a group by time low limit</li>
- <li>Use the group by time option below your queries and specify for example >10s if your metrics are written every 10 seconds</li>
- <li>This will insert zeros for series that are missing measurements and will make stacking work properly</li>
- </ul>
- </div>
- <div class="grafana-info-box span6" ng-if="editorHelpIndex === 3">
- <h5>Group by time</h5>
- <ul>
- <li>Group by time is important, otherwise the query could return many thousands of datapoints that will slow down Grafana</li>
- <li>Leave the group by time field empty for each query and it will be calculated based on time range and pixel width of the graph</li>
- <li>If you use fill(0) or fill(null) set a low limit for the auto group by time interval</li>
- <li>The low limit can only be set in the group by time option below your queries</li>
- <li>You set a low limit by adding a greater sign before the interval</li>
- <li>Example: >60s if you write metrics to InfluxDB every 60 seconds</li>
- </ul>
- </div>
- </div>
- </div>
|