[pve-devel] applied: [PATCH 2/2] ui/vnc: reload IFrame-embedded xtermjs on LXC startup

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Dec 20 08:48:16 CET 2019


Am 12/19/19 um 12:17 PM schrieb Stefan Reiter:
> Same as with previous QEMU patch, avoids manual reload after starting a
> container while the "Console" window is open.
> 
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
>  www/manager6/lxc/Config.js | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js
> index 773be1a4..e14b5ad2 100644
> --- a/www/manager6/lxc/Config.js
> +++ b/www/manager6/lxc/Config.js
> @@ -333,6 +333,7 @@ Ext.define('PVE.lxc.Config', {
>  
>  	me.callParent();
>  
> +	var prevStatus = 'unknown';
>  	me.mon(me.statusStore, 'load', function(s, records, success) {
>  	    var status;
>  	    var lock;
> @@ -353,6 +354,15 @@ Ext.define('PVE.lxc.Config', {
>  	    shutdownBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status !== 'running');
>  	    me.down('#removeBtn').setDisabled(!caps.vms['VM.Allocate'] || status !== 'stopped');
>  	    consoleBtn.setDisabled(template);
> +
> +	    if (prevStatus === 'stopped' && status === 'running') {
> +		let con = me.down('#consolejs');
> +		if (con) {
> +		    con.reload();
> +		}
> +	    }
> +
> +	    prevStatus = status;
>  	});
>  
>  	me.on('afterrender', function() {
> 

applied, thanks!




More information about the pve-devel mailing list