mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
feat(instances): the XML editor shows a change before saving it
Change used to define the edited XML at once. It now opens a dialog with the lines the edit changes in the VM's definition, and Save there defines it. A definition libvirt refuses comes back to the dialog with the reason, and the edit stays in the editor; before, the page reloaded with the current XML and the edit was lost. A definition that changed since the editor was opened (another tab, a disk added) is not overwritten: the dialog asks to reload. An unchanged XML has nothing to save. change_xml answers the dialog with JSON; the editor's script moves to static/js/xml_editor.js.
This commit is contained in:
parent
7cf12b997b
commit
3f329b50dd
7 changed files with 198 additions and 26 deletions
|
|
@ -57,7 +57,7 @@ class ErrorHandlingTestCase(TestCase):
|
|||
|
||||
def test_redirects_without_or_with_a_foreign_referer_go_to_the_vm_page(self):
|
||||
names = back_views()
|
||||
self.assertGreaterEqual(len(names), 30)
|
||||
self.assertGreaterEqual(len(names), 29)
|
||||
for name in names:
|
||||
for referer in (None, EXTERNAL):
|
||||
with self.subTest(view=name, referer=referer), patch("instances.models.wvmInstance"), \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue