|
@@ -1,82 +1,42 @@
|
|
|
-<div class="tight-form">
|
|
|
|
|
- <ul class="tight-form-list pull-right">
|
|
|
|
|
- <li class="tight-form-item small" ng-show="target.datasource">
|
|
|
|
|
- <em>{{target.datasource}}</em>
|
|
|
|
|
- </li>
|
|
|
|
|
- <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="panelCtrl.duplicateDataQuery(target)">Duplicate</a></li>
|
|
|
|
|
- <li role="menuitem"><a tabindex="1" ng-click="panelCtrl.moveDataQuery($index, $index-1)">Move up</a></li>
|
|
|
|
|
- <li role="menuitem"><a tabindex="1" ng-click="panelCtrl.moveDataQuery($index, $index+1)">Move down</a></li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li class="tight-form-item last">
|
|
|
|
|
- <a class="pointer" tabindex="1" ng-click="panelCtrl.removeDataQuery(target)">
|
|
|
|
|
- <i class="fa fa-remove"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
-
|
|
|
|
|
- <ul class="tight-form-list">
|
|
|
|
|
- <li class="tight-form-item" style="min-width: 15px; text-align: center">
|
|
|
|
|
- {{target.refId}}
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <a class="tight-form-item"
|
|
|
|
|
- ng-click="target.hide = !target.hide; panelCtrl.refresh();"
|
|
|
|
|
- role="menuitem">
|
|
|
|
|
- <i class="fa fa-eye"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
-
|
|
|
|
|
- <ul class="tight-form-list" role="menu">
|
|
|
|
|
- <li class="tight-form-item query-keyword" style="width: 100px">
|
|
|
|
|
- Metric
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <input type="text" class="input-large tight-form-input" ng-model="target.metric"
|
|
|
|
|
- spellcheck='false' bs-typeahead="suggestMetrics" placeholder="metric name" data-min-length=0 data-items=100
|
|
|
|
|
- ng-blur="targetBlur()">
|
|
|
|
|
- </input>
|
|
|
|
|
- <a bs-tooltip="target.errors.metric" style="color: rgb(229, 189, 28)" ng-show="target.errors.metric">
|
|
|
|
|
- <i class="fa fa-warning"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li class="tight-form-item query-keyword">
|
|
|
|
|
- Aggregator
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <select ng-model="target.aggregator" class="tight-form-input input-small"
|
|
|
|
|
- ng-options="agg for agg in aggregators"
|
|
|
|
|
- ng-change="targetBlur()">
|
|
|
|
|
- </select>
|
|
|
|
|
- <a bs-tooltip="target.errors.aggregator" style="color: rgb(229, 189, 28)" ng-show="target.errors.aggregator">
|
|
|
|
|
- <i class="fa fa-warning"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- </li>
|
|
|
|
|
-
|
|
|
|
|
- <li class="tight-form-item query-keyword">
|
|
|
|
|
- Alias:
|
|
|
|
|
- <tip>Use patterns like $tag_tagname to replace part of the alias for a tag value</tip>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <input type="text" class="tight-form-input input-large"
|
|
|
|
|
- ng-model="target.alias"
|
|
|
|
|
- spellcheck='false'
|
|
|
|
|
- placeholder="series alias"
|
|
|
|
|
- data-min-length=0 data-items=100
|
|
|
|
|
- ng-blur="targetBlur()"></input>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
-
|
|
|
|
|
- <div class="clearfix"></div>
|
|
|
|
|
-</div>
|
|
|
|
|
|
|
+<query-editor-row ctrl="ctrl">
|
|
|
|
|
+ <li class="tight-form-item query-keyword" style="width: 100px">
|
|
|
|
|
+ Metric
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <input type="text" class="input-large tight-form-input" ng-model="ctrl.target.metric"
|
|
|
|
|
+ spellcheck='false' bs-typeahead="ctrl.suggestMetrics" placeholder="metric name" data-min-length=0 data-items=100
|
|
|
|
|
+ ng-blur="ctrl.targetBlur()">
|
|
|
|
|
+ </input>
|
|
|
|
|
+ <a bs-tooltip="ctrl.errors.metric" style="color: rgb(229, 189, 28)" ng-show="ctrl.errors.metric">
|
|
|
|
|
+ <i class="fa fa-warning"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li class="tight-form-item query-keyword">
|
|
|
|
|
+ Aggregator
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <select ng-model="ctrl.target.aggregator" class="tight-form-input input-small"
|
|
|
|
|
+ ng-options="agg for agg in ctrl.aggregators"
|
|
|
|
|
+ ng-change="ctrl.targetBlur()">
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <a bs-tooltip="ctrl.errors.aggregator" style="color: rgb(229, 189, 28)" ng-show="ctrl.errors.aggregator">
|
|
|
|
|
+ <i class="fa fa-warning"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+
|
|
|
|
|
+ <li class="tight-form-item query-keyword">
|
|
|
|
|
+ Alias:
|
|
|
|
|
+ <tip>Use patterns like $tag_tagname to replace part of the alias for a tag value</tip>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <input type="text" class="tight-form-input input-large"
|
|
|
|
|
+ ng-model="ctrl.target.alias"
|
|
|
|
|
+ spellcheck='false'
|
|
|
|
|
+ placeholder="series alias"
|
|
|
|
|
+ data-min-length=0 data-items=100
|
|
|
|
|
+ ng-blur="ctrl.targetBlur()"></input>
|
|
|
|
|
+ </li>
|
|
|
|
|
+</query-editor-row>
|
|
|
|
|
|
|
|
<div class="tight-form">
|
|
<div class="tight-form">
|
|
|
<ul class="tight-form-list" role="menu">
|
|
<ul class="tight-form-list" role="menu">
|
|
@@ -86,9 +46,9 @@
|
|
|
|
|
|
|
|
<li>
|
|
<li>
|
|
|
<input type="text" class="input-large tight-form-input"
|
|
<input type="text" class="input-large tight-form-input"
|
|
|
- ng-model="target.downsampleInterval"
|
|
|
|
|
|
|
+ ng-model="ctrl.target.downsampleInterval"
|
|
|
ng-model-onblur
|
|
ng-model-onblur
|
|
|
- ng-change="targetBlur()"
|
|
|
|
|
|
|
+ ng-change="ctrl.targetBlur()"
|
|
|
placeholder="interval (empty = auto)"></input>
|
|
placeholder="interval (empty = auto)"></input>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
@@ -97,26 +57,26 @@
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<li>
|
|
|
- <select ng-model="target.downsampleAggregator" class="tight-form-input input-small"
|
|
|
|
|
- ng-options="agg for agg in aggregators"
|
|
|
|
|
- ng-change="targetBlur()">
|
|
|
|
|
|
|
+ <select ng-model="ctrl.target.downsampleAggregator" class="tight-form-input input-small"
|
|
|
|
|
+ ng-options="agg for agg in ctrl.aggregators"
|
|
|
|
|
+ ng-change="ctrl.targetBlur()">
|
|
|
</select>
|
|
</select>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
- <li class="tight-form-item query-keyword">
|
|
|
|
|
- Fill policy
|
|
|
|
|
- <tip>Available since OpenTSDB 2.2</tip>
|
|
|
|
|
- </li>
|
|
|
|
|
|
|
+ <li class="tight-form-item query-keyword" style="width: 59px">
|
|
|
|
|
+ Fill
|
|
|
|
|
+ <tip>Available since OpenTSDB 2.2</tip>
|
|
|
|
|
+ </li>
|
|
|
|
|
|
|
|
- <li>
|
|
|
|
|
- <select ng-model="target.downsampleFillPolicy" class="tight-form-input input-small"
|
|
|
|
|
- ng-options="agg for agg in fillPolicies"
|
|
|
|
|
- ng-change="targetBlur()">
|
|
|
|
|
- </select>
|
|
|
|
|
- </li>
|
|
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <select ng-model="ctrl.target.downsampleFillPolicy" class="tight-form-input input-small"
|
|
|
|
|
+ ng-options="agg for agg in ctrl.fillPolicies"
|
|
|
|
|
+ ng-change="ctrl.targetBlur()">
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </li>
|
|
|
|
|
|
|
|
- <li class="tight-form-item query-keyword">
|
|
|
|
|
- Disable downsampling <editor-checkbox text="" model="target.disableDownsampling" change="targetBlur()"></editor-checkbox>
|
|
|
|
|
|
|
+ <li class="tight-form-item query-keyword">
|
|
|
|
|
+ Disable downsampling <editor-checkbox text="" model="ctrl.target.disableDownsampling" change="ctrl.targetBlur()"></editor-checkbox>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</ul>
|
|
@@ -128,35 +88,35 @@
|
|
|
<li class="tight-form-item tight-form-align query-keyword" style="width: 100px">
|
|
<li class="tight-form-item tight-form-align query-keyword" style="width: 100px">
|
|
|
Tags
|
|
Tags
|
|
|
</li>
|
|
</li>
|
|
|
- <li ng-repeat="(key, value) in target.tags track by $index" class="tight-form-item">
|
|
|
|
|
- {{key}} = {{value}}
|
|
|
|
|
- <a ng-click="editTag(key, value)">
|
|
|
|
|
- <i class="fa fa-pencil"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- <a ng-click="removeTag(key)">
|
|
|
|
|
|
|
+ <li ng-repeat="(key, value) in ctrl.target.tags track by $index" class="tight-form-item">
|
|
|
|
|
+ {{key}} = {{value}}
|
|
|
|
|
+ <a ng-click="ctrl.editTag(key, value)">
|
|
|
|
|
+ <i class="fa fa-pencil"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ <a ng-click="ctrl.removeTag(key)">
|
|
|
<i class="fa fa-remove"></i>
|
|
<i class="fa fa-remove"></i>
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
- <li class="tight-form-item query-keyword" ng-hide="addTagMode">
|
|
|
|
|
- <a ng-click="addTag()">
|
|
|
|
|
|
|
+ <li class="tight-form-item query-keyword" ng-hide="ctrl.addTagMode">
|
|
|
|
|
+ <a ng-click="ctrl.addTag()">
|
|
|
<i class="fa fa-plus"></i>
|
|
<i class="fa fa-plus"></i>
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
- <li ng-show="addTagMode">
|
|
|
|
|
|
|
+ <li ng-show="ctrl.addTagMode">
|
|
|
<input type="text" class="input-small tight-form-input" spellcheck='false'
|
|
<input type="text" class="input-small tight-form-input" spellcheck='false'
|
|
|
- bs-typeahead="suggestTagKeys" data-min-length=0 data-items=100
|
|
|
|
|
- ng-model="target.currentTagKey" placeholder="key"></input>
|
|
|
|
|
|
|
+ bs-typeahead="ctrl.suggestTagKeys" data-min-length=0 data-items=100
|
|
|
|
|
+ ng-model="ctrl.target.currentTagKey" placeholder="key"></input>
|
|
|
|
|
|
|
|
<input type="text" class="input-small tight-form-input"
|
|
<input type="text" class="input-small tight-form-input"
|
|
|
- spellcheck='false' bs-typeahead="suggestTagValues"
|
|
|
|
|
- data-min-length=0 data-items=100 ng-model="target.currentTagValue" placeholder="value">
|
|
|
|
|
|
|
+ spellcheck='false' bs-typeahead="ctrl.suggestTagValues"
|
|
|
|
|
+ data-min-length=0 data-items=100 ng-model="ctrl.target.currentTagValue" placeholder="value">
|
|
|
</input>
|
|
</input>
|
|
|
- <a ng-click="addTag()">
|
|
|
|
|
|
|
+ <a ng-click="ctrl.addTag()">
|
|
|
add tag
|
|
add tag
|
|
|
</a>
|
|
</a>
|
|
|
- <a bs-tooltip="target.errors.tags"
|
|
|
|
|
|
|
+ <a bs-tooltip="ctrl.errors.tags"
|
|
|
style="color: rgb(229, 189, 28)"
|
|
style="color: rgb(229, 189, 28)"
|
|
|
ng-show="target.errors.tags">
|
|
ng-show="target.errors.tags">
|
|
|
<i class="fa fa-warning"></i>
|
|
<i class="fa fa-warning"></i>
|
|
@@ -169,31 +129,31 @@
|
|
|
<div class="tight-form">
|
|
<div class="tight-form">
|
|
|
<ul class="tight-form-list" role="menu">
|
|
<ul class="tight-form-list" role="menu">
|
|
|
<li class="tight-form-item tight-form-align query-keyword" style="width: 100px">
|
|
<li class="tight-form-item tight-form-align query-keyword" style="width: 100px">
|
|
|
- Rate <editor-checkbox text="" model="target.shouldComputeRate" change="targetBlur()"></editor-checkbox>
|
|
|
|
|
|
|
+ Rate <editor-checkbox text="" model="ctrl.target.shouldComputeRate" change="ctrl.targetBlur()"></editor-checkbox>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
- <li class="tight-form-item query-keyword" ng-hide="!target.shouldComputeRate">
|
|
|
|
|
- Counter <editor-checkbox text="" model="target.isCounter" change="targetBlur()"></editor-checkbox>
|
|
|
|
|
|
|
+ <li class="tight-form-item query-keyword" ng-hide="!ctrl.target.shouldComputeRate">
|
|
|
|
|
+ Counter <editor-checkbox text="" model="ctrl.target.isCounter" change="ctrl.targetBlur()"></editor-checkbox>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
- <li class="tight-form-item query-keyword" ng-hide="!target.isCounter || !target.shouldComputeRate">
|
|
|
|
|
|
|
+ <li class="tight-form-item query-keyword" ng-hide="!ctrl.target.isCounter || !ctrl.target.shouldComputeRate">
|
|
|
Counter Max:
|
|
Counter Max:
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
- <li ng-hide="!target.isCounter || !target.shouldComputeRate">
|
|
|
|
|
- <input type="text" class="tight-form-input input-small" ng-disabled="!target.shouldComputeRate"
|
|
|
|
|
- ng-model="target.counterMax" spellcheck='false'
|
|
|
|
|
|
|
+ <li ng-hide="!ctrl.target.isCounter || !ctrl.target.shouldComputeRate">
|
|
|
|
|
+ <input type="text" class="tight-form-input input-small" ng-disabled="!ctrl.target.shouldComputeRate"
|
|
|
|
|
+ ng-model="ctrl.target.counterMax" spellcheck='false'
|
|
|
placeholder="max value" ng-model-onblur
|
|
placeholder="max value" ng-model-onblur
|
|
|
- ng-blur="targetBlur()"></input>
|
|
|
|
|
|
|
+ ng-blur="ctrl.targetBlur()"></input>
|
|
|
</li>
|
|
</li>
|
|
|
- <li class="tight-form-item query-keyword" ng-hide="!target.isCounter || !target.shouldComputeRate">
|
|
|
|
|
|
|
+ <li class="tight-form-item query-keyword" ng-hide="!ctrl.target.isCounter || !ctrl.target.shouldComputeRate">
|
|
|
Reset Value:
|
|
Reset Value:
|
|
|
</li>
|
|
</li>
|
|
|
- <li ng-hide="!target.isCounter || !target.shouldComputeRate">
|
|
|
|
|
- <input type="text" class="tight-form-input input-small" ng-disabled="!target.shouldComputeRate"
|
|
|
|
|
- ng-model="target.counterResetValue" spellcheck='false'
|
|
|
|
|
|
|
+ <li ng-hide="!ctrl.target.isCounter || !ctrl.target.shouldComputeRate">
|
|
|
|
|
+ <input type="text" class="tight-form-input input-small" ng-disabled="!ctrl.target.shouldComputeRate"
|
|
|
|
|
+ ng-model="ctrl.target.counterResetValue" spellcheck='false'
|
|
|
placeholder="reset value" ng-model-onblur
|
|
placeholder="reset value" ng-model-onblur
|
|
|
- ng-blur="targetBlur()"></input>
|
|
|
|
|
|
|
+ ng-blur="ctrl.targetBlur()"></input>
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|