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:
@@ -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 || [],
|
||||
|
||||
Reference in New Issue
Block a user