diff --git a/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerConnectorForm.tsx b/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerConnectorForm.tsx index e399ed19b8..88f0f3ef6d 100644 --- a/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerConnectorForm.tsx +++ b/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerConnectorForm.tsx @@ -1,4 +1,5 @@ -import { TextInput } from 'ui-components'; +import { useState } from 'react'; +import { Checkbox, TextInput } from 'ui-components'; import { DFLink } from '@/components/DFLink'; import { RegistryFormProps } from '@/features/common/data-component/RegistryConnectorForm'; @@ -19,6 +20,8 @@ sample request body */ export const DockerConnectorForm = ({ errorMessage, fieldErrors }: RegistryFormProps) => { + const [isPublic, setIsPublic] = useState(false); + return ( <>
@@ -55,24 +58,42 @@ export const DockerConnectorForm = ({ errorMessage, fieldErrors }: RegistryFormP placeholder="Namespace" required /> - - + +
+ + { + setIsPublic(checked); + }} + /> +
+ {!isPublic && ( +
+ + +
+ )} +
Supported Versions: API version v2
diff --git a/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerPrivateConnectorForm.tsx b/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerPrivateConnectorForm.tsx index ec702cfcb7..2e8f789764 100644 --- a/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerPrivateConnectorForm.tsx +++ b/deepfence_frontend/apps/dashboard/src/components/registries-connector/DockerPrivateConnectorForm.tsx @@ -1,4 +1,5 @@ -import { TextInput } from 'ui-components'; +import { useState } from 'react'; +import { Checkbox, TextInput } from 'ui-components'; import { DFLink } from '@/components/DFLink'; import { RegistryFormProps } from '@/features/common/data-component/RegistryConnectorForm'; @@ -22,6 +23,8 @@ export const DockerPriavateConnectorForm = ({ errorMessage, fieldErrors, }: RegistryFormProps) => { + const [isPublic, setIsPublic] = useState(false); + return ( <> <> @@ -61,26 +64,43 @@ export const DockerPriavateConnectorForm = ({ helperText={fieldErrors?.['docker_registry_url']} required /> - - -
+
+ + { + setIsPublic(checked); + }} + /> +
+ {!isPublic && ( +
+ + +
+ )} + +
Supported Versions: API version v2