[pve-devel] [PATCH v2 manager] fix #1928: ct snapshot: changed rollback message to warning

Tim Marx t.marx at proxmox.com
Fri Nov 16 12:02:43 CET 2018


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
changes since v1:
*swap snapname & snaptime
*warning message shortened

 www/manager6/lxc/SnapshotTree.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/www/manager6/lxc/SnapshotTree.js b/www/manager6/lxc/SnapshotTree.js
index 4996e2e3..3a84f891 100644
--- a/www/manager6/lxc/SnapshotTree.js
+++ b/www/manager6/lxc/SnapshotTree.js
@@ -156,11 +156,17 @@ Ext.define('PVE.lxc.SnapshotTree', {
 	var rollbackBtn = new Proxmox.button.Button({
 	    text: gettext('Rollback'),
 	    disabled: true,
+	    dangerous: true,
 	    selModel: sm,
 	    enableFn: valid_snapshot_rollback,
 	    confirmMsg: function(rec) {
-		return Proxmox.Utils.format_task_description('vzrollback', me.vmid) +
-		    " '" +  rec.data.name + "'";
+		var taskdescription = Proxmox.Utils.format_task_description('vzrollback', me.vmid);
+		var snaptime = Ext.Date.format(rec.data.snaptime,'Y-m-d H:i:s');
+		var snapname = rec.data.name;
+		var msg = Ext.String.format(gettext('{0} to {1} - {2}')+
+		gettext('<p>Note: Rollback stops CT</p>'),
+		taskdescription, snapname, snaptime);
+		return msg;
 	    },
 	    handler: function(btn, event) {
 		var rec = sm.getSelection()[0];
-- 
2.11.0




More information about the pve-devel mailing list