Added debug panel (not by default), added inspector link to pie and table

This commit is contained in:
Rashid Khan
2013-03-11 17:13:47 -07:00
parent ffe392c017
commit a7a42b3e04
12 changed files with 166 additions and 222816 deletions
+16 -4
View File
@@ -78,9 +78,8 @@ angular.module('kibana.table', [])
return
$scope.panel.loading = true;
var request = $scope.ejs.Request().indices($scope.panel.index);
var results = request
var request = $scope.ejs.Request().indices($scope.panel.index)
.query(ejs.FilteredQuery(
ejs.QueryStringQuery($scope.panel.query || '*'),
ejs.RangeFilter($scope.time.field)
@@ -90,8 +89,11 @@ angular.module('kibana.table', [])
)
.size($scope.panel.size)
.from($scope.panel.offset)
.sort($scope.panel.sort[0],$scope.panel.sort[1])
.doSearch();
.sort($scope.panel.sort[0],$scope.panel.sort[1]);
$scope.populate_modal(request)
var results = request.doSearch();
// Populate scope when we have results
results.then(function(results) {
@@ -112,6 +114,16 @@ angular.module('kibana.table', [])
});
}
$scope.populate_modal = function(request) {
$scope.modal = {
title: "Table Inspector",
body : "<h5>Last Elasticsearch Query</h5><pre>"+
'curl -XGET '+config.elasticsearch+'/'+$scope.panel.index+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
"'</pre>",
}
}
$scope.without_kibana = function (row) {
row = _.clone(row)
delete row.kibana