-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix: add dynamic routes for editting storage pool and project configs [WD-8467] #627
Conversation
Demo starting at https://lxd-ui-627.demos.haus |
Checked again across the app and couldn't find any additional edit form sections that does not have a dynamic route mapping. |
f9888fc
to
50fe5a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When navigating to storage > volumes > any volume detail page, the overview tab is not active i.e. on this page: https://lxd-ui-627.demos.haus/ui/project/default/storage/detail/pool-dir/custom/abcdd
When reading project configuration, we should expand the "restrictions" submenu (if it is not disabled like in the default project on the demo server), i.e. for this page: https://lxd-ui-627.demos.haus/ui/project/A-very-very-very-very-very-very-very-very-very-very-long-name/configuration/clusters
Yeah sorry, I picked up that I missed a few dependencies from some tests failing, going to do a scan through then will request review again. |
47d3492
to
a2bd389
Compare
This doesn't work reliably yet, while on the 307 demo it does. Can you have a look? |
a2bd389
to
2716ff2
Compare
Yes I found the issue, I missed that you can navigate to storage volumes from the storage pool detail overview page. I've created an issue to add a test for this scenario. |
2716ff2
to
dce3b22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, just a tiny nitpick on naming
src/pages/projects/EditProject.tsx
Outdated
const { isRestricted } = useAuth(); | ||
const notify = useNotify(); | ||
const queryClient = useQueryClient(); | ||
const [section, setSection] = useState(PROJECT_DETAILS); | ||
const { activeSection: section } = useParams<{ activeSection?: string }>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should rename the parameter activeSection
to section
for all the routes and its usages. Seems simpler to avoid the renaming in components, and we can streamline naming across the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good improvement, will implement that 👍
Signed-off-by: Mason Hu <mason.hu@canonical.com>
dce3b22
to
c6585f2
Compare
Done
QA