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
41eb0ba5
Commit
41eb0ba5
authored
Jun 12, 2018
by
Jürgen Kreileder
Committed by
Clément MATHIEU
Dec 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for InfluxDB's time zone clause
parent
8b4083a6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
public/app/plugins/datasource/influxdb/influx_query.ts
+4
-0
public/app/plugins/datasource/influxdb/partials/query.editor.html
+10
-0
public/app/plugins/datasource/influxdb/query_ctrl.ts
+7
-0
No files found.
public/app/plugins/datasource/influxdb/influx_query.ts
View file @
41eb0ba5
...
...
@@ -256,6 +256,10 @@ export default class InfluxQuery {
query += ' SLIMIT ' + target.slimit;
}
if (target.tz) {
query += "
tz
(
'" + target.tz + "'
)
";
}
return query;
}
...
...
public/app/plugins/datasource/influxdb/partials/query.editor.html
View file @
41eb0ba5
...
...
@@ -119,6 +119,16 @@
</div>
</div>
<div
class=
"gf-form-inline"
ng-if=
"ctrl.target.tz"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword width-7"
>
tz
</label>
<input
type=
"text"
class=
"gf-form-input width-9"
ng-model=
"ctrl.target.tz"
spellcheck=
'false'
placeholder=
"No Timezone"
ng-blur=
"ctrl.refresh()"
>
</div>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
</div>
</div>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword width-7"
>
FORMAT AS
</label>
...
...
public/app/plugins/datasource/influxdb/query_ctrl.ts
View file @
41eb0ba5
...
...
@@ -100,6 +100,9 @@ export class InfluxQueryCtrl extends QueryCtrl {
if
(
!
this
.
target
.
slimit
)
{
options
.
push
(
this
.
uiSegmentSrv
.
newSegment
({
value
:
'SLIMIT'
}));
}
if
(
!
this
.
target
.
tz
)
{
options
.
push
(
this
.
uiSegmentSrv
.
newSegment
({
value
:
'tz'
}));
}
if
(
this
.
target
.
orderByTime
===
'ASC'
)
{
options
.
push
(
this
.
uiSegmentSrv
.
newSegment
({
value
:
'ORDER BY time DESC'
}));
}
...
...
@@ -124,6 +127,10 @@ export class InfluxQueryCtrl extends QueryCtrl {
this
.
target
.
slimit
=
10
;
break
;
}
case
'tz'
:
{
this
.
target
.
tz
=
'UTC'
;
break
;
}
case
'ORDER BY time DESC'
:
{
this
.
target
.
orderByTime
=
'DESC'
;
break
;
...
...
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