mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
refactor(namespace): migrate namespace edit to react [r8s-125] (#38)
This commit is contained in:
parent
40c7742e46
commit
ce7e0d8d60
108 changed files with 3183 additions and 2194 deletions
|
@ -1,7 +1,12 @@
|
|||
import { compact } from 'lodash';
|
||||
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
|
||||
export const queryKeys = {
|
||||
list: (environmentId: number, options?: { withResourceQuota?: boolean }) =>
|
||||
list: (
|
||||
environmentId: EnvironmentId,
|
||||
options?: { withResourceQuota?: boolean }
|
||||
) =>
|
||||
compact([
|
||||
'environments',
|
||||
environmentId,
|
||||
|
@ -9,7 +14,7 @@ export const queryKeys = {
|
|||
'namespaces',
|
||||
options?.withResourceQuota,
|
||||
]),
|
||||
namespace: (environmentId: number, namespace: string) =>
|
||||
namespace: (environmentId: EnvironmentId, namespace: string) =>
|
||||
[
|
||||
'environments',
|
||||
environmentId,
|
||||
|
@ -17,4 +22,13 @@ export const queryKeys = {
|
|||
'namespaces',
|
||||
namespace,
|
||||
] as const,
|
||||
namespaceYAML: (environmentId: EnvironmentId, namespace: string) =>
|
||||
[
|
||||
'environments',
|
||||
environmentId,
|
||||
'kubernetes',
|
||||
'namespaces',
|
||||
namespace,
|
||||
'yaml',
|
||||
] as const,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue