From cb06baf1aa01596462e05ab0e86d02cf98826c6d Mon Sep 17 00:00:00 2001 From: Nick De Villiers Date: Fri, 13 Dec 2024 14:34:19 +0000 Subject: [PATCH] feat(machines): Add 'Register as DPU' to configuration form MAASENG-3949 (#5568) - Added "Register as DPU" as an option to the "Machine configuration" form Resolves [MAASENG-3949](https://warthogs.atlassian.net/browse/MAASENG-3949) --- .../MachineConfiguration/MachineForm/MachineForm.test.tsx | 1 + .../MachineConfiguration/MachineForm/MachineForm.tsx | 1 + .../MachineForm/MachineFormFields/MachineFormFields.tsx | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx index 6df1d169eb..58b37f78b5 100644 --- a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx +++ b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx @@ -114,6 +114,7 @@ describe("MachineForm", () => { pxe_mac: machine.pxe_mac, system_id: machine.system_id, zone: { name: machine.zone.name }, + // TODO: add "is_dpu" here https://warthogs.atlassian.net/browse/MAASENG-4190 }); const actualActions = store.getActions(); await waitFor(() => { diff --git a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.tsx b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.tsx index 24a69c6fd9..53db1ee40a 100644 --- a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.tsx +++ b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.tsx @@ -85,6 +85,7 @@ const MachineForm = ({ systemId }: Props): JSX.Element | null => { pool: { name: values.pool }, system_id: machine.system_id, zone: { name: values.zone }, + // TODO: add "is_dpu" here https://warthogs.atlassian.net/browse/MAASENG-4190 }; dispatch(machineActions.update(params)); }} diff --git a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineFormFields/MachineFormFields.tsx b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineFormFields/MachineFormFields.tsx index 21e97ff963..d2b61185f9 100644 --- a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineFormFields/MachineFormFields.tsx +++ b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineFormFields/MachineFormFields.tsx @@ -14,6 +14,10 @@ const MachineFormFields = (): JSX.Element => { + {/* TODO: Remove feature flag https://warthogs.atlassian.net/browse/MAASENG-4186 */} + {import.meta.env.VITE_APP_DPU_PROVISIONING === "true" && ( + + )}