Enhance Proxmox views with improved loading states and UI updates

- Updated serverplaceholder.blade.php to enhance loading skeletons for server details.
- Added navigation breadcrumbs to statistics, subdomain, and system views for better user experience.
- Improved loading indicators for CPU, network, memory, and disk charts in statistics.blade.php.
- Refined storage.blade.php layout with section dividers and improved drive display, including bus type indicators and quota usage.
- Enhanced VNC and Xterm popups with a new header design, loading animations, and reconnect functionality.
- Added error handling for VNC and Xterm connections to inform users when unable to connect.
This commit is contained in:
2026-02-24 19:51:46 -05:00
parent af62a16354
commit 16cd5f05de
40 changed files with 1423 additions and 475 deletions

View File

@@ -146,14 +146,28 @@ class IPAddressRelationManager extends RelationManager
sort($ipAddresses);
}
// Create IP addresses in the pool
$created = 0;
$skipped = 0;
foreach ($ipAddresses as $ip) {
// Skip if IP already exists in this pool
if ($this->getOwnerRecord()->ipAddresses()->where('ip', $ip)->exists()) {
$skipped++;
continue;
}
$this->getOwnerRecord()->ipAddresses()->create([
'type' => $data['type'],
'ip' => $ip,
'gateway' => $data['gateway'],
'netmask' => $data['netmask'],
'mac_address' => $data['mac_address'] ?? null,
]);
$created++;
}
if ($skipped > 0) {
Notification::make()
->title('Bulk Add Complete')
->body("Created {$created} IPs, skipped {$skipped} duplicates.")
->warning()
->send();
}
$this->dispatch('refresh');
}),

View File

@@ -31,16 +31,21 @@ class NodeResource extends Resource
$proxmox = new Proxmox;
$nodes = once(function () use ($proxmox) {
$nodes = $proxmox->request('/cluster/resources', data: [
'type' => 'node',
])->json()['data'] ?? [];
try {
$nodes = $proxmox->request('/cluster/resources', data: [
'type' => 'node',
])->json()['data'] ?? [];
return collect($nodes)->map(function ($node) {
return [
'label' => $node['node'],
'value' => $node['node'],
];
})->pluck('label', 'value');
return collect($nodes)->map(function ($node) {
return [
'label' => $node['node'],
'value' => $node['node'],
];
})->pluck('label', 'value');
} catch (\Throwable $e) {
\Log::error('Failed to fetch Proxmox nodes: ' . $e->getMessage());
return collect();
}
});
return $form

View File

@@ -36,16 +36,7 @@ class ServerResource extends Resource
->searchable()
->reactive()
->disabledOn('edit')
->afterStateUpdated(function (callable $set, $state) {
$set('os_id', null);
}),
Forms\Components\Select::make('node_name')
->label('Node Common Name')
->required()
->relationship('node', 'notes')
->searchable()
->reactive()
->disabledOn('edit')
->helperText(fn ($record) => $record?->node ? 'Common Name: ' . $record->node->notes : null)
->afterStateUpdated(function (callable $set, $state) {
$set('os_id', null);
}),