Bug 41772 - Create snapshot via right click context menu
Create snapshot via right click context menu
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Virtual machines (UVMM)
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-1-errata
Assigned To: Jannik Ahlers
Philipp Hahn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-12 09:02 CEST by Florian Best
Modified: 2018-07-11 15:09 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:
best: Patch_Available-


Attachments
patch (2.38 KB, patch)
2017-07-21 13:46 CEST, Johannes Keiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-07-12 09:02:04 CEST
It would be nice if one could create a snapshot via the right click context / "more" menu in UVMM. Then one wouldn't need to open/edit the VM anymore.
Comment 1 Johannes Keiser univentionstaff 2017-07-21 13:46:00 CEST
Created attachment 9048 [details]
patch
Comment 2 Florian Best univentionstaff 2017-07-21 14:15:34 CEST
I think it would be better to either:
* require('uvmm/SnapshotGrid') manually and call the create function there
(* move the function out of the detail page into a own function?)

Missing is also a canExecute function for the grid action which must at least check if the server/poll is available (item.node_available).
Comment 3 Jannik Ahlers univentionstaff 2018-05-22 15:59:27 CEST
Added a patch under branch jahlers/41772-uvmm-snapshot in which i moved the function out of the detailpage.
Comment 4 Arvid Requate univentionstaff 2018-05-28 10:12:23 CEST
Please check the proposed patch and reopen with a verdict.
Comment 5 Philipp Hahn univentionstaff 2018-05-30 16:33:07 CEST
OK: Snapshot from context menu
OK: Snapshot from dialog

REOPEN:
1. Please merge the 3 patches as they are not 3 distinct changes
2. Please rename the menu entry to "+Create +snapshot" (don't make Bug #31858 worse)
3. I pushed two more required changes:
[jahlers/41772-uvmm-snapshot] a45d5b5b6b Bug #41772: Do not create empty snapshots
[jahlers/41772-uvmm-snapshot] 8ec86caabe Bug #41772: Abort early if failed pre-condition

Otherwise good work.
Comment 6 Jannik Ahlers univentionstaff 2018-06-28 11:48:21 CEST
I applied the changes you suggested in your comments.
I will still not merge the branch as there is no target milestone set yet.
Comment 7 Philipp Hahn univentionstaff 2018-06-28 13:03:13 CEST
(In reply to Jannik Ahlers from comment #6)
> I applied the changes you suggested in your comments.

OK: <https://git.knut.univention.de/univention/ucs/commits/jahlers/41772-uvmm-snapshot>
TODO: Please check that "Create snapshot" is translated.

> I will still not merge the branch as there is no target milestone set yet.

errata4.3-1
Comment 8 Jannik Ahlers univentionstaff 2018-06-28 14:54:15 CEST
I adapted the translations to Bug #31858.

Successful build
Package: univention-virtual-machine-manager-daemon
Version: 7.0.0-8A~4.3.0.201806281447
Branch: ucs_4.3-0
Scope: errata4.3-1
Comment 9 Philipp Hahn univentionstaff 2018-06-28 16:15:51 CEST
OK: apt install {univention-virtual-machine-manager-daemon,python-univention-virtual-machine-manager,univention-management-console-module-uvmm}=7.0.0-8A~4.3.0.201806281447

OK: errata-announce -V --only univention-virtual-machine-manager-daemon.yaml
FIXED: univention-virtual-machine-manager-daemon.yaml
  [4.3-1] 4e84ac8970 Bug #41772: Fix uvmm.YAML

FAIL: I get the following "error" in the JS-console of Chromium if I start creating a Snapshot but then press "Cancel" when being asked for the snapshot name:

dojo.js.uncompressed.js:6520 undefined "
    ----------------------------------------
    rejected at a (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:505)
    at d (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:271)
    at l (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:24)
    at b.h.reject (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:86:305)
    at Object.callback (http://xen1.knut.univention.de/univention/management/modules/uvmm/snapshot.js:119:16)
    at Object.<anonymous> (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:42:327)
    at Object.q [as onClick] (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:81:403)
    at Object._onClick (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:330:422)
    at HTMLInputElement.<anonymous> (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:42:327)
    at Object.__onClick (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:330:306)
    ----------------------------------------
Error
    at h.extend.then.then.c.then (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:86:415)
    at Object.<anonymous> (http://xen1.knut.univention.de/univention/management/modules/uvmm.js:1519:50)
    at http://xen1.knut.univention.de/univention/js/dojo/dojo.js:42:380
    at d (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:98)
    at l (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:24)
    at b.resolve (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:86:97)
    at a (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:479)
    at d (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:238)
    at l (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:84:24)
    at b.resolve (http://xen1.knut.univention.de/univention/js/dojo/dojo.js:86:97)"
Comment 10 Jannik Ahlers univentionstaff 2018-07-03 17:43:02 CEST
univention-virtual-machine-manager-daemon (7.0.0-10)
edeaafd7da4f | Bug #41772: Fix javascript traceback

Successful build
Package: univention-virtual-machine-manager-daemon
Version: 7.0.0-10A~4.3.0.201807031737
Branch: ucs_4.3-0
Scope: errata4.3-1

The deferred object had to be canceled, not rejected. I fixed this in a few other instances as well (e.g. when the domain is suspended).
Comment 11 Philipp Hahn univentionstaff 2018-07-04 12:25:07 CEST
(In reply to Jannik Ahlers from comment #10)
> univention-virtual-machine-manager-daemon (7.0.0-10)
> edeaafd7da4f | Bug #41772: Fix javascript traceback

OK

> Package: univention-virtual-machine-manager-daemon
> Version: 7.0.0-10A~4.3.0.201807031737

OK: apt install {univention-virtual-machine-manager-daemon,python-univention-virtual-machine-manager,univention-management-console-module-uvmm}=7.0.0-10A~4.3.0.201807031737

> The deferred object had to be canceled, not rejected. I fixed this in a few
> other instances as well (e.g. when the domain is suspended).

OK: errata-announce -V --only univention-virtual-machine-manager-daemon.yaml
OK: 95714a19ecd549de2ec54951cf7580d519b8bd1c
OK: Create from menu
OK: Create from dialog
OK: Cancel create
OK: Delete from dialog
Comment 12 Quality Assurance univentionstaff 2018-07-04 16:05:14 CEST
--- mirror/ftp/4.3/unmaintained/4.3-0/source/univention-virtual-machine-manager-daemon_7.0.0-6A~4.3.0.201803111236.dsc
+++ apt/ucs_4.3-0-errata4.3-1/source/univention-virtual-machine-manager-daemon_7.0.0-10A~4.3.0.201807031737.dsc
@@ -1,6 +1,24 @@
-7.0.0-6A~4.3.0.201803111236 [Sun, 11 Mar 2018 12:36:31 +0100] Univention builddaemon <buildd@univention.de>:
+7.0.0-10A~4.3.0.201807031737 [Tue, 03 Jul 2018 17:37:49 +0200] Univention builddaemon <buildd@univention.de>:
 
   * UCS auto build. No patches were applied to the original source package
+
+7.0.0-10 [Tue, 03 Jul 2018 17:33:48 +0200] Jannik Ahlers <ahlers@univention.de>:
+
+  * Bug #41772: fix javascript traceback
+
+7.0.0-9 [Fri, 29 Jun 2018 11:59:37 +0200] Erik Damrose <damrose@univention.de>:
+
+  * Bug #47268: Make CPU-Usage column visibility configurable
+
+7.0.0-8 [Tue, 22 May 2018 12:01:42 +0200] Jannik Ahlers <ahlers@univention.de>:
+
+  * Bug #41772: relocated functionality to add snapshots to own javascript
+  	file to enable snapshots being made in right click context menu in vm list
+  	grid
+
+7.0.0-7 [Thu, 14 Jun 2018 16:21:25 +0200] Johannes Keiser <keiser@univention.de>:
+
+  * Bug #47182: Sort valid hosts for migrate option
 
 7.0.0-6 [Sun, 11 Mar 2018 12:34:07 +0100] Stefan Gohmann <gohmann@univention.de>:
 

<http://10.200.17.11/4.3-1/#8750627010527936956>
Comment 13 Arvid Requate univentionstaff 2018-07-11 15:09:03 CEST
<http://errata.software-univention.de/ucs/4.3/148.html>