feat: add default policies card to firewall management for enhanced traffic control
This commit is contained in:
@@ -77,6 +77,51 @@
|
||||
{{-- Firewall Policies & Network Adapters Grid --}}
|
||||
@if($firewallEnabled)
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
|
||||
{{-- Default Policies Card --}}
|
||||
<div class="bg-background border border-neutral rounded-xl p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-lg bg-warning/10 flex items-center justify-center">
|
||||
<x-ri-filter-3-line class="size-5 text-warning" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold">Default Policies</h3>
|
||||
<p class="text-sm text-base/60">Control default traffic behavior</p>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" wire:click="openPolicyInfoModal" class="text-info hover:text-info/80 transition-colors" title="Learn about policies">
|
||||
<x-ri-information-line class="size-5" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-2">Incoming Traffic (Policy In)</label>
|
||||
<select wire:model="policyIn" class="w-full px-3 py-2 border border-neutral rounded-lg bg-background text-sm">
|
||||
<option value="ACCEPT">Accept</option>
|
||||
<option value="REJECT">Reject</option>
|
||||
<option value="DROP">Drop</option>
|
||||
</select>
|
||||
<p class="text-xs text-base/60 mt-1">Default action for incoming traffic not matching any rule</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-2">Outgoing Traffic (Policy Out)</label>
|
||||
<select wire:model="policyOut" class="w-full px-3 py-2 border border-neutral rounded-lg bg-background text-sm">
|
||||
<option value="ACCEPT">Accept</option>
|
||||
<option value="REJECT">Reject</option>
|
||||
<option value="DROP">Drop</option>
|
||||
</select>
|
||||
<p class="text-xs text-base/60 mt-1">Default action for outgoing traffic not matching any rule</p>
|
||||
</div>
|
||||
|
||||
<button type="button" wire:click="updatePolicies" wire:loading.attr="disabled" class="w-full px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium mt-4">
|
||||
<span wire:loading.remove wire:target="updatePolicies">Update Policies</span>
|
||||
<span wire:loading wire:target="updatePolicies">Updating...</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Network Adapters --}}
|
||||
<div class="bg-background border border-neutral rounded-xl p-6">
|
||||
<div class="flex items-center gap-3 mb-4">
|
||||
@@ -146,50 +191,6 @@
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
{{-- Default Policies Card --}}
|
||||
<div class="bg-background border border-neutral rounded-xl p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-lg bg-warning/10 flex items-center justify-center">
|
||||
<x-ri-filter-3-line class="size-5 text-warning" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold">Default Policies</h3>
|
||||
<p class="text-sm text-base/60">Control default traffic behavior</p>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" wire:click="openPolicyInfoModal" class="text-info hover:text-info/80 transition-colors" title="Learn about policies">
|
||||
<x-ri-information-line class="size-5" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-2">Incoming Traffic (Policy In)</label>
|
||||
<select wire:model="policyIn" class="w-full px-3 py-2 border border-neutral rounded-lg bg-background text-sm">
|
||||
<option value="ACCEPT">Accept</option>
|
||||
<option value="REJECT">Reject</option>
|
||||
<option value="DROP">Drop</option>
|
||||
</select>
|
||||
<p class="text-xs text-base/60 mt-1">Default action for incoming traffic not matching any rule</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-2">Outgoing Traffic (Policy Out)</label>
|
||||
<select wire:model="policyOut" class="w-full px-3 py-2 border border-neutral rounded-lg bg-background text-sm">
|
||||
<option value="ACCEPT">Accept</option>
|
||||
<option value="REJECT">Reject</option>
|
||||
<option value="DROP">Drop</option>
|
||||
</select>
|
||||
<p class="text-xs text-base/60 mt-1">Default action for outgoing traffic not matching any rule</p>
|
||||
</div>
|
||||
|
||||
<button type="button" wire:click="updatePolicies" wire:loading.attr="disabled" class="w-full px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium mt-4">
|
||||
<span wire:loading.remove wire:target="updatePolicies">Update Policies</span>
|
||||
<span wire:loading wire:target="updatePolicies">Updating...</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Policy Info Modal --}}
|
||||
|
||||
Reference in New Issue
Block a user