Skip to content

feat: Implement switch add/edit side panel MAASENG-6327#6016

Open
rumanowskak wants to merge 2 commits into
canonical:mainfrom
rumanowskak:feat-implement-switch-add/edit-side-panel-MAASENG-6327
Open

feat: Implement switch add/edit side panel MAASENG-6327#6016
rumanowskak wants to merge 2 commits into
canonical:mainfrom
rumanowskak:feat-implement-switch-add/edit-side-panel-MAASENG-6327

Conversation

@rumanowskak
Copy link
Copy Markdown
Contributor

@rumanowskak rumanowskak commented May 6, 2026

Done

  • Created AddSwitch side panel
  • Created EditSwitch side panel
  • Created DeleteSwitch side panel
  • Created tests and mock resolvers for AddSwitch, EditSwitch, and DeleteSwitch

QA steps

  • Set VITE_APP_SWITCH_PROVISIONING=true in .env.local
  • Go to MAAS UI
  • Click on Switches in the navigation
  • Click the "Add switch" button
  • Ensure the Add switch side panel opens with MAC address and image fields
  • Fill in a valid MAC address, select an image and click "Save switch"
  • Ensure the side panel closes after saving
  • Click the edit icon on a switch row
  • Ensure the Edit switch side panel opens with the image pre-filled
  • Change the image and click "Save switch"
  • Ensure the side panel closes after saving
  • Click the delete icon on a switch row
  • Ensure the Delete switch side panel opens with a confirmation message and "Delete switch" button
  • Click "Delete switch"
  • Ensure the side panel closes after confirming

Fixes

Resolves MAASENG-6327

Screenshots

Notes

Add switch: only mac_address and image fields are available (SwitchRequest)
Edit switch: only image can be updated (SwitchUpdateRequest); name, mac_address, enable_ztp, ztp_script, dhcp_option_code and second_mac_address are not yet supported

@nehjoshi
Copy link
Copy Markdown
Contributor

nehjoshi commented May 7, 2026

I'm having trouble saving the form when adding a switch (using maas-ui-demo as the backend). The server returns a status code 500 or 422 depending on the image selected. Maybe there is a backend issue that needs to be resolved?

@rumanowskak
Copy link
Copy Markdown
Contributor Author

I'm having trouble saving the form when adding a switch (using maas-ui-demo as the backend). The server returns a status code 500 or 422 depending on the image selected. Maybe there is a backend issue that needs to be resolved?

I think this is the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants