From 261122ff4b2dcd74c9e263e8dce045c29928056c Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Tue, 23 Oct 2018 10:04:45 +0200 Subject: [PATCH] sync mysql query editor template with postgres --- .../mysql/partials/query.editor.html | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/public/app/plugins/datasource/mysql/partials/query.editor.html b/public/app/plugins/datasource/mysql/partials/query.editor.html index d01b201b748..f857244b438 100644 --- a/public/app/plugins/datasource/mysql/partials/query.editor.html +++ b/public/app/plugins/datasource/mysql/partials/query.editor.html @@ -100,36 +100,42 @@
- -
- -
-
-
-
+
+ +
+
+ -
-
-
+
+ -
-
-
-
-
+ +
+
+
+ -
-
{{ctrl.lastQueryMeta.sql}}
-
+
+
{{ctrl.lastQueryMeta.sql}}
+
-
-
Time series:
+  
+
Time series:
 - return column named time or time_sec (in UTC), as a unix time stamp or any sql native date data type. You can use the macros below.
 - return column(s) with numeric datatype as values
 Optional:
@@ -156,7 +162,7 @@ Macros:
 
 Example of group by and order by with $__timeGroup:
 SELECT
-  $__timeGroup(timestamp_col, '1h') AS time,
+  $__timeGroupAlias(timestamp_col, '1h'),
   sum(value_double) as value
 FROM yourtable
 GROUP BY 1
@@ -167,13 +173,13 @@ Or build your own conditionals using these macros which just return the values:
 - $__timeTo() ->  '2017-04-21T05:01:17Z'
 - $__unixEpochFrom() ->  1492750877
 - $__unixEpochTo() ->  1492750877
-		
-
+
+
- + -
-
{{ctrl.lastQueryError}}
-
+
+
{{ctrl.lastQueryError}}
+