mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 18:04:16 +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,
|
items: box,
|
||||||
listeners: {
|
listeners: {
|
||||||
activate: function() {
|
activate: function() {
|
||||||
var sp = Ext.state.Manager.getProvider();
|
let sp = Ext.state.Manager.getProvider();
|
||||||
var queryDict = {
|
if (Ext.isFunction(me.beforeLoad)) {
|
||||||
|
me.beforeLoad();
|
||||||
|
}
|
||||||
|
let queryDict = {
|
||||||
console: me.consoleType, // kvm, lxc, upgrade or shell
|
console: me.consoleType, // kvm, lxc, upgrade or shell
|
||||||
vmid: me.vmid,
|
vmid: me.vmid,
|
||||||
node: me.nodename,
|
node: me.nodename,
|
||||||
cmd: me.cmd,
|
cmd: me.cmd,
|
||||||
|
'cmd-opts': me.cmdOpts,
|
||||||
resize: sp.get('novnc-scaling', 'scale'),
|
resize: sp.get('novnc-scaling', 'scale'),
|
||||||
};
|
};
|
||||||
queryDict[type] = 1;
|
queryDict[type] = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user