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

fix(container): runtime and resources issues EE-6306 (#10611)

This commit is contained in:
cmeng 2023-11-27 11:56:44 +13:00 committed by GitHub
parent 1bcbfb8213
commit dc574af734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 15 deletions

View file

@ -12,6 +12,7 @@ import { PortainerResponse } from '@/react/docker/types';
import axios, { parseAxiosError } from '@/portainer/services/axios';
import { ContainerId } from '@/react/docker/containers/types';
import { EnvironmentId } from '@/react/portainer/environments/types';
import { queryClient } from '@/react-tools/react-query';
import { urlBuilder } from '../containers.service';
@ -89,6 +90,15 @@ export function useContainer(
);
}
export function invalidateContainer(
environmentId: EnvironmentId,
containerId?: ContainerId
) {
return queryClient.invalidateQueries(
containerId ? queryKeys.container(environmentId, containerId) : []
);
}
export type ContainerResponse = PortainerResponse<ContainerJSON>;
async function getContainer(