[pve-devel] [PATCH manager v2 2/2] ui: fw: Show warning only if some rule is enabled

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 24 12:55:12 CEST 2020


Am 6/24/20 um 11:32 AM schrieb Dominic Jäger:
> Fixup for #2815: The existence of a rule alone should NOT yet trigger the
> warning. Only if it is enabled but the whole firewall for that level is not.
> 
> Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
> ---
> Didn't exist in v1. Not sure if we want this. If yes you can just apply both or
> squash. Of course, I can also send it as v3.
> 

Makes sense, IMO. If 1/2 works as expected we can just commit it as is, if there'd
be a v3 you could indeed squash it.

>  www/manager6/grid/FirewallRules.js | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
> index 99f85fb6..9bf723e1 100644
> --- a/www/manager6/grid/FirewallRules.js
> +++ b/www/manager6/grid/FirewallRules.js
> @@ -491,7 +491,8 @@ Ext.define('PVE.FirewallRules', {
>  		    Ext.Msg.alert(gettext('Error'), response.htmlStatus);
>  		},
>  		success: function (response) {
> -		    let warningRequired = me.store.getCount() != 0 && !response.result.data.enable;
> +		    let warningRequired = !response.result.data.enable
> +			&& me.store.findExact('enable', true) >= 0;
>  		    me.down('displayfield[name=fw-warning]').setVisible(warningRequired)
>  		},
>  	    });
> 





More information about the pve-devel mailing list