|
|
@@ -1,77 +1,32 @@
|
|
|
-<div class="tight-form">
|
|
|
- <ul class="tight-form-list pull-right">
|
|
|
- <li ng-show="parserError" class="tight-form-item">
|
|
|
- <a bs-tooltip="parserError" style="color: rgb(229, 189, 28)" role="menuitem">
|
|
|
- <i class="fa fa-warning"></i>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- <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>
|
|
|
+<query-editor-row ctrl="ctrl">
|
|
|
+ <li class="tight-form-item query-keyword" style="width: 75px">
|
|
|
+ Query
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text" class="tight-form-input" style="width: 345px;" ng-model="ctrl.target.query" spellcheck='false' placeholder="Lucene query" ng-blur="ctrl.refresh()">
|
|
|
+ </li>
|
|
|
+ <li class="tight-form-item query-keyword">
|
|
|
+ Alias
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text" class="tight-form-input" style="width: 200px;" ng-model="ctrl.target.alias" spellcheck='false' placeholder="alias patterns (empty = auto)" ng-blur="ctrl.refresh()">
|
|
|
+ </li>
|
|
|
+</query-editor-row>
|
|
|
|
|
|
- <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">
|
|
|
- <li class="tight-form-item query-keyword" style="width: 75px">
|
|
|
- Query
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <input type="text" class="tight-form-input" style="width: 345px;" ng-model="target.query" spellcheck='false' placeholder="Lucene query" ng-blur="panelCtrl.refresh()">
|
|
|
- </li>
|
|
|
- <li class="tight-form-item query-keyword">
|
|
|
- Alias
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <input type="text" class="tight-form-input" style="width: 200px;" ng-model="target.alias" spellcheck='false' placeholder="alias patterns (empty = auto)" ng-blur="panelCtrl.refresh()">
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <div class="clearfix"></div>
|
|
|
+<div ng-repeat="agg in ctrl.target.metrics">
|
|
|
+ <elastic-metric-agg
|
|
|
+ target="ctrl.target" index="$index"
|
|
|
+ get-fields="ctrl.getFields($fieldType)"
|
|
|
+ on-change="ctrl.queryUpdated()"
|
|
|
+ es-version="ctrl.esVersion">
|
|
|
+ </elastic-metric-agg>
|
|
|
</div>
|
|
|
|
|
|
-<div ng-hide="target.rawQuery">
|
|
|
- <div ng-repeat="agg in target.metrics">
|
|
|
- <elastic-metric-agg
|
|
|
- target="target" index="$index"
|
|
|
- get-fields="getFields($fieldType)"
|
|
|
- on-change="queryUpdated()"
|
|
|
- es-version="esVersion">
|
|
|
- </elastic-metric-agg>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div ng-repeat="agg in target.bucketAggs">
|
|
|
- <elastic-bucket-agg
|
|
|
- target="target" index="$index"
|
|
|
- get-fields="getFields($fieldType)"
|
|
|
- on-change="queryUpdated()">
|
|
|
- </elastic-bucket-agg>
|
|
|
- </div>
|
|
|
-
|
|
|
+<div ng-repeat="agg in ctrl.target.bucketAggs">
|
|
|
+ <elastic-bucket-agg
|
|
|
+ target="ctrl.target" index="$index"
|
|
|
+ get-fields="ctrl.getFields($fieldType)"
|
|
|
+ on-change="ctrl.queryUpdated()">
|
|
|
+ </elastic-bucket-agg>
|
|
|
</div>
|
|
|
+
|