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