refactor: streamline log initialization in Proxmox Firewall view by ensuring logs are only set once, enhancing data management and preventing redundant assignments

This commit is contained in:
2025-12-02 16:22:11 -05:00
parent 9c8884b6a6
commit ec7b321709

View File

@@ -314,12 +314,16 @@
</div>
@endif
@if(count($firewallLogs) > 0)
@once
<script>
@once
<script>
if (typeof window.firewallLogsData === 'undefined') {
window.firewallLogsData = @js($firewallLogs);
</script>
@endonce
window.firewallLogsLoaded = true;
}
</script>
@endonce
@if(count($firewallLogs) > 0 || !empty($firewallLogs))
<div
x-data="{
logs: window.firewallLogsData || [],