Commit 181861f6 authored by Alexandre Derumier's avatar Alexandre Derumier Committed by Dietmar Maurer

add node embedded vnc console

Signed-off-by: 's avatarAlexandre Derumier <aderumier@odiso.com>
parent a3ec79d6
......@@ -15,14 +15,14 @@ Ext.define('PVE.noVncConsole', {
throw "no node name specified";
}
if (!me.vmid) {
throw "no VM ID specified";
}
if (!me.consoleType) {
throw "no console type specified";
}
if (!me.vmid && me.consoleType !== 'shell') {
throw "no VM ID specified";
}
// always use same iframe, to avoid running several noVnc clients
// at same time (to avoid performance problems)
var box = Ext.create('widget.uxiframe', { id: "vncconsole" });
......@@ -33,8 +33,11 @@ Ext.define('PVE.noVncConsole', {
items: box,
listeners: {
show: function() {
box.load('/?console=' + me.consoleType + '&novnc=1&vmid='+ me.vmid +
'&node=' + me.nodename + '&resize=scale');
var url = '/?console=' + me.consoleType + '&novnc=1&node=' + me.nodename + '&resize=scale';
if (me.vmid) {
url += '&vmid='+ me.vmid;
}
box.load(url);
}
}
});
......
......@@ -197,6 +197,13 @@ Ext.define('PVE.node.Config', {
itemId: 'apt',
xtype: 'pveNodeAPT',
nodename: nodename
},
{
title: gettext('Console'),
itemId: 'console',
xtype: 'pveNoVncConsole',
consoleType: 'shell',
nodename: nodename
}
]);
me.items.push([{
......
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