瀏覽代碼

ux(): more changes to influxdb query editor

Torkel Ödegaard 9 年之前
父節點
當前提交
bd6a68bfe5
共有 1 個文件被更改,包括 18 次插入36 次删除
  1. 18 36
      public/app/plugins/datasource/influxdb/partials/query.editor.html

+ 18 - 36
public/app/plugins/datasource/influxdb/partials/query.editor.html

@@ -1,6 +1,6 @@
 <query-editor-row ctrl="ctrl">
 		<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.measurementSegment" get-options="ctrl.getMeasurements()" on-change="ctrl.measurementChanged()"></metric-segment>
@@ -22,9 +22,7 @@
 <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">
-			<label class="gf-form-label query-keyword width-6">
-				<span ng-show="$index === 0">SELECT</span>
-			</label>
+			<label class="gf-form-label query-keyword width-7">SELECT</label>
 
 			<influx-query-part-editor
 					ng-repeat="part in selectParts"
@@ -39,43 +37,27 @@
 				dropdown-typeahead="ctrl.selectMenu"
 				dropdown-typeahead-on-select="ctrl.addSelectPart(selectParts, $item, $subItem)">
 			</label>
-	</div>
-</div>
-
-<div ng-hide="ctrl.target.rawQuery" ng-if="false">
-	<div class="tight-form" ng-repeat="selectParts in ctrl.queryModel.selectModels">
-		<ul class="tight-form-list">
-			<li class="tight-form-item query-keyword tight-form-align" style="width: 75px;">
-				<span ng-show="$index === 0">SELECT</span>
-			</li>
-			<li ng-repeat="part in selectParts">
-				<influx-query-part-editor part="part" class="tight-form-item tight-form-func" remove-action="ctrl.removeSelectPart(selectParts, part)" part-updated="ctrl.selectPartUpdated(selectParts, part)" get-options="ctrl.getPartOptions(part)"></influx-query-part-editor>
-			</li>
-			<li class="dropdown" dropdown-typeahead="ctrl.selectMenu" dropdown-typeahead-on-select="ctrl.addSelectPart(selectParts, $item, $subItem)">
-			</li>
-		</ul>
-		<div class="clearfix"></div>
-	</div>
-
-	<div class="tight-form">
-		<ul class="tight-form-list">
-			<li class="tight-form-item query-keyword tight-form-align" style="width: 75px;">
-				<span>GROUP BY</span>
-			</li>
-			<li ng-repeat="part in ctrl.queryModel.groupByParts">
-				<influx-query-part-editor part="part" class="tight-form-item tight-form-func" remove-action="ctrl.removeGroupByPart(part, $index)" part-updated="ctrl.refresh();" get-options="ctrl.getPartOptions(part)"></influx-query-part-editor>
-			</li>
-			<li>
-				<metric-segment segment="ctrl.groupBySegment" get-options="ctrl.getGroupByOptions()" on-change="ctrl.groupByAction(part, $index)"></metric-segment>
-			</li>
-		</ul>
-		<div class="clearfix"></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">GROUP BY</label>
+      <influx-query-part-editor
+          class="gf-form-label tight-form-func"
+          ng-repeat="part in ctrl.queryModel.groupByParts"
+          part="part"
+          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 class="gf-form-inline query-editor-secondary-row">
 	<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()">
 	</div>
 	<div class="gf-form">