Enhance Proxmox components with input validation, error handling, and UI improvements
This commit is contained in:
@@ -381,7 +381,7 @@
|
||||
|
||||
<div class="grid gap-8 items-start">
|
||||
<!-- Details -->
|
||||
<div class="">
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<div class="flex items-center gap-3 p-4 rounded-t-lg border-t border-x border-neutral bg-gradient-to-r from-primary/10 via-primary/5 to-transparent">
|
||||
@@ -395,7 +395,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Status Section -->
|
||||
<div class="bg-background-secondary border-x border-neutral p-4 space-y-4 rounded-m-lg">
|
||||
<div class="bg-background-secondary border-x border-neutral p-4 space-y-4">
|
||||
<!-- Status -->
|
||||
<div class="space-y-2">
|
||||
<label class="text-sm font-semibold text-base/80">Status</label>
|
||||
@@ -1126,7 +1126,7 @@
|
||||
</div>
|
||||
|
||||
@if(stripos($server->os?->name ?? '', 'Windows') !== false)
|
||||
<div class="">
|
||||
<div>
|
||||
<div class="flex items-center gap-3 p-4 rounded-t-lg border-t border-x border-neutral bg-gradient-to-r from-info/10 via-info/5 to-transparent">
|
||||
<div class="flex items-center justify-center w-10 h-10 rounded-lg bg-info/15">
|
||||
<x-ri-windows-line class="size-5 text-info" />
|
||||
@@ -2007,6 +2007,17 @@
|
||||
|
||||
// Re-initialize when Livewire navigates (tab switches)
|
||||
document.addEventListener('livewire:navigated', () => {
|
||||
// Clear intervals first to prevent leaked timers
|
||||
if (pollInterval) {
|
||||
clearInterval(pollInterval);
|
||||
pollInterval = null;
|
||||
}
|
||||
if (visibilityCheckInterval) {
|
||||
clearInterval(visibilityCheckInterval);
|
||||
visibilityCheckInterval = null;
|
||||
}
|
||||
pollInFlight = false;
|
||||
|
||||
// Clear charts when navigating (DOM will be replaced)
|
||||
Object.keys(charts).forEach(interfaceId => {
|
||||
try {
|
||||
@@ -2113,6 +2124,11 @@
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// Once polling is active, stop the expensive 200ms visibility check
|
||||
if (pollInterval) {
|
||||
clearInterval(visibilityCheck);
|
||||
}
|
||||
}
|
||||
}, 200); // Check very frequently (every 200ms) for immediate response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user