|
|
@@ -11,7 +11,7 @@
|
|
|
</li>
|
|
|
<li class="tight-form-item">
|
|
|
<div class="dropdown">
|
|
|
- <a class="pointer dropdown-toggle" data-toggle="dropdown" tabindex="1">
|
|
|
+ <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">
|
|
|
@@ -22,6 +22,7 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
</li>
|
|
|
+
|
|
|
<li class="tight-form-item last">
|
|
|
<a class="pointer" tabindex="1" ng-click="removeDataQuery(target)">
|
|
|
<i class="fa fa-remove"></i>
|
|
|
@@ -40,89 +41,100 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
|
- <input type="text" class="tight-form-clear-input" style="width: 80%" ng-model="target.query" give-focus="target.rawQuery" spellcheck='false' ng-model-onblur ng-change="get_data()" ng-show="target.rawQuery"/>
|
|
|
+ <ul class="tight-form-list" ng-hide="target.rawQuery">
|
|
|
+ <li class="tight-form-item query-keyword" style="width: 75px">
|
|
|
+ FROM
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <metric-segment segment="measurementSegment" get-options="getMeasurements()" on-change="measurementChanged()"></metric-segment>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="clearfix"></div>
|
|
|
|
|
|
- <ul class="tight-form-list" role="menu" ng-hide="target.rawQuery">
|
|
|
- <li class="tight-form-item query-keyword" style="width: 75px;">
|
|
|
- SELECT
|
|
|
- </li>
|
|
|
- <li class="dropdown" ng-repeat="field in target.fields">
|
|
|
- <span influxdb-func-editor field="field" get-fields="getFields()" on-change="fieldChanged(field)" class="tight-form-item">
|
|
|
- </span>
|
|
|
+ <div style="padding: 10px" ng-if="target.rawQuery">
|
|
|
+ <textarea ng-model="target.query" rows="8" spellcheck="false" style="width: 100%; box-sizing: border-box;" ng-blur="get_data()"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div ng-hide="target.rawQuery">
|
|
|
+ <div class="tight-form">
|
|
|
+ <ul class="tight-form-list">
|
|
|
+ <li class="tight-form-item query-keyword tight-form-align" style="width: 75px;">
|
|
|
+ WHERE
|
|
|
</li>
|
|
|
- <li>
|
|
|
- <metric-segment segment="addFieldSegment" get-options="getFieldSegments()" on-change="addField()"></metric-segment>
|
|
|
+ <li ng-repeat="segment in tagSegments">
|
|
|
+ <metric-segment segment="segment" get-options="getTagsOrValues(segment, $index)" on-change="tagSegmentUpdated(segment, $index)"></metric-segment>
|
|
|
</li>
|
|
|
</ul>
|
|
|
-
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="tight-form" ng-hide="target.rawQuery">
|
|
|
+ <div class="tight-form" ng-repeat="field in target.fields">
|
|
|
<ul class="tight-form-list">
|
|
|
<li class="tight-form-item query-keyword tight-form-align" style="width: 75px;">
|
|
|
- FROM
|
|
|
+ <span ng-show="$index === 0">SELECT</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <metric-segment-model property="field.func" get-options="getFunctions()" on-change="get_data()" css-class="tight-form-item-xlarge"></metric-segment>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <metric-segment-model property="field.name" get-options="getFields()" on-change="get_data()" css-class="tight-form-item-large"></metric-segment>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <input type="text" class="tight-form-clear-input text-center" style="width: 70px;" ng-model="field.mathExpr" spellcheck='false' placeholder="math expr" ng-blur="get_data()">
|
|
|
+ </li>
|
|
|
+ <li class="tight-form-item query-keyword">
|
|
|
+ AS
|
|
|
</li>
|
|
|
<li>
|
|
|
- <metric-segment segment="measurementSegment" get-options="getMeasurements()" on-change="measurementChanged()"></metric-segment>
|
|
|
+ <input type="text" class="tight-form-clear-input" style="width: 180px;" ng-model="field.asExpr" spellcheck='false' placeholder="as expr" ng-blur="get_data()">
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
|
+ <ul class="tight-form-list pull-right">
|
|
|
+ <li class="tight-form-item last" ng-show="$index === 0">
|
|
|
+ <a class="pointer" ng-click="addSelect()"><i class="fa fa-plus"></i></a>
|
|
|
+ </li>
|
|
|
+ <li class="tight-form-item last" ng-show="target.fields.length > 1">
|
|
|
+ <a class="pointer" ng-click="removeSelect($index)"><i class="fa fa-minus"></i></a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="tight-form" ng-hide="target.rawQuery">
|
|
|
+ <div class="tight-form" ng-repeat="groupBy in target.groupBy">
|
|
|
<ul class="tight-form-list">
|
|
|
<li class="tight-form-item query-keyword tight-form-align" style="width: 75px;">
|
|
|
- WHERE
|
|
|
+ <span ng-show="$index === 0">GROUP BY</span>
|
|
|
+ </li>
|
|
|
+ <li ng-if="groupBy.type === 'time'">
|
|
|
+ <span class="tight-form-item">time</span>
|
|
|
+ <metric-segment-model property="groupBy.interval" get-options="getGroupByTimeIntervals()" on-change="get_data()">
|
|
|
+ </metric-segment>
|
|
|
</li>
|
|
|
+ <li ng-if="groupBy.type === 'tag'">
|
|
|
+ <metric-segment-model property="groupBy.key" get-options="getTagOptions()" on-change="get_data()"></metric-segment>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
|
|
|
- <li ng-repeat="segment in tagSegments">
|
|
|
- <metric-segment segment="segment" get-options="getTagsOrValues(segment, $index)" on-change="tagSegmentUpdated(segment, $index)"></metric-segment>
|
|
|
+ <ul class="tight-form-list pull-right">
|
|
|
+ <li class="tight-form-item last" ng-show="$index === 0">
|
|
|
+ <a class="pointer" ng-click="addGroupBy()"><i class="fa fa-plus"></i></a>
|
|
|
+ </li>
|
|
|
+ <li class="tight-form-item last" ng-show="$index > 0">
|
|
|
+ <a class="pointer" ng-click="removeGroupBy($index)"><i class="fa fa-minus"></i></a>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
|
|
|
<div class="tight-form">
|
|
|
- <ul class="tight-form-list" ng-hide="target.rawQuery">
|
|
|
- <li class="tight-form-item query-keyword tight-form-align">
|
|
|
- GROUP BY
|
|
|
- </li>
|
|
|
-
|
|
|
- <li class="tight-form-item">
|
|
|
- time($interval)
|
|
|
- </li>
|
|
|
-
|
|
|
- <li ng-repeat="segment in groupBySegments">
|
|
|
- <metric-segment segment="segment" get-options="getGroupByTagSegments(segment, 0)" on-change="groupByTagUpdated(segment, $index)"></metric-segment>
|
|
|
- </li>
|
|
|
- <li class="dropdown">
|
|
|
- <a class="tight-form-item pointer" data-toggle="dropdown" bs-tooltip="'Insert missing values, important when stacking'" data-placement="right">
|
|
|
- <span ng-show="target.fill">
|
|
|
- fill ({{target.fill}})
|
|
|
- </span>
|
|
|
- <span ng-show="!target.fill">
|
|
|
- no fill
|
|
|
- </span>
|
|
|
- </a>
|
|
|
- <ul class="dropdown-menu">
|
|
|
- <li><a ng-click="target.fill = ''">no fill</a></li>
|
|
|
- <li><a ng-click="target.fill = '0'">fill (0)</a></li>
|
|
|
- <li><a ng-click="target.fill = 'null'">fill (null)</a></li>
|
|
|
- <li><a ng-click="target.fill = 'none'">fill (none)</a></li>
|
|
|
- <li><a ng-click="target.fill = 'previous'">fill (previous)</a></li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul class="tight-form-list pull-right">
|
|
|
- <li class="tight-form-item">
|
|
|
- Alias pattern
|
|
|
+ <ul class="tight-form-list">
|
|
|
+ <li class="tight-form-item query-keyword tight-form-align" style="width: 75px;">
|
|
|
+ ALIAS BY
|
|
|
</li>
|
|
|
<li>
|
|
|
- <input type="text" class="input-medium tight-form-input"
|
|
|
- ng-model="target.alias" spellcheck='false' placeholder="alias"
|
|
|
- ng-model-onblur ng-change="get_data()"></input>
|
|
|
+ <input type="text" class="tight-form-clear-input input-xlarge" ng-model="target.alias" spellcheck='false' placeholder="Naming pattern" ng-blur="get_data()">
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
@@ -130,4 +142,3 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|