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">
-