Commit 24a7d4f8 by Torkel Ödegaard

ux(): query editors, added group by

parent a4f96214
<query-editor-row ctrl="ctrl"> <query-editor-row ctrl="ctrl">
<div ng-hide="ctrl.target.rawQuery" class="gf-form-inline"> <div ng-hide="ctrl.target.rawQuery" class="gf-form-inline">
<label class="gf-form-label query-keyword width-6">FROM</label> <label class="gf-form-label query-keyword width-7">FROM</label>
<metric-segment segment="ctrl.policySegment" get-options="ctrl.getPolicySegments()" on-change="ctrl.policyChanged()"></metric-segment> <metric-segment segment="ctrl.policySegment" get-options="ctrl.getPolicySegments()" on-change="ctrl.policyChanged()"></metric-segment>
<metric-segment segment="ctrl.measurementSegment" get-options="ctrl.getMeasurements()" on-change="ctrl.measurementChanged()"></metric-segment> <metric-segment segment="ctrl.measurementSegment" get-options="ctrl.getMeasurements()" on-change="ctrl.measurementChanged()"></metric-segment>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div ng-hide="ctrl.target.rawQuery"> <div ng-hide="ctrl.target.rawQuery">
<div class="gf-form-inline query-editor-secondary-row" ng-repeat="selectParts in ctrl.queryModel.selectModels"> <div class="gf-form-inline query-editor-secondary-row" ng-repeat="selectParts in ctrl.queryModel.selectModels">
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword width-6"> <label class="gf-form-label query-keyword width-7">
<span ng-show="$index === 0">SELECT</span> <span ng-show="$index === 0">SELECT</span>
</label> </label>
...@@ -40,6 +40,23 @@ ...@@ -40,6 +40,23 @@
dropdown-typeahead-on-select="ctrl.addSelectPart(selectParts, $item, $subItem)"> dropdown-typeahead-on-select="ctrl.addSelectPart(selectParts, $item, $subItem)">
</label> </label>
</div> </div>
</div>
<div class="gf-form-inline query-editor-secondary-row">
<div class="gf-form">
<label class="gf-form-label query-keyword width-7">
<span>GROUP BY</span>
</label>
<influx-query-part-editor
ng-repeat="part in ctrl.queryModel.groupByParts"
part="part"
class="gf-form-label tight-form-func"
remove-action="ctrl.removeGroupByPart(part, $index)" part-updated="ctrl.refresh();" get-options="ctrl.getPartOptions(part)">
</influx-query-part-editor>
<metric-segment segment="ctrl.groupBySegment" get-options="ctrl.getGroupByOptions()" on-change="ctrl.groupByAction(part, $index)"></metric-segment>
</div>
</div> </div>
<div ng-hide="ctrl.target.rawQuery" ng-if="false"> <div ng-hide="ctrl.target.rawQuery" ng-if="false">
...@@ -75,7 +92,7 @@ ...@@ -75,7 +92,7 @@
<div class="gf-form-inline query-editor-secondary-row"> <div class="gf-form-inline query-editor-secondary-row">
<div class="gf-form max-width-30"> <div class="gf-form max-width-30">
<label class="gf-form-label query-keyword">ALIAS BY</label> <label class="gf-form-label query-keyword width-7">ALIAS BY</label>
<input type="text" class="gf-form-input" ng-model="ctrl.target.alias" spellcheck='false' placeholder="Naming pattern" ng-blur="ctrl.refresh()"> <input type="text" class="gf-form-input" ng-model="ctrl.target.alias" spellcheck='false' placeholder="Naming pattern" ng-blur="ctrl.refresh()">
</div> </div>
<div class="gf-form"> <div class="gf-form">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment