mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(namespace): migrate namespace access view to react [r8s-141] (#87)
This commit is contained in:
parent
8ed7cd80cb
commit
e9fc6d5598
62 changed files with 1018 additions and 610 deletions
|
@ -1,7 +1,7 @@
|
|||
import { FormikErrors } from 'formik';
|
||||
|
||||
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
||||
import { useConfigMaps } from '@/react/kubernetes/configs/configmap.service';
|
||||
import { useK8sConfigMaps } from '@/react/kubernetes/configs/queries/useK8sConfigMaps';
|
||||
|
||||
import { FormSection } from '@@/form-components/FormSection/FormSection';
|
||||
import { TextTip } from '@@/Tip/TextTip';
|
||||
|
@ -24,7 +24,7 @@ export function ConfigMapsFormSection({
|
|||
errors,
|
||||
namespace,
|
||||
}: Props) {
|
||||
const configMapsQuery = useConfigMaps(useEnvironmentId(), namespace);
|
||||
const configMapsQuery = useK8sConfigMaps(useEnvironmentId(), namespace);
|
||||
const configMaps = configMapsQuery.data || [];
|
||||
|
||||
if (configMapsQuery.isLoading) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { FormikErrors } from 'formik';
|
||||
|
||||
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
||||
import { useSecrets } from '@/react/kubernetes/configs/secret.service';
|
||||
import { useK8sSecrets } from '@/react/kubernetes/configs/queries/useK8sSecrets';
|
||||
|
||||
import { FormSection } from '@@/form-components/FormSection/FormSection';
|
||||
import { TextTip } from '@@/Tip/TextTip';
|
||||
|
@ -24,7 +24,7 @@ export function SecretsFormSection({
|
|||
errors,
|
||||
namespace,
|
||||
}: Props) {
|
||||
const secretsQuery = useSecrets(useEnvironmentId(), namespace);
|
||||
const secretsQuery = useK8sSecrets(useEnvironmentId(), namespace);
|
||||
const secrets = secretsQuery.data || [];
|
||||
|
||||
if (secretsQuery.isLoading) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue