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:
@@ -36,4 +36,28 @@ angular.module('kibana.services', [])
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
.service('timer', function($timeout) {
|
||||
// This service really just tracks a list of $timeout promises to give us a
|
||||
// method for cancelling them all when we need to
|
||||
|
||||
var timers = [];
|
||||
|
||||
this.register = function(promise) {
|
||||
timers.push(promise);
|
||||
return promise;
|
||||
}
|
||||
|
||||
this.cancel = function(promise) {
|
||||
timers = _.without(timers,promise)
|
||||
$timeout.cancel(promise)
|
||||
}
|
||||
|
||||
this.cancel_all = function() {
|
||||
_.each(timers, function(t){
|
||||
$timeout.cancel(t);
|
||||
});
|
||||
timers = new Array();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user