refactor: optimize log handling in Proxmox Firewall view by consolidating log data into a static variable, improving data management and preventing potential conflicts
This commit is contained in:
@@ -321,15 +321,14 @@
|
||||
@endif
|
||||
|
||||
@if(count($firewallLogs) > 0)
|
||||
@php
|
||||
$logsDataId = 'firewall_logs_' . uniqid();
|
||||
@endphp
|
||||
<script>
|
||||
window.{{ $logsDataId }} = @js($firewallLogs);
|
||||
if (!window.firewallLogsStatic) {
|
||||
window.firewallLogsStatic = @js($firewallLogs);
|
||||
}
|
||||
</script>
|
||||
<div
|
||||
x-data="{
|
||||
logs: window.{{ $logsDataId }} || [],
|
||||
logs: window.firewallLogsStatic || [],
|
||||
searchTerm: '',
|
||||
sortField: 'timestamp_iso',
|
||||
sortDirection: 'desc',
|
||||
|
||||
Reference in New Issue
Block a user