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
+6 -1
View File
@@ -1,4 +1,9 @@
<kibana-panel ng-controller='table' ng-init='init()'>
<span style="position:absolute;right:0px;top:0px" class='panelextra pointer'>
<i bs-modal="'partials/modal.html'" class="icon-eye-open"></i>
</span>
<div style="height:{{panel.height || row.height}};overflow-y:auto;overflow-x:auto">
<div class="row-fluid">
<div class="span1 offset3" style="text-align:right">
@@ -62,4 +67,4 @@
</div>
</div>
</div>
</kibana-panel>
</kibana-panel>
+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