Updated default dashboard, added filtering panel

This commit is contained in:
Rashid Khan
2013-07-14 21:42:35 -07:00
parent de8f8c5851
commit 2c5eb8bfb4
14 changed files with 230 additions and 87 deletions
+7 -8
View File
@@ -32,12 +32,6 @@
* x-axis :: Show x-axis labels and grid lines
* y-axis :: Show y-axis labels and grid lines
* interactive :: Allow drag to select time range
### Group Events
#### Receives
* time :: An object containing the time range to use and the index(es) to query
* query :: An Array of queries, even if its only one
#### Sends
* get_time :: On panel initialization get time range to query
*/
@@ -80,6 +74,8 @@ angular.module('kibana.histogram', [])
$scope.get_data();
})
$scope.get_data()
}
$scope.get_data = function(segment,query_id) {
@@ -157,7 +153,10 @@ angular.module('kibana.histogram', [])
// Null values at each end of the time range ensure we see entire range
if(_.isUndefined($scope.data[i]) || _segment == 0) {
var data = [[_range.from.getTime(), null],[_range.to.getTime(), null]];
var data = []
if(filterSrv.idsByType('time').length > 0) {
data = [[_range.from.getTime(), null],[_range.to.getTime(), null]];
}
var hits = 0;
} else {
var data = $scope.data[i].data
@@ -236,7 +235,7 @@ angular.module('kibana.histogram', [])
$scope.modal = {
title: "Inspector",
body : "<h5>Last Elasticsearch Query</h5><pre>"+
'curl -XGET '+config.elasticsearch+'/'+$scope.index+"/_search?pretty -d'\n"+
'curl -XGET '+config.elasticsearch+'/'+dashboard.indices+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
"'</pre>",
}