diff --git a/config.js b/config.js index 0645ec4f640..a009e8a5a2f 100644 --- a/config.js +++ b/config.js @@ -15,7 +15,7 @@ If you need to configure the default dashboard, please see default.json */ var config = new Settings( { - elasticsearch: 'http://demo.kibana.org', + elasticsearch: 'http://localhost:9200', kibana_index: "kibana-int", timeformat: 'mm/dd HH:MM:ss', modules: ['histogram','map','pie','table','stringquery','sort', diff --git a/panels/histogram/editor.html b/panels/histogram/editor.html index 4a25c61a474..bf57461420b 100644 --- a/panels/histogram/editor.html +++ b/panels/histogram/editor.html @@ -44,4 +44,15 @@ - \ No newline at end of file + +
Panel Spy
+
+
+ +
+
+ The panel spy shows 'behind the scenes' information about a panel. It can + be accessed by clicking the in the top right + of the panel. +
+
diff --git a/panels/histogram/module.html b/panels/histogram/module.html index ee65f24e2b3..e8906f836d7 100644 --- a/panels/histogram/module.html +++ b/panels/histogram/module.html @@ -1,3 +1,6 @@ + + +
\ No newline at end of file diff --git a/panels/histogram/module.js b/panels/histogram/module.js index 75d5d0d0662..3736b76daef 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -76,6 +76,8 @@ angular.module('kibana.histogram', []) ).size(0) }) + $scope.populate_modal(request); + // Then run it var results = request.doSearch(); @@ -120,6 +122,17 @@ angular.module('kibana.histogram', []) }); } + // I really don't like this function, too much dom manip. Break out into directive? + $scope.populate_modal = function(request) { + $scope.modal = { + title: "Inspector", + body : "
Last Elasticsearch Query
"+
+          'curl -XGET '+config.elasticsearch+'/'+$scope.panel.index+"/_search?pretty -d'\n"+
+          angular.toJson(JSON.parse(request.toString()),true)+
+        "'
", + } + } + function set_time(time) { $scope.time = time; $scope.panel.index = _.isUndefined(time.index) ? $scope.panel.index : time.index diff --git a/panels/map/editor.html b/panels/map/editor.html index 31d28888db9..62051528119 100644 --- a/panels/map/editor.html +++ b/panels/map/editor.html @@ -22,3 +22,14 @@ +
Panel Spy
+
+
+ +
+
+ The panel spy shows 'behind the scenes' information about a panel. It can + be accessed by clicking the in the top right + of the panel. +
+
diff --git a/panels/map/module.html b/panels/map/module.html index 5f9537b8ea1..8ab93cb4b8a 100644 --- a/panels/map/module.html +++ b/panels/map/module.html @@ -1,3 +1,6 @@ + + +
\ No newline at end of file diff --git a/panels/map/module.js b/panels/map/module.js index d574dde83f4..fb14f275d06 100644 --- a/panels/map/module.js +++ b/panels/map/module.js @@ -31,7 +31,7 @@ angular.module('kibana.map', []) var request = $scope.ejs.Request().indices($scope.panel.index); // Then the insert into facet and make the request - var results = request + var request = request .facet(ejs.TermsFacet('map') .field($scope.panel.field) .size($scope.panel['size']) @@ -42,8 +42,11 @@ angular.module('kibana.map', []) ejs.RangeFilter($scope.time.field) .from($scope.time.from) .to($scope.time.to) - )))).size(0) - .doSearch(); + )))).size(0); + + $scope.populate_modal(request); + + var results = request.doSearch(); // Populate scope when we have results results.then(function(results) { @@ -57,6 +60,17 @@ angular.module('kibana.map', []) }); } + // I really don't like this function, too much dom manip. Break out into directive? + $scope.populate_modal = function(request) { + $scope.modal = { + title: "Inspector", + body : "
Last Elasticsearch Query
"+
+          'curl -XGET '+config.elasticsearch+'/'+$scope.panel.index+"/_search?pretty -d'\n"+
+          angular.toJson(JSON.parse(request.toString()),true)+
+        "'
", + } + } + function set_time(time) { $scope.time = time; $scope.panel.index = _.isUndefined(time.index) ? $scope.panel.index : time.index diff --git a/panels/pie/editor.html b/panels/pie/editor.html index 6db55109d39..7b11c6994d1 100644 --- a/panels/pie/editor.html +++ b/panels/pie/editor.html @@ -99,4 +99,15 @@ + +
Panel Spy
+
+
+ +
+
+ The panel spy shows 'behind the scenes' information about a panel. It can + be accessed by clicking the in the top right + of the panel. +
\ No newline at end of file diff --git a/panels/pie/module.html b/panels/pie/module.html index 54b75176ffc..bf515f98d86 100644 --- a/panels/pie/module.html +++ b/panels/pie/module.html @@ -1,5 +1,5 @@ - + diff --git a/panels/pie/module.js b/panels/pie/module.js index 714da221b81..3680b361d61 100644 --- a/panels/pie/module.js +++ b/panels/pie/module.js @@ -12,7 +12,8 @@ angular.module('kibana.pie', []) labels : true, mode : "terms", group : "default", - default_field : '_all' + default_field : '_all', + spyable : true, } _.defaults($scope.panel,_d) @@ -182,9 +183,10 @@ angular.module('kibana.pie', []) } } + // I really don't like this function, too much dom manip. Break out into directive? $scope.populate_modal = function(request) { $scope.modal = { - title: "Pie Inspector", + title: "Inspector", body : "
Last Elasticsearch Query
"+
           'curl -XGET '+config.elasticsearch+'/'+$scope.panel.index+"/_search?pretty -d'\n"+
           angular.toJson(JSON.parse(request.toString()),true)+
diff --git a/panels/table/editor.html b/panels/table/editor.html
index 4da04eb7852..ea57e2ea549 100644
--- a/panels/table/editor.html
+++ b/panels/table/editor.html
@@ -33,4 +33,17 @@
     
     
Font Size
-
\ No newline at end of file + + +
Panel Spy
+
+
+ +
+
+ The panel spy shows 'behind the scenes' information about a panel. It can + be accessed by clicking the in the top right + of the panel. +
+
+ diff --git a/panels/table/module.html b/panels/table/module.html index ef74ceadcfd..a40e3683b90 100644 --- a/panels/table/module.html +++ b/panels/table/module.html @@ -1,6 +1,6 @@ - +