diff --git a/panels/timepicker/editor.html b/panels/timepicker/editor.html index a00aeeea138..0dc1f72f361 100644 --- a/panels/timepicker/editor.html +++ b/panels/timepicker/editor.html @@ -5,18 +5,25 @@
Time Field
- +
-
+
+
+
Index Settings
+
Index pattern Absolutes in double quotes
- + +
+
+
Failover Index If none match the pattern
+
Relative mode settings
Relative time options comma seperated
- +
Default timespan
diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index 2ea10aebaa7..40d5cde31b0 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -35,6 +35,7 @@ angular.module('kibana.timepicker', []) timespan : '15m', timefield : '@timestamp', index : '"logstash-"yyyy.mm.dd', + defaultindex : "NOINDEX", group : "default", refresh : { enable : false, @@ -195,7 +196,9 @@ angular.module('kibana.timepicker', []) }); return all_indices().then(function(p) { - return _.intersection(p,possible); + var indices = _.intersection(p,possible); + console.log(indices) + return indices.length == 0 ? [$scope.panel.defaultindex] : indices; }) };