mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-03 08:30:00 +00:00
ui: console: add beforeLoad callback
we sometimes need to adapt parameters, but in a lot contexts the component is already created, and the activate event order of components may make this hard to do in a deterministic way. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
f24be7e72d
commit
9199d1718c
@ -36,12 +36,16 @@ Ext.define('PVE.noVncConsole', {
|
||||
items: box,
|
||||
listeners: {
|
||||
activate: function() {
|
||||
var sp = Ext.state.Manager.getProvider();
|
||||
var queryDict = {
|
||||
let sp = Ext.state.Manager.getProvider();
|
||||
if (Ext.isFunction(me.beforeLoad)) {
|
||||
me.beforeLoad();
|
||||
}
|
||||
let queryDict = {
|
||||
console: me.consoleType, // kvm, lxc, upgrade or shell
|
||||
vmid: me.vmid,
|
||||
node: me.nodename,
|
||||
cmd: me.cmd,
|
||||
'cmd-opts': me.cmdOpts,
|
||||
resize: sp.get('novnc-scaling', 'scale'),
|
||||
};
|
||||
queryDict[type] = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user