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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user