Enhance Proxmox components with input validation, error handling, and UI improvements
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
|
||||
<div class="flex flex-col gap-6">
|
||||
{{-- Page Header --}}
|
||||
<div class="mb-6">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold">Firewall Management</h1>
|
||||
<p class="text-sm text-base/60 mt-1">Configure firewall rules, policies, aliases, and IPSets for your virtual machine</p>
|
||||
</div>
|
||||
@@ -87,7 +87,7 @@
|
||||
@endif
|
||||
|
||||
{{-- Main Firewall Toggle & Status --}}
|
||||
<div class="bg-gradient-to-br from-primary/10 to-primary/5 border border-primary/20 rounded-xl p-6 mb-6">
|
||||
<div class="bg-gradient-to-br from-primary/10 to-primary/5 border border-primary/20 rounded-xl p-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="w-12 h-12 rounded-xl bg-primary/20 flex items-center justify-center">
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
{{-- Firewall Policies & Network Adapters Grid --}}
|
||||
@if($firewallEnabled)
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
{{-- Default Policies Card --}}
|
||||
<div class="bg-background border border-neutral rounded-xl p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
@@ -322,7 +322,7 @@
|
||||
@endif
|
||||
|
||||
{{-- Tabs Navigation --}}
|
||||
<div class="bg-background border border-neutral rounded-xl mb-6" x-data="{ activeTab: 'rules', logsLoaded: false }">
|
||||
<div class="bg-background border border-neutral rounded-xl" x-data="{ activeTab: 'rules', logsLoaded: false }">
|
||||
<div class="flex border-b border-neutral/20 overflow-x-auto">
|
||||
<button @click="activeTab = 'rules'"
|
||||
class="px-6 py-4 text-sm font-semibold transition-all relative whitespace-nowrap"
|
||||
@@ -466,7 +466,7 @@
|
||||
if (!ipData && !loading) {
|
||||
loading = true;
|
||||
open = true;
|
||||
window.fetchIPLocation('{{ $ruleSourceIP }}').then(data => {
|
||||
window.fetchIPLocation('{{ addslashes($ruleSourceIP) }}').then(data => {
|
||||
ipData = data;
|
||||
loading = false;
|
||||
}).catch(err => {
|
||||
@@ -544,7 +544,7 @@
|
||||
if (!ipData && !loading) {
|
||||
loading = true;
|
||||
open = true;
|
||||
window.fetchIPLocation('{{ $ruleDestIP }}').then(data => {
|
||||
window.fetchIPLocation('{{ addslashes($ruleDestIP) }}').then(data => {
|
||||
ipData = data;
|
||||
loading = false;
|
||||
}).catch(err => {
|
||||
@@ -971,7 +971,7 @@
|
||||
if (!ipData && !loading) {
|
||||
loading = true;
|
||||
open = true;
|
||||
window.fetchIPLocation('{{ $sourceIP }}').then(data => {
|
||||
window.fetchIPLocation('{{ addslashes($sourceIP) }}').then(data => {
|
||||
ipData = data;
|
||||
loading = false;
|
||||
}).catch(err => {
|
||||
@@ -1049,7 +1049,7 @@
|
||||
if (!ipData && !loading) {
|
||||
loading = true;
|
||||
open = true;
|
||||
window.fetchIPLocation('{{ $destIP }}').then(data => {
|
||||
window.fetchIPLocation('{{ addslashes($destIP) }}').then(data => {
|
||||
ipData = data;
|
||||
loading = false;
|
||||
}).catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user