Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use config api for storage forms #623

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

edlerd
Copy link
Collaborator

@edlerd edlerd commented Jan 24, 2024

Done

  • Use config api for storage forms for form fields help text and default values on storage pools and volumes
  • Fix link generation in help texts from config api for link tags containing underscores
  • Fix storage volume form, switching between pools with different drivers, null the unsupported fields from the previous driver

Fixes WD-7393

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 @lorumic or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • check create (and edit) storage pool (and storage volume) forms
    • enable override for all fields, pay attention to help texts and default values. Ensure links in help texts are working fine and rendered correctly.
    • create storage volume -- chose a pool with a driver that has sub-forms in the menu, enable overrides in those sections (i.e. zfs or filesystem), switch to another pool with a driver that doesn't support those sub-form configs. Ensure the values are reset after switching the pool for the volume.

@webteam-app
Copy link

Demo starting at https://lxd-ui-623.demos.haus

@mas-who
Copy link
Collaborator

mas-who commented Jan 26, 2024

  1. Snapshot name pattern config has weird description. I am aware there is a discussion with the core team about this, maybe we can manually remove this for now and revert the change when the backend sends more appropriate config descriptions?
    Screenshot from 2024-01-26 09-23-05

  2. Interesting that zfs.block_size config has a link for zfs.block_mode in its help text but the actual help text for zfs.block_mode config doesn't have a link. Not sure if we can do anything about this one though.
    Screenshot from 2024-01-26 09-39-48

…ls and volumes WD-7393

Signed-off-by: David Edler <david.edler@canonical.com>
@edlerd
Copy link
Collaborator Author

edlerd commented Jan 26, 2024

  • Snapshot name pattern config has weird description. I am aware there is a discussion with the core team about this, maybe we can manually remove this for now and revert the change when the backend sends more appropriate config descriptions?

I added some lines to remove the placeholder.

  • Interesting that zfs.block_size config has a link for zfs.block_mode in its help text but the actual help text for zfs.block_mode config doesn't have a link. Not sure if we can do anything about this one though.

The doc has a section for all keys, but most of them are exactly as presented with the help texts we use now. I think cross-referencing makes sense here. The link is coming from the API, so we'd need to change it in LXD itself if we wanted to remove it.

Copy link
Collaborator

@mas-who mas-who left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for the changes 👍 .

@mas-who mas-who merged commit da6e258 into canonical:main Jan 26, 2024
6 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 26, 2024
@edlerd edlerd deleted the use-storage-config-api branch February 21, 2024 17:04
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.

3 participants