|
|
@@ -1,118 +1,82 @@
|
|
|
-<div class="tight-form">
|
|
|
- <ul class="tight-form-list pull-right">
|
|
|
- <li class="tight-form-item small" ng-show="ctrl.target.datasource">
|
|
|
- <em>{{ctrl.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="ctrl.duplicateQuery()">Duplicate</a></li>
|
|
|
- <li role="menuitem"><a tabindex="1" ng-click="ctrl.moveQuery(-1)">Move up</a></li>
|
|
|
- <li role="menuitem"><a tabindex="1" ng-click="ctrl.moveQuery(1)">Move down</a></li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="tight-form-item last">
|
|
|
- <a class="pointer" tabindex="1" ng-click="ctrl.removeQuery()">
|
|
|
- <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">
|
|
|
- {{ctrl.target.refId}}
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <a class="tight-form-item" ng-click="ctrl.toggleHideQuery();" role="menuitem">
|
|
|
- <i class="fa fa-eye"></i>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+<query-editor-row ctrl="ctrl" controls="true">
|
|
|
|
|
|
- <ul class="tight-form-list" role="menu">
|
|
|
- <li class="tight-form-item" style="width: 94px">
|
|
|
- Query
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <input type="text"
|
|
|
- class="input-xxlarge tight-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()">
|
|
|
- </li>
|
|
|
- <li class="tight-form-item">
|
|
|
- Metric
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <input type="text"
|
|
|
- class="input-medium tight-form-input"
|
|
|
- ng-model="ctrl.target.metric"
|
|
|
- spellcheck='false'
|
|
|
- bs-typeahead="ctrl.suggestMetrics"
|
|
|
- placeholder="metric name"
|
|
|
- data-min-length=0 data-items=100>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <li class="tight-form-item" style="width: 94px">
|
|
|
+ Query
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text"
|
|
|
+ class="input-xxlarge tight-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()">
|
|
|
+ </li>
|
|
|
+ <li class="tight-form-item">
|
|
|
+ Metric
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text"
|
|
|
+ class="input-medium tight-form-input"
|
|
|
+ ng-model="ctrl.target.metric"
|
|
|
+ spellcheck='false'
|
|
|
+ bs-typeahead="ctrl.suggestMetrics"
|
|
|
+ placeholder="metric name"
|
|
|
+ data-min-length=0 data-items=100>
|
|
|
+ </li>
|
|
|
|
|
|
- <div class="clearfix"></div>
|
|
|
-</div>
|
|
|
+</query-editor-row>
|
|
|
|
|
|
<div class="tight-form">
|
|
|
- <ul class="tight-form-list" role="menu">
|
|
|
- <li class="tight-form-item tight-form-align" style="width: 94px">
|
|
|
- Legend format
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <input type="text" class="tight-form-input input-xxlarge" 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>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <ul class="tight-form-list" role="menu">
|
|
|
+ <li class="tight-form-item tight-form-align" style="width: 94px">
|
|
|
+ Legend format
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text" class="tight-form-input input-xxlarge" 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>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
|
|
|
- <div class="clearfix"></div>
|
|
|
+ <div class="clearfix"></div>
|
|
|
</div>
|
|
|
|
|
|
<div class="tight-form">
|
|
|
- <ul class="tight-form-list" role="menu">
|
|
|
- <li class="tight-form-item tight-form-align" style="width: 94px">
|
|
|
- Step
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <input type="text" class="input-mini tight-form-input" ng-model="ctrl.target.interval"
|
|
|
- bs-tooltip="'Leave blank for auto handling based on time range and panel width'"
|
|
|
- data-placement="right"
|
|
|
- spellcheck='false'
|
|
|
- placeholder="{{ctrl.panelCtrl.interval}}"
|
|
|
- data-min-length=0 data-items=100
|
|
|
- ng-model-onblur
|
|
|
- ng-change="ctrl.refreshMetricData()"
|
|
|
- />
|
|
|
- </input>
|
|
|
- </li>
|
|
|
+ <ul class="tight-form-list" role="menu">
|
|
|
+ <li class="tight-form-item tight-form-align" style="width: 94px">
|
|
|
+ Step
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text" class="input-mini tight-form-input" ng-model="ctrl.target.interval"
|
|
|
+ bs-tooltip="'Leave blank for auto handling based on time range and panel width'"
|
|
|
+ data-placement="right"
|
|
|
+ spellcheck='false'
|
|
|
+ placeholder="{{ctrl.panelCtrl.interval}}"
|
|
|
+ data-min-length=0 data-items=100
|
|
|
+ ng-model-onblur
|
|
|
+ ng-change="ctrl.refreshMetricData()"
|
|
|
+ />
|
|
|
+ </input>
|
|
|
+ </li>
|
|
|
|
|
|
- <li class="tight-form-item">
|
|
|
- Resolution
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <select ng-model="ctrl.target.intervalFactor" class="tight-form-input input-mini"
|
|
|
- ng-options="r.factor as r.label for r in ctrl.resolutions"
|
|
|
- ng-change="ctrl.refreshMetricData()">
|
|
|
- </select>
|
|
|
- </li>
|
|
|
- <li class="tight-form-item">
|
|
|
- <a href="{{ctrl.linkToPrometheus}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
|
|
|
- <i class="fa fa-share-square-o"></i>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <li class="tight-form-item">
|
|
|
+ Resolution
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <select ng-model="ctrl.target.intervalFactor" class="tight-form-input input-mini"
|
|
|
+ ng-options="r.factor as r.label for r in ctrl.resolutions"
|
|
|
+ ng-change="ctrl.refreshMetricData()">
|
|
|
+ </select>
|
|
|
+ </li>
|
|
|
+ <li class="tight-form-item">
|
|
|
+ <a href="{{ctrl.linkToPrometheus}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
|
|
|
+ <i class="fa fa-share-square-o"></i>
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
|
|
|
- <div class="clearfix"></div>
|
|
|
+ <div class="clearfix"></div>
|
|
|
</div>
|