You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/components/events/eventsController.js

11 lines
395 B

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();
});
}]);