You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/docker/queries/utils/root.ts

20 lines
726 B

import { EnvironmentId } from '@/react/portainer/environments/types';
export const queryKeys = {
root: (environmentId: EnvironmentId) => ['docker', environmentId] as const,
snapshot: (environmentId: EnvironmentId) =>
[...queryKeys.root(environmentId), 'snapshot'] as const,
snapshotQuery: (environmentId: EnvironmentId) =>
[...queryKeys.snapshot(environmentId)] as const,
plugins: (environmentId: EnvironmentId) =>
[...queryKeys.root(environmentId), 'plugins'] as const,
};
export function buildDockerUrl(environmentId: EnvironmentId) {
return `/docker/${environmentId}`;
}
export function buildDockerSnapshotUrl(environmentId: EnvironmentId) {
return `${buildDockerUrl(environmentId)}/snapshot`;
}