1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

fix(storages): a refused new volume comes back in its dialog

A New volume form the pool page refused, for a name with a space or a
character not allowed, redirected back with the reasons at the top of
the page and lost what was typed.

The form now posts to the pool page itself: a valid one makes the
volume and redirects as before, a refused one renders the page with
the dialog open on what was entered, the refused field marked with its
reason and focused. A pool stopped meanwhile has no dialog: its page
shows the reasons. The separate create_volume view and URL go.
This commit is contained in:
catborise 2026-10-31 18:05:34 +03:00
parent 9d3e3bd315
commit f77439f398
7 changed files with 63 additions and 81 deletions

View file

@ -6,7 +6,7 @@ from interfaces.views import interface, interfaces
from networks.views import network, networks
from nodedevs.views import nodedevs
from nwfilters.views import nwfilter, nwfilters
from storages.views import create_volume, get_volumes, storage, storages
from storages.views import get_volumes, storage, storages
from . import forms, views
@ -66,11 +66,6 @@ urlpatterns = [
path("storages/", storages, name="storages"),
path("storage/<str:pool>/volumes/", get_volumes, name="volumes"),
path("storage/<str:pool>/", storage, name="storage"),
path(
"storage/<str:pool>/create_volume/",
create_volume,
name="create_volume",
),
path("networks/", networks, name="networks"),
path("network/<str:pool>/", network, name="network"),
path("interfaces/", interfaces, name="interfaces"),