1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Bootstrap5 (#17)

* Bootstrap5 migration
This commit is contained in:
catborise 2021-07-07 14:12:38 +03:00 committed by GitHub
parent 1663a49cee
commit 073b7b6717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 9494 additions and 8597 deletions

View file

@ -60,6 +60,7 @@ def nwfilters(request, compute_id):
msg = _("%(filter)s network filter is deleted") % {"filter": name}
in_use = False
nwfilter = conn.get_nwfilter(name)
nwfilter_info = conn.get_nwfilter_info(name)
is_conn = wvmInstances(
compute.hostname, compute.login, compute.password, compute.type
@ -82,14 +83,16 @@ def nwfilters(request, compute_id):
is_conn.close()
if nwfilter and not in_use:
nwfilter.undefine()
nwfilters_all.remove(nwfilter_info)
addlogmsg(request.user.username, compute.hostname, "", msg)
if "cln_nwfilter" in request.POST:
name = request.POST.get("nwfiltername", "")
cln_name = request.POST.get("cln_name", name + "-clone")
conn.clone_nwfilter(name, cln_name)
nwfilters_all.append(conn.get_nwfilter_info(cln_name))
msg = _("Cloning NWFilter %(name)s as %(clone)s") % {"name":name, "clone": cln_name}
addlogmsg(request.user.username, compute.hostname, "", msg)