Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
---
 www/manager/qemu/Config.js |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/www/manager/qemu/Config.js b/www/manager/qemu/Config.js
index efa4de5..56fe289 100644
--- a/www/manager/qemu/Config.js
+++ b/www/manager/qemu/Config.js
@@ -118,13 +118,28 @@ Ext.define('PVE.qemu.Config', {
            }
        });
 
+       var spiceconsoleBtn = Ext.create('Ext.Button', {
+           text: gettext('Spice Console'),
+           handler: function() {
+               Ext.core.DomHelper.append(document.body, {
+                   tag : 'iframe',
+                   id : 'downloadIframe',
+                   frameBorder : 0,
+                   width : 0,
+                   height : 0,
+                   css : 'display:none;visibility:hidden;height:0px;',
+                   src : '/api2/spiceconfig/nodes/' + nodename + '/qemu/' + 
vmid + '/spiceproxy'
+               });
+           }
+       });
+
        var descr = vmid + " (" + (vmname ? "'" + vmname + "' " : "'VM " + vmid 
+ "'") + ")";
 
        Ext.apply(me, {
            title: Ext.String.format(gettext("Virtual Machine {0} on node 
{1}"), descr, "'" + nodename + "'"),
            hstateid: 'kvmtab',
            tbar: [ resumeBtn, startBtn, shutdownBtn, stopBtn, resetBtn, 
-                   removeBtn, migrateBtn, consoleBtn ],
+                   removeBtn, migrateBtn, consoleBtn, spiceconsoleBtn ],
            defaults: { statusStore: me.statusStore },
            items: [
                {
-- 
1.7.10.4

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to