mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 15:21:28 +00:00
allow to open SPICE console with command menu
This commit is contained in:
parent
3fa0b22266
commit
5ebcf7511f
@ -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.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);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user