1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00

refactor(apps): migrate applications view to react [r8s-124] (#28)

This commit is contained in:
Ali 2024-10-25 12:28:05 +13:00 committed by GitHub
parent cc75167437
commit 959c527be7
42 changed files with 1378 additions and 1293 deletions

View file

@ -0,0 +1,105 @@
import { EnvironmentId } from '@/react/portainer/environments/types';
export type GetAppsParams = {
namespace?: string;
nodeName?: string;
withDependencies?: boolean;
};
export const queryKeys = {
applications: (environmentId: EnvironmentId, params?: GetAppsParams) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
params,
] as const,
application: (
environmentId: EnvironmentId,
namespace: string,
name: string,
yaml?: boolean
) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
namespace,
name,
yaml,
] as const,
applicationRevisions: (
environmentId: EnvironmentId,
namespace: string,
name: string,
labelSelector?: string
) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
namespace,
name,
'revisions',
labelSelector,
] as const,
applicationServices: (
environmentId: EnvironmentId,
namespace: string,
name: string
) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
namespace,
name,
'services',
] as const,
ingressesForApplication: (
environmentId: EnvironmentId,
namespace: string,
name: string
) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
namespace,
name,
'ingresses',
] as const,
applicationHorizontalPodAutoscalers: (
environmentId: EnvironmentId,
namespace: string,
name: string
) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
namespace,
name,
'horizontalpodautoscalers',
] as const,
applicationPods: (
environmentId: EnvironmentId,
namespace: string,
name: string
) =>
[
'environments',
environmentId,
'kubernetes',
'applications',
namespace,
name,
'pods',
] as const,
};