From: Dan Hunsaker <[email protected]>

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 <[email protected]>
---
 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..6450bca 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..a0b3ef0 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

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to