Moved map js files, added exporting and saving of dashboard, added timer service to manage global timer cancelling, switched to font awesome

This commit is contained in:
Rashid Khan
2013-02-12 08:42:31 -07:00
parent 0d8f1fab9b
commit 0703dd8799
25 changed files with 1123 additions and 97 deletions
+8 -7
View File
@@ -24,7 +24,7 @@ a pattern
*/
angular.module('kibana.timepicker', [])
.controller('timepicker', function($scope, eventBus, $timeout, $http) {
.controller('timepicker', function($scope, eventBus, $timeout, timer, $http) {
var _id = _.uniqueId();
@@ -88,13 +88,13 @@ angular.module('kibana.timepicker', [])
if(_.isNumber($scope.panel.refresh.interval)) {
if($scope.panel.refresh.interval < $scope.panel.refresh.min) {
$scope.panel.refresh.interval = $scope.panel.refresh.min
$timeout.cancel($scope.panel.refresh.timer)
timer.cancel($scope.refresh_timer)
return;
}
$timeout.cancel($scope.panel.refresh.timer)
timer.cancel($scope.refresh_timer)
$scope.refresh()
} else {
$timeout.cancel($scope.panel.refresh.timer)
timer.cancel($scope.refresh_timer)
}
});
});
@@ -103,12 +103,13 @@ angular.module('kibana.timepicker', [])
$scope.refresh = function() {
if ($scope.panel.refresh.enable) {
$scope.time_apply();
$scope.panel.refresh.timer = $timeout(
timer.cancel($scope.refresh_timer)
$scope.refresh_timer = timer.register($timeout(
$scope.refresh,
$scope.panel.refresh.interval*1000
);
));
} else {
$timeout.cancel($scope.panel.refresh.timer)
timer.cancel($scope.refresh_timer)
}
}