Skip to content

Commit

Permalink
feat(machines): Add 'Register as DPU' to configuration form MAASENG-3…
Browse files Browse the repository at this point in the history
…949 (#5568)

- Added "Register as  DPU" as an option to the "Machine configuration" form

Resolves [MAASENG-3949](https://warthogs.atlassian.net/browse/MAASENG-3949)
  • Loading branch information
ndv99 authored Dec 13, 2024
1 parent ecb7b02 commit cb06baf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const MachineFormFields = (): JSX.Element => {
<MinimumKernelSelect name="minHweKernel" />
<ZoneSelect name="zone" />
<ResourcePoolSelect name="pool" />
{/* TODO: Remove feature flag https://warthogs.atlassian.net/browse/MAASENG-4186 */}
{import.meta.env.VITE_APP_DPU_PROVISIONING === "true" && (
<FormikField label="Register as DPU" name="is_dpu" type="checkbox" />
)}
<FormikField component={Textarea} label="Note" name="description" />
</Col>
</Row>
Expand Down

0 comments on commit cb06baf

Please sign in to comment.