From 6c9e6dd811cfb0a5705ad7fc8d1cc229d379be63 Mon Sep 17 00:00:00 2001 From: Dragos Date: Thu, 13 May 2021 14:28:35 +0300 Subject: [PATCH] in the firewall editor the port field allows "all" as well --- app/.vs/app/v16/.suo | Bin 102400 -> 102912 bytes app/.vs/slnx.sqlite | Bin 135168 -> 135168 bytes .../firewall-editor.component.html | 25 ++++++++++++++---- .../firewall-editor.component.scss | 6 +++++ .../firewall-editor.component.ts | 16 ++++++++++- .../firewall-rules.component.html | 2 +- 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/app/.vs/app/v16/.suo b/app/.vs/app/v16/.suo index fe72afa499b76d13dc3c0e93180b5af7c847152a..d8701a603c8ace56ba61b4f81f8647b1e992a3e5 100644 GIT binary patch delta 8356 zcmdT}3vg3a8onn@A8A7=ErdP-4W)#FNl8kYwk(vir4OKB5vUbwC2bR0=!-Uh)5T5j zfy#DV$Wbr85JO>Ibk?O|=`iY25CKOsTqHxWs4Oh?Pe@G%wV_QR; zMa`l{LcbNgFP?-N+PNr+cKktXHLw;)65tv-@uYEhX60z)taFASp)MQwcwi*J+C(Cs z3s?XdfU53fvY${LK)uK+P{8&C)&0!m;G zkPFNNGJ(l}4!8>#24n$K00XcL7z?nelp$wpP5|P8RG=0Z0*nH3fDk~#aaPw_^YO3{ z7!J$^Vt`mc4HN+?fOUL_kk3cH0LTN1fjfZ`ARSl)+zpfh1;A9G9AND|sZw~>vK~B@ zVW_MICIWFl4KMRw&lJv5 zDEeeZa4V%Vc|VnYL+9u>3C8${cu0@tnKk>P`3%T;G|%Sgt9dit-%RtY4byxS@XOIW zv&SE(`J}ek`-sZpv)*|neBA_?fh9l{z~0l=I7Ns@kRFcHu^yD33h%sc5A^y_S#%vb zss|c`4%yzaguaTXTv`&e63gnEMw_M0q?}%q&KEP^V=;&r>53s%#bPvMF3%DhPbA{F z06+``0&SsZi9IrrCPc}pVW>ESMHJ@3tP2T&fF2!i^xD`7G%+&PCBl4!`HD-V0`lblCQ!i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Fjl2%6XBtU*&iA9DLVx11r8Fil`G(tCaW3 z1{u!l#CjM4E#b)yanH$gx^UbO1|YW-QU<=MG`VBWo^-MKbuA)glYICZAsHM7-51xj274>G|@>uOpK!*3=A3 zdZ}b2<(nX4;XU8$#NvHpL#!|}_aSarkSL!vioAJ+))Sb$zO<9WwIu8dlEmkZ7@Fav zL)~=y`DBu%96BUNm}#&4BLcn>!(G=VQDZ>wK$}WofxUdN3qH8f&xN}ehSGQP+-vCz zv8yx0RWY0HP`eIeb&*e2Qv|uxwY1k?j;KW#Type and code - +
+ + + +
- + +
From
diff --git a/app/src/app/networking/firewall-editor/firewall-editor.component.scss b/app/src/app/networking/firewall-editor/firewall-editor.component.scss index c16ab2c..420ca56 100644 --- a/app/src/app/networking/firewall-editor/firewall-editor.component.scss +++ b/app/src/app/networking/firewall-editor/firewall-editor.component.scss @@ -38,3 +38,9 @@ h5 } } } + +.input-group > .dropdown-toggle +{ + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} diff --git a/app/src/app/networking/firewall-editor/firewall-editor.component.ts b/app/src/app/networking/firewall-editor/firewall-editor.component.ts index e9fd346..05ce45c 100644 --- a/app/src/app/networking/firewall-editor/firewall-editor.component.ts +++ b/app/src/app/networking/firewall-editor/firewall-editor.component.ts @@ -83,7 +83,10 @@ export class FirewallEditorComponent implements OnInit, OnDestroy { action: [this.firewallRule?.action.toUpperCase(), [Validators.required]], protocol: [this.firewallRule?.protocol.toLowerCase(), [Validators.required]], - protocolConfig: [this.firewallRule?.protocolConfig, [Validators.required]], + protocolConfig: [ + { value: this.firewallRule?.protocolConfig, disabled: this.firewallRule?.protocolConfig === 'all' }, + [Validators.required] + ], from, to, description: [this.firewallRule?.description || ''] @@ -159,6 +162,17 @@ export class FirewallEditorComponent implements OnInit, OnDestroy }); } + // ---------------------------------------------------------------------------------------------------------------- + setProtocolConfig(value?: string) + { + this.editorForm.get('protocolConfig').setValue(value); + + if (value === 'all') + this.editorForm.get('protocolConfig').disable(); + else + this.editorForm.get('protocolConfig').enable(); + } + // ---------------------------------------------------------------------------------------------------------------- addFromRule(rule: { type: string; config: string }) { diff --git a/app/src/app/networking/firewall-rules/firewall-rules.component.html b/app/src/app/networking/firewall-rules/firewall-rules.component.html index f701fda..e1ec3d3 100644 --- a/app/src/app/networking/firewall-rules/firewall-rules.component.html +++ b/app/src/app/networking/firewall-rules/firewall-rules.component.html @@ -114,7 +114,7 @@ tooltip="More options" container="body" placement="top" [adaptivePosition]="false"> -