1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00
portainer/app/react/docker/queries/utils/root.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
673 B
TypeScript
Raw Permalink Normal View History

import { EnvironmentId } from '@/react/portainer/environments/types';
import { buildDockerUrl } from './buildDockerUrl';
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 buildDockerSnapshotUrl(environmentId: EnvironmentId) {
return buildDockerUrl(environmentId, 'snapshot');
}