From 1081de13c26a6cdec3edcd6067a382a3adfe8a30 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Wed, 4 Dec 2013 09:48:31 -0700 Subject: [PATCH 1/2] added dashboard.current.index.warm_fields to allow disabling of pre-parsing the mapping. --- src/app/dashboards/blank.json | 3 +- src/app/dashboards/default.json | 55 +++----------------------------- src/app/dashboards/guided.json | 3 +- src/app/dashboards/noted.json | 3 +- src/app/panels/table/module.html | 8 ++--- src/app/partials/dasheditor.html | 4 +++ src/app/services/dashboard.js | 3 +- src/app/services/fields.js | 2 +- 8 files changed, 21 insertions(+), 60 deletions(-) diff --git a/src/app/dashboards/blank.json b/src/app/dashboards/blank.json index f73ee1fc5a9..e21f69458e0 100644 --- a/src/app/dashboards/blank.json +++ b/src/app/dashboards/blank.json @@ -26,6 +26,7 @@ "index": { "interval": "none", "pattern": "[logstash-]YYYY.MM.DD", - "default": "_all" + "default": "_all", + "warm_fields": false } } \ No newline at end of file diff --git a/src/app/dashboards/default.json b/src/app/dashboards/default.json index 5a5bc905735..ea0ed6ef516 100644 --- a/src/app/dashboards/default.json +++ b/src/app/dashboards/default.json @@ -64,61 +64,14 @@ "index": { "interval": "none", "pattern": "[logstash-]YYYY.MM.DD", - "default": "_all" + "default": "_all", + "warm_fields": false }, "style": "dark", "failover": false, "panel_hints": true, - "pulldowns": [ - { - "type": "query", - "collapse": true, - "notice": false, - "query": "*", - "pinned": true, - "history": [], - "remember": 10 - }, - { - "type": "filtering", - "collapse": true, - "notice": false - } - ], - "nav": [ - { - "type": "timepicker", - "collapse": false, - "notice": false, - "status": "Stable", - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ], - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "timefield": "@timestamp", - "now": true, - "filter_id": 0 - } - ], + "pulldowns": [], + "nav": [], "loader": { "save_gist": false, "save_elasticsearch": true, diff --git a/src/app/dashboards/guided.json b/src/app/dashboards/guided.json index eabb77f9db9..81b69f837b2 100644 --- a/src/app/dashboards/guided.json +++ b/src/app/dashboards/guided.json @@ -200,7 +200,8 @@ "index": { "interval": "none", "pattern": "[logstash-]YYYY.MM.DD", - "default": "_all" + "default": "_all", + "warm_fields": false }, "style": "dark", "failover": false, diff --git a/src/app/dashboards/noted.json b/src/app/dashboards/noted.json index 8f2db5024b6..a45e0690baa 100644 --- a/src/app/dashboards/noted.json +++ b/src/app/dashboards/noted.json @@ -89,7 +89,8 @@ "index": { "interval": "none", "pattern": "[logstash-]YYYY.MM.DD", - "default": "_all" + "default": "_all", + "warm_fields": false }, "style": "dark", "failover": false, diff --git a/src/app/panels/table/module.html b/src/app/panels/table/module.html index d8f8e9091e6..bff0bf091ec 100644 --- a/src/app/panels/table/module.html +++ b/src/app/panels/table/module.html @@ -10,11 +10,11 @@
+
+
Preload Fields
+ +
diff --git a/src/app/services/dashboard.js b/src/app/services/dashboard.js index 35abb269f07..f73e5e22255 100644 --- a/src/app/services/dashboard.js +++ b/src/app/services/dashboard.js @@ -57,7 +57,8 @@ function (angular, $, kbn, _, config, moment, Modernizr) { index: { interval: 'none', pattern: '_all', - default: 'INDEX_MISSING' + default: 'INDEX_MISSING', + warm_fields: true }, refresh: false }; diff --git a/src/app/services/fields.js b/src/app/services/fields.js index 258c60c1371..fab62d28aa4 100644 --- a/src/app/services/fields.js +++ b/src/app/services/fields.js @@ -17,7 +17,7 @@ function (angular, _, config) { this.fullMapping = {}; $rootScope.$watch(function(){return dashboard.indices;},function(n) { - if(!_.isUndefined(n) && n.length) { + if(!_.isUndefined(n) && n.length && dashboard.current.index.warm_fields) { // Only get the mapping for indices we don't know it for var indices = _.difference(n,_.keys(self.fullMapping)); // Only get the mapping if there are new indices From f4cc56468a0e56d33a1b1a057852c856f9651d74 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Wed, 4 Dec 2013 09:48:59 -0700 Subject: [PATCH 2/2] Change time picker tooltip if there is no time filter --- src/app/panels/timepicker/module.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/panels/timepicker/module.html b/src/app/panels/timepicker/module.html index 9e7fee907a8..7273ba008e2 100644 --- a/src/app/panels/timepicker/module.html +++ b/src/app/panels/timepicker/module.html @@ -15,7 +15,7 @@