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:
parent
1bcbfb8213
commit
dc574af734
6 changed files with 55 additions and 15 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue