[pve-devel] [PATCH 4/4] Add suspend/resume options to the mobile web UI menus

Daniel Hunsaker danhunsaker at gmail.com
Fri Oct 3 20:58:56 CEST 2014


From: Dan Hunsaker <danhunsaker at gmail.com>

With the new mobile interface, we need to implement UI changes in two
places.  This lets us simplify our mobile interface so it isn't cluttered
with options that mobile browsers can't easily handle, usually due to size.
This patch implements Suspend and Resume of VMs and CTs via the mobile
web UI.

Signed-off-by: Dan Hunsaker <danhunsaker at gmail.com>
---
 www/mobile/OpenVzSummary.js | 12 ++++++++++++
 www/mobile/QemuSummary.js   | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/www/mobile/OpenVzSummary.js b/www/mobile/OpenVzSummary.js
index f71fbec..4c27e93 100644
--- a/www/mobile/OpenVzSummary.js
+++ b/www/mobile/OpenVzSummary.js
@@ -159,6 +159,18 @@ Ext.define('PVE.OpenVzSummary', {
 		}
 	    },
 	    {
+		text: gettext('Suspend'),
+		handler: function() {
+		    me.vm_command("suspend", {});
+		}
+	    },
+	    {
+		text: gettext('Resume'),
+		handler: function() {
+		    me.vm_command("resume", {});
+		}
+	    },
+	    {
 		text: gettext('Shutdown'),
 		handler: function() {
 		    me.vm_command("shutdown", {});
diff --git a/www/mobile/QemuSummary.js b/www/mobile/QemuSummary.js
index eb33222..b392e1e 100644
--- a/www/mobile/QemuSummary.js
+++ b/www/mobile/QemuSummary.js
@@ -162,6 +162,18 @@ Ext.define('PVE.QemuSummary', {
 		}
 	    },
 	    {
+		text: gettext('Suspend'),
+		handler: function() {
+		    me.vm_command("suspend", {});
+		}
+	    },
+	    {
+		text: gettext('Resume'),
+		handler: function() {
+		    me.vm_command("resume", {});
+		}
+	    },
+	    {
 		text: gettext('Shutdown'),
 		handler: function() {
 		    me.vm_command("shutdown", {});
-- 
1.9.1




More information about the pve-devel mailing list