Added spy panels to map and histogram, added editor toggle to enable/disable spy

This commit is contained in:
Rashid Khan
2013-03-12 09:20:18 -07:00
parent c1b709674c
commit d18d911de9
12 changed files with 91 additions and 10 deletions
+13
View File
@@ -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 : "<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>",
}
}
function set_time(time) {
$scope.time = time;
$scope.panel.index = _.isUndefined(time.index) ? $scope.panel.index : time.index