mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
refactor(docker/events): migrate list view to react [EE-2228] (#11581)
This commit is contained in:
parent
9797201c2a
commit
33ce841040
11 changed files with 71 additions and 69 deletions
|
@ -1,3 +0,0 @@
|
|||
<page-header title="'Event list'" breadcrumbs="['Events']" reload="true"> </page-header>
|
||||
|
||||
<docker-events-datatable dataset="events"></docker-events-datatable>
|
|
@ -1,23 +0,0 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker').controller('EventsController', [
|
||||
'$scope',
|
||||
'Notifications',
|
||||
'SystemService',
|
||||
function ($scope, Notifications, SystemService) {
|
||||
function initView() {
|
||||
const since = moment().subtract(24, 'hour').unix();
|
||||
const until = moment().unix();
|
||||
|
||||
SystemService.events({ since, until })
|
||||
.then(function success(data) {
|
||||
$scope.events = data;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to load events');
|
||||
});
|
||||
}
|
||||
|
||||
initView();
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue