mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +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
|
@ -2,7 +2,7 @@ import { KeyToPath, Pod, Secret } from 'kubernetes-types/core/v1';
|
|||
import { Asterisk, Plus } from 'lucide-react';
|
||||
|
||||
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
||||
import { useSecrets } from '@/react/kubernetes/configs/secret.service';
|
||||
import { useK8sSecrets } from '@/react/kubernetes/configs/queries/useK8sSecrets';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
import { Link } from '@@/Link';
|
||||
|
@ -18,7 +18,7 @@ type Props = {
|
|||
export function ApplicationVolumeConfigsTable({ namespace, app }: Props) {
|
||||
const containerVolumeConfigs = getApplicationVolumeConfigs(app);
|
||||
|
||||
const { data: secrets } = useSecrets(useEnvironmentId(), namespace);
|
||||
const { data: secrets } = useK8sSecrets(useEnvironmentId(), namespace);
|
||||
|
||||
if (containerVolumeConfigs.length === 0) {
|
||||
return null;
|
||||
|
|
|
@ -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