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
3a5d1f45
Unverified
Commit
3a5d1f45
authored
Apr 16, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tsdb: update query and annotation editor help texts for postgres
In addition to closing #11578
parent
69d1330a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
public/app/plugins/datasource/postgres/partials/annotations.editor.html
+4
-4
public/app/plugins/datasource/postgres/partials/query.editor.html
+4
-4
No files found.
public/app/plugins/datasource/postgres/partials/annotations.editor.html
View file @
3a5d1f45
...
@@ -28,12 +28,12 @@ An annotation is an event that is overlaid on top of graphs. The query can have
...
@@ -28,12 +28,12 @@ An annotation is an event that is overlaid on top of graphs. The query can have
Macros:
Macros:
- $__time(column) -
>
column as "time"
- $__time(column) -
>
column as "time"
- $__timeEpoch -
>
extract(epoch from column) as "time"
- $__timeEpoch -
>
extract(epoch from column) as "time"
- $__timeFilter(column) -
>
column
≥
to_timestamp(1492750877) AND column
≤
to_timestamp(1492750877)
- $__timeFilter(column) -
>
column BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:01:17Z'
- $__unixEpochFilter(column) -
>
column
>
1492750877 AND column
<
1492750877
- $__unixEpochFilter(column) -
>
column
>
= 1492750877 AND column
<
=
1492750877
Or build your own conditionals using these macros which just return the values:
Or build your own conditionals using these macros which just return the values:
- $__timeFrom() -
>
to_timestamp(1492750877)
- $__timeFrom() -
>
'2017-04-21T05:01:17Z'
- $__timeTo() -
>
to_timestamp(1492750877)
- $__timeTo() -
>
'2017-04-21T05:01:17Z'
- $__unixEpochFrom() -
>
1492750877
- $__unixEpochFrom() -
>
1492750877
- $__unixEpochTo() -
>
1492750877
- $__unixEpochTo() -
>
1492750877
</pre>
</pre>
...
...
public/app/plugins/datasource/postgres/partials/query.editor.html
View file @
3a5d1f45
...
@@ -48,8 +48,8 @@ Table:
...
@@ -48,8 +48,8 @@ Table:
Macros:
Macros:
- $__time(column) -
>
column as "time"
- $__time(column) -
>
column as "time"
- $__timeEpoch -
>
extract(epoch from column) as "time"
- $__timeEpoch -
>
extract(epoch from column) as "time"
- $__timeFilter(column) -
>
extract(epoch from column) BETWEEN 1492750877 AND 1492750877
- $__timeFilter(column) -
>
column BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:01:17Z'
- $__unixEpochFilter(column) -
>
column
>
1492750877 AND column
<
1492750877
- $__unixEpochFilter(column) -
>
column
>
= 1492750877 AND column
<
=
1492750877
- $__timeGroup(column,'5m') -
>
(extract(epoch from column)/300)::bigint*300 AS time
- $__timeGroup(column,'5m') -
>
(extract(epoch from column)/300)::bigint*300 AS time
Example of group by and order by with $__timeGroup:
Example of group by and order by with $__timeGroup:
...
@@ -61,8 +61,8 @@ GROUP BY time
...
@@ -61,8 +61,8 @@ GROUP BY time
ORDER BY time
ORDER BY time
Or build your own conditionals using these macros which just return the values:
Or build your own conditionals using these macros which just return the values:
- $__timeFrom() -
>
to_timestamp(1492750877)
- $__timeFrom() -
>
'2017-04-21T05:01:17Z'
- $__timeTo() -
>
to_timestamp(1492750877)
- $__timeTo() -
>
'2017-04-21T05:01:17Z'
- $__unixEpochFrom() -
>
1492750877
- $__unixEpochFrom() -
>
1492750877
- $__unixEpochTo() -
>
1492750877
- $__unixEpochTo() -
>
1492750877
</pre>
</pre>
...
...
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