diff --git a/public/app/partials/metrics.html b/public/app/partials/metrics.html index dd7199c336c..4aaffed9791 100644 --- a/public/app/partials/metrics.html +++ b/public/app/partials/metrics.html @@ -1,7 +1,7 @@
- +
diff --git a/public/app/plugins/datasource/influxdb_08/datasource.js b/public/app/plugins/datasource/influxdb_08/datasource.js index 0e4adba072c..5c1590168f1 100644 --- a/public/app/plugins/datasource/influxdb_08/datasource.js +++ b/public/app/plugins/datasource/influxdb_08/datasource.js @@ -4,6 +4,7 @@ define([ 'kbn', './influxSeries', './queryBuilder', + './directives', './queryCtrl', './funcEditor', ], diff --git a/public/app/plugins/datasource/influxdb_08/directives.js b/public/app/plugins/datasource/influxdb_08/directives.js new file mode 100644 index 00000000000..35a29975442 --- /dev/null +++ b/public/app/plugins/datasource/influxdb_08/directives.js @@ -0,0 +1,21 @@ +define([ + 'angular', +], +function (angular) { + 'use strict'; + + var module = angular.module('grafana.directives'); + + module.directive('metricQueryEditorInfluxdb08', function() { + return {controller: 'InfluxQueryCtrl_08', templateUrl: 'app/plugins/datasource/influxdb_08/partials/query.editor.html'}; + }); + + module.directive('metricQueryOptionsInfluxdb08', function() { + return {templateUrl: 'app/plugins/datasource/influxdb_08/partials/query.options.html'}; + }); + + module.directive('annotationsQueryEditorInfluxdb08', function() { + return {templateUrl: 'app/plugins/datasource/influxdb_08/partials/annotations.editor.html'}; + }); + +}); diff --git a/public/app/plugins/datasource/influxdb_08/partials/query.editor.html b/public/app/plugins/datasource/influxdb_08/partials/query.editor.html index 6744e00e5b1..61622d1069c 100644 --- a/public/app/plugins/datasource/influxdb_08/partials/query.editor.html +++ b/public/app/plugins/datasource/influxdb_08/partials/query.editor.html @@ -1,256 +1,168 @@ -
-
-
- +
+ - + - -
    -
  • - -
  • -
+ +
    +
  • + +
  • +
- - -
-
- -
- -
    -
  • - -
  • -
  • - alias -
  • -
  • - -
  • -
  • - group by time -
  • -
  • - -
  • -
- - - -
-
-
+
-
-
-
    -
  • - -
  • -
  • - group by time -
  • -
  • - -
  • -
  • - -
  • -
-
-
+
+ +
    +
  • + +
  • +
  • + alias +
  • +
  • + +
  • +
  • + group by time +
  • +
  • + +
  • +
- -
+ + +
diff --git a/public/app/plugins/datasource/influxdb_08/partials/query.options.html b/public/app/plugins/datasource/influxdb_08/partials/query.options.html new file mode 100644 index 00000000000..413616fb4be --- /dev/null +++ b/public/app/plugins/datasource/influxdb_08/partials/query.options.html @@ -0,0 +1,85 @@ +
+
+
    +
  • + +
  • +
  • + group by time +
  • +
  • + +
  • +
  • + +
  • +
+
+
+ + +
+ +
+
+ +
+
Alias patterns
+
    +
  • $s = series name
  • +
  • $g = group by
  • +
  • $[0-9] part of series name for series names seperated by dots.
  • +
+
+ +
+
Stacking and fill
+
    +
  • When stacking is enabled it important that points align
  • +
  • If there are missing points for one series it can cause gaps or missing bars
  • +
  • You must use fill(0), and select a group by time low limit
  • +
  • Use the group by time option below your queries and specify for example >10s if your metrics are written every 10 seconds
  • +
  • This will insert zeros for series that are missing measurements and will make stacking work properly
  • +
+
+ +
+
Group by time
+
    +
  • Group by time is important, otherwise the query could return many thousands of datapoints that will slow down Grafana
  • +
  • Leave the group by time field empty for each query and it will be calculated based on time range and pixel width of the graph
  • +
  • If you use fill(0) or fill(null) set a low limit for the auto group by time interval
  • +
  • The low limit can only be set in the group by time option below your queries
  • +
  • You set a low limit by adding a greater sign before the interval
  • +
  • Example: >60s if you write metrics to InfluxDB every 60 seconds
  • +
+
+ + +
+
+ + diff --git a/public/app/plugins/datasource/influxdb_08/plugin.json b/public/app/plugins/datasource/influxdb_08/plugin.json index 16dedc730a8..5b88ba2736a 100644 --- a/public/app/plugins/datasource/influxdb_08/plugin.json +++ b/public/app/plugins/datasource/influxdb_08/plugin.json @@ -8,9 +8,7 @@ "module": "plugins/datasource/influxdb_08/datasource", "partials": { - "config": "app/plugins/datasource/influxdb_08/partials/config.html", - "query": "app/plugins/datasource/influxdb_08/partials/query.editor.html", - "annotations": "app/plugins/datasource/influxdb_08/partials/annotations.editor.html" + "config": "app/plugins/datasource/influxdb_08/partials/config.html" }, "metrics": true,