mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
refactor(templates): the host pages' scripts load from static files
The host pages lose their last inline scripts: the overview's charts (host_graphs.js), the New pool, New network and New interface dialogs (pool_dialog.js, network_dialog.js, interface_dialog.js), a network's and a network filter's XML editors and dialogs (network_page.js, nwfilter_page.js, nwfilters_page.js), the secrets page's labels (secrets_page.js, its texts from the view as usage_texts) and a pool's page with the ISO upload (storage_page.js). Their URLs and messages are data attributes of the elements they belong to; the upload reads its token and address from its form. No template has an inline script or an inline event handler any more.
This commit is contained in:
parent
946629b035
commit
50dcaba699
23 changed files with 431 additions and 407 deletions
|
|
@ -8,7 +8,7 @@ from libvirt import libvirtError
|
|||
from logs.audit import audit
|
||||
from vrtManager.virtsecrets import wvmSecrets
|
||||
|
||||
from virtsecrets.forms import AddSecret
|
||||
from virtsecrets.forms import USAGE_TEXTS, AddSecret
|
||||
|
||||
|
||||
@superuser_only
|
||||
|
|
@ -60,4 +60,4 @@ def secrets(request, compute_id):
|
|||
|
||||
usage_choices = AddSecret.base_fields["usage_type"].choices
|
||||
return render(request, "secrets.html", {"secrets_all": secrets_all, "compute": compute,
|
||||
"usage_choices": usage_choices})
|
||||
"usage_choices": usage_choices, "usage_texts": USAGE_TEXTS})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue