Refactor Proxmox views for improved styling and consistency

- Updated subdomain.blade.php to enhance button styles and modal transitions.
- Changed text colors for better readability and consistency across the UI.
- Refactored system.blade.php to unify button components and improve layout structure.
- Adjusted modal z-index values for consistent layering.
- Enhanced accessibility by ensuring proper text contrast and hover states.
This commit is contained in:
2025-12-18 09:40:58 -05:00
parent 5c5184aec8
commit 0ed29d782e
22 changed files with 6734 additions and 3813 deletions

View File

@@ -152,25 +152,23 @@ class Statistics extends Component
{
parent::mount($server);
$this->server->loadMissing('ipAddresses');
// Network Analysis is loaded lazily via JavaScript to improve page load speed
// Initialize error state if not configured to prevent infinite loading
if (!$this->coreRouterEnabled()) {
$this->networkAnalysis['error'] = 'Core Router API is not configured.';
$this->networkAnalysis['connections'] = [];
$this->networkAnalysis['topConnections'] = [];
$this->networkAnalysis['topPorts'] = [];
$this->networkAnalysis['security'] = [];
}
// Data loading is deferred to loadInitialData() which is triggered via wire:init
// This ensures JavaScript charts are fully initialized before data events are dispatched
}
/**
* Load all initial data for the statistics page.
* Called via wire:init to ensure JavaScript is ready to receive the data.
*/
public function loadInitialData(): void
{
// Fetch graph data - each dispatch includes the actual data for JavaScript charts
$this->fetchGraphData('cpu', $this->cpuTimeRange, $this->cpuAggregation);
$this->fetchGraphData('memory', $this->memoryTimeRange, $this->memoryAggregation);
$this->fetchGraphData('network', $this->networkTimeRange, $this->networkAggregation);
$this->fetchGraphData('disk', $this->diskTimeRange, $this->diskAggregation);
// Load Network Analysis
$this->loadNetworkAnalysis();
// Preload graph data on mount to speed up initial display
// Dispatch individual chart events for more reliable parallel loading
// Each chart loads independently so a failure in one doesn't block others
$this->dispatch('proxmox:stats:cpu');
$this->dispatch('proxmox:stats:memory');
$this->dispatch('proxmox:stats:network');
$this->dispatch('proxmox:stats:disk');
}
#[On('proxmox:stats')]
@@ -419,10 +417,7 @@ class Statistics extends Component
$this->topPortsCurrentPage = 1;
// Persist the computed analysis for a short period to speed up subsequent loads
// Cache duration is set to 25 seconds (slightly less than the 30s poll interval)
// This ensures fresh data is fetched on each poll cycle while still preventing
// duplicate requests within the same cycle
Cache::put($cacheKey, $analysis, now()->addSeconds(25));
Cache::put($cacheKey, $analysis, now()->addSeconds(30));
// Reset retry count on successful load
$this->networkAnalysisRetryCount = 0;