[pve-devel] [PATCH manager v3 2/3] guest: refactor and reuse AgentIPView for containers

Gabriel Goller g.goller at proxmox.com
Wed Jan 8 15:28:14 CET 2025


On 08.01.2025 10:33, Gabriel Goller wrote:
>     updateStatus: function(unsuccessful, defaulttext) {
> 	var me = this;
>-	var text = defaulttext || gettext('No network information');
>-	var more = false;
>-	if (unsuccessful) {
>-	    text = gettext('Guest Agent not running');
>-	} else if (me.agent && me.running) {
>-	    if (Ext.isArray(me.nics) && me.nics.length) {
>-		more = true;
>-		var ips = me.getDefaultIps(me.nics);
>-		if (ips.length !== 0) {
>-		    text = ips.join('<br>');
>-		}
>-	    } else if (me.nics && me.nics.error) {
>-		text = Ext.String.format(text, me.nics.error.desc);
>-	    }
>-	} else if (me.agent) {
>-	    text = gettext('Guest Agent not running');
>-	} else {
>-	    text = gettext('No Guest Agent configured');
>-	}
>
>-	var ipBox = me.down('#ipBox');
>+	me.updateStatusCallback(me, unsuccessful, defaulttext);
>+
>+	var ipBox = ipview.down('#ipBox');
> 	ipBox.update(text);
>
>-	var moreBtn = me.down('#moreBtn');
>+	var moreBtn = ipview.down('#moreBtn');
> 	moreBtn.setVisible(more);

Oops, this hunk shouldn't be here, sent a v4 fixing it!





More information about the pve-devel mailing list