canonical / lxd-ui

Easy and accessible container and virtual machine management. A browser interface for LXD
GNU General Public License v3.0
269 stars 33 forks source link

fix(header) ensure instance name is unique and ot matched against previous name #805

Closed edlerd closed 3 months ago

edlerd commented 3 months ago

Done

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @mas-who or @edlerd for access.
    • With a local copy of this branch, build and run as described in the docs.
  2. Perform the following QA steps:
    • rename an instance
    • change name to the same name as the current name. Previously it would cause a validation error, now it should be fine.
webteam-app commented 3 months ago

Demo

Jenkins

demos.haus

mas-who commented 3 months ago

code looks good and can confirm no validation error occurs once name is changed :slightly_smiling_face:

I found a pre-existing behaviour that's a bit strange:

  1. click on the rename header
  2. change the instance name but don't save
  3. click cancel
  4. click on the rename header again and it shows the changed name in step 2.

Is this intended behaviour?

edlerd commented 3 months ago
  1. click on the rename header
  2. change the instance name but don't save
  3. click cancel
  4. click on the rename header again and it shows the changed name in step 2.

Is this intended behaviour?

This is not ideal. Added a change to reset the value in the form on cancel.

mas-who commented 3 months ago

LGTM, thanks for the fix :+1: