Commit cb449c5e authored by Dietmar Maurer's avatar Dietmar Maurer

allow to open SPICE console with command menu

parent 343a8dff
...@@ -112,7 +112,22 @@ Ext.define('PVE.qemu.CmdMenu', { ...@@ -112,7 +112,22 @@ Ext.define('PVE.qemu.CmdMenu', {
text: gettext('Console'), text: gettext('Console'),
icon: '/pve2/images/display.png', icon: '/pve2/images/display.png',
handler: function() { handler: function() {
PVE.Utils.openConoleWindow('kvm', vmid, nodename, vmname); PVE.Utils.API2Request({
url: '/nodes/' + nodename + '/qemu/' + vmid + '/status/current',
failure: function(response, opts) {
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, opts) {
var spice = response.result.data.spice;
if (PVE.VersionInfo.console === 'applet' || !spice) {
PVE.Utils.openConoleWindow('kvm', vmid, nodename, vmname);
} else {
var url = '/nodes/' + nodename + '/qemu/' + vmid + '/spiceproxy';
var params = { proxy: window.location.hostname };
PVE.Utils.openSpiceViewer(url, params);
}
}
});
} }
} }
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment