瀏覽代碼

tsdb: update query and annotation editor help texts for postgres

In addition to closing #11578
Marcus Efraimsson 7 年之前
父節點
當前提交
3a5d1f4594

+ 4 - 4
public/app/plugins/datasource/postgres/partials/annotations.editor.html

@@ -28,12 +28,12 @@ An annotation is an event that is overlaid on top of graphs. The query can have
 Macros:
 - $__time(column) -> column as "time"
 - $__timeEpoch -> extract(epoch from column) as "time"
-- $__timeFilter(column) ->  column ≥ to_timestamp(1492750877) AND column ≤ to_timestamp(1492750877)
-- $__unixEpochFilter(column) ->  column > 1492750877 AND column < 1492750877
+- $__timeFilter(column) -> column BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:01:17Z'
+- $__unixEpochFilter(column) ->  column >= 1492750877 AND column <= 1492750877
 
 Or build your own conditionals using these macros which just return the values:
-- $__timeFrom() ->  to_timestamp(1492750877)
-- $__timeTo() ->  to_timestamp(1492750877)
+- $__timeFrom() ->  '2017-04-21T05:01:17Z'
+- $__timeTo() ->  '2017-04-21T05:01:17Z'
 - $__unixEpochFrom() ->  1492750877
 - $__unixEpochTo() ->  1492750877
 		</pre>

+ 4 - 4
public/app/plugins/datasource/postgres/partials/query.editor.html

@@ -48,8 +48,8 @@ Table:
 Macros:
 - $__time(column) -&gt; column as "time"
 - $__timeEpoch -&gt; extract(epoch from column) as "time"
-- $__timeFilter(column) -&gt;  extract(epoch from column) BETWEEN 1492750877 AND 1492750877
-- $__unixEpochFilter(column) -&gt;  column &gt; 1492750877 AND column &lt; 1492750877
+- $__timeFilter(column) -&gt; column BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:01:17Z'
+- $__unixEpochFilter(column) -&gt;  column &gt;= 1492750877 AND column &lt;= 1492750877
 - $__timeGroup(column,'5m') -&gt; (extract(epoch from column)/300)::bigint*300 AS time
 
 Example of group by and order by with $__timeGroup:
@@ -61,8 +61,8 @@ GROUP BY time
 ORDER BY time
 
 Or build your own conditionals using these macros which just return the values:
-- $__timeFrom() -&gt;  to_timestamp(1492750877)
-- $__timeTo() -&gt;  to_timestamp(1492750877)
+- $__timeFrom() -&gt;  '2017-04-21T05:01:17Z'
+- $__timeTo() -&gt;  '2017-04-21T05:01:17Z'
 - $__unixEpochFrom() -&gt;  1492750877
 - $__unixEpochTo() -&gt;  1492750877
 		</pre>