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:
parent
9797201c2a
commit
33ce841040
11 changed files with 71 additions and 69 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue