|
|
@ -3,13 +3,14 @@ angular.module('kibana.histogram', []) |
|
|
|
|
|
|
|
|
|
|
|
// Set and populate defaults
|
|
|
|
// Set and populate defaults
|
|
|
|
var _d = { |
|
|
|
var _d = { |
|
|
|
query : [ {query: "*", label:"Query"} ], |
|
|
|
query : [ {query: "*", label:"Query"} ], |
|
|
|
interval: secondsToHms(calculate_interval($scope.from,$scope.to,40,0)/1000), |
|
|
|
interval : secondsToHms(calculate_interval($scope.from,$scope.to,40,0)/1000), |
|
|
|
show : ['bars','y-axis','x-axis','legend'], |
|
|
|
show : ['bars','y-axis','x-axis','legend'], |
|
|
|
fill : 3, |
|
|
|
fill : 3, |
|
|
|
timezone: 'browser', // browser, utc or a standard timezone
|
|
|
|
timezone : 'browser', // browser, utc or a standard timezone
|
|
|
|
spyable : true, |
|
|
|
spyable : true, |
|
|
|
group : "default", |
|
|
|
zoomlinks : true, |
|
|
|
|
|
|
|
group : "default", |
|
|
|
} |
|
|
|
} |
|
|
|
_.defaults($scope.panel,_d) |
|
|
|
_.defaults($scope.panel,_d) |
|
|
|
|
|
|
|
|
|
|
@ -123,6 +124,12 @@ angular.module('kibana.histogram', []) |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// function $scope.zoom
|
|
|
|
|
|
|
|
// factor :: Zoom factor, so 0.5 = cuts timespan in half, 2 doubles timespan
|
|
|
|
|
|
|
|
$scope.zoom = function(factor) { |
|
|
|
|
|
|
|
eventBus.broadcast($scope.$id,$scope.panel.group,'zoom',factor) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// I really don't like this function, too much dom manip. Break out into directive?
|
|
|
|
// I really don't like this function, too much dom manip. Break out into directive?
|
|
|
|
$scope.populate_modal = function(request) { |
|
|
|
$scope.populate_modal = function(request) { |
|
|
|
$scope.modal = { |
|
|
|
$scope.modal = { |
|
|
|