1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

refactor(docker/events): migrate list view to react [EE-2228] (#11581)

This commit is contained in:
Chaim Lev-Ari 2024-08-28 13:41:15 -06:00 committed by GitHub
parent 9797201c2a
commit 33ce841040
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 71 additions and 69 deletions

View file

@ -1,8 +1,6 @@
import { ping } from '@/react/docker/proxy/queries/usePing';
import { getInfo } from '@/react/docker/proxy/queries/useInfo';
import { getVersion } from '@/react/docker/proxy/queries/useVersion';
import { getEvents } from '@/react/docker/proxy/queries/useEvents';
import { EventViewModel } from '../models/event';
angular.module('portainer.docker').factory('SystemService', SystemServiceFactory);
@ -14,15 +12,5 @@ function SystemServiceFactory(AngularToReact) {
info: useAxios(injectEnvironmentId(getInfo)), // dashboard + docker host view + docker host browser + swarm inspect views + stateManager (update endpoint state)
ping: useAxios(ping), // docker/__module onEnter abstract /docker subpath
version: useAxios(injectEnvironmentId(getVersion)), // docker host view + swarm inspect view + stateManager (update endpoint state)
events: useAxios(injectEnvironmentId(eventsAngularJS)), // events list
};
/**
* @param {EnvironmentId} environmentId Injected
* @param {{since: string; until: string;}} param1
*/
async function eventsAngularJS(environmentId, { since, until }) {
const data = await getEvents(environmentId, { since, until });
return data.map((e) => new EventViewModel(e));
}
}