diff --git a/hivemq-edge/src/frontend/src/extensions/datahub/components/helpers/DraftStatus.tsx b/hivemq-edge/src/frontend/src/extensions/datahub/components/helpers/DraftStatus.tsx index c3fd8e3cf..792dbe26d 100644 --- a/hivemq-edge/src/frontend/src/extensions/datahub/components/helpers/DraftStatus.tsx +++ b/hivemq-edge/src/frontend/src/extensions/datahub/components/helpers/DraftStatus.tsx @@ -2,7 +2,7 @@ import { FC } from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { Breadcrumb, BreadcrumbItem, ButtonGroup, HStack, Icon, Text, useDisclosure } from '@chakra-ui/react' -import { LuTrash2 } from 'react-icons/lu' +import { LuBookCopy, LuTrash2 } from 'react-icons/lu' import { PiPencilSimpleLineFill } from 'react-icons/pi' import IconButton from '@/components/Chakra/IconButton.tsx' @@ -27,6 +27,12 @@ const DraftStatus: FC = () => { setStatus(DesignerStatus.MODIFIED) } + function onHandleClone() { + setStatus(DesignerStatus.DRAFT, { name: '' }) + navigate(`/datahub/${PolicyType.CREATE_POLICY}`) + // TODO[NVL] This is not enough, we should "clean" the id of protected elements + } + function handleConfirmOnClose() { onConfirmDeleteClose() } @@ -57,11 +63,20 @@ const DraftStatus: FC = () => { } /> + + } + /> +