Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f4e3c0a2
Commit
f4e3c0a2
authored
Sep 23, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "poc: some tests for new influxdb editor"
This reverts commit
075d0182
.
parent
81ebaae1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
39 deletions
+46
-39
public/app/plugins/datasource/influxdb/partials/query.editor.html
+45
-33
public/app/plugins/datasource/influxdb/queryCtrl.js
+1
-6
No files found.
public/app/plugins/datasource/influxdb/partials/query.editor.html
View file @
f4e3c0a2
...
...
@@ -48,22 +48,60 @@
<li>
<metric-segment
segment=
"measurementSegment"
get-options=
"getMeasurements()"
on-change=
"measurementChanged()"
></metric-segment>
</li>
<li
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;"
>
WHERE
</li>
<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
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
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-repeat=
"field in target.fields"
>
<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>
<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>
<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-repeat=
"groupBy in target.groupBy"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;"
>
...
...
@@ -108,32 +146,6 @@
</div>
</div>
<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;"
>
<span
ng-show=
"$index === 0"
>
SELECT
</span>
</li>
<li>
<metric-segment-model
property=
"field.name"
get-options=
"getFields()"
on-change=
"get_data()"
></metric-segment>
</li>
<li
ng-repeat=
"func in field.functions"
>
<span
graphite-func-editor
class=
"tight-form-item tight-form-func"
>
</span>
</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"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;"
>
...
...
public/app/plugins/datasource/influxdb/queryCtrl.js
View file @
f4e3c0a2
define
([
'angular'
,
'lodash'
,
'../graphite/gfunc'
,
'./queryBuilder'
,
],
function
(
angular
,
_
,
gfunc
,
InfluxQueryBuilder
)
{
function
(
angular
,
_
,
InfluxQueryBuilder
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.controllers'
);
...
...
@@ -18,10 +17,6 @@ function (angular, _, gfunc, InfluxQueryBuilder) {
target
.
tags
=
target
.
tags
||
[];
target
.
groupBy
=
target
.
groupBy
||
[{
type
:
'time'
,
interval
:
'auto'
}];
target
.
fields
=
target
.
fields
||
[{
name
:
'value'
,
func
:
target
.
function
||
'mean'
}];
target
.
fields
[
0
].
functions
=
[
gfunc
.
createFuncInstance
(
'scaleToSeconds'
,
{
withDefaultParams
:
true
}),
gfunc
.
createFuncInstance
(
'movingAverage'
,
{
withDefaultParams
:
true
}),
];
$scope
.
queryBuilder
=
new
InfluxQueryBuilder
(
target
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment