1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

Added events endpoint.

This commit is contained in:
Kevan Ahlquist 2015-03-26 14:12:44 -05:00
parent d6c524f960
commit 32a4703a53
9 changed files with 49 additions and 8 deletions

View file

@ -0,0 +1,10 @@
angular.module('events', [])
.controller('EventsController', ['Settings', '$scope', function(Settings, $scope) {
var yesterday = Math.floor(Date.now() / 1000) - 86400; // Today's date minus 24 hours.
$scope.dockerEvents = [];
oboe(Settings.url + '/events' + '?since=' + yesterday)
.done(function(node) {
$scope.dockerEvents.push(node);
$scope.$apply();
});
}]);