feat: Update Proxmox extension with various improvements and bug fixes
- Change listStates method to accept nullable integer for limit parameter. - Modify TechnitiumDns class to return structured error messages on failure. - Enhance VNC and xterm popup routes with user authorization checks. - Update backups view to improve loading states and add unique keys for dynamic elements. - Refactor cloud-init view to ensure proper data binding and improve user experience. - Add wire:key attributes to various elements in views for better Livewire performance. - Improve error handling and user feedback in the firewall view. - Update server overview and statistics views to handle potential null values gracefully. - Add new migration files to extend database schema with user-set icons and notes for Proxmox nodes.
This commit is contained in:
@@ -70,7 +70,7 @@ class Display extends Component
|
||||
$proxmox = new Proxmox;
|
||||
$config = $proxmox->request(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/config'
|
||||
)->json()['data'];
|
||||
)->json()['data'] ?? [];
|
||||
|
||||
[$type, $memory] = $this->parseDisplayString($config['vga'] ?? null);
|
||||
|
||||
@@ -196,9 +196,11 @@ class Display extends Component
|
||||
{
|
||||
$options = $this->displayPresets;
|
||||
|
||||
if (!isset($options[$this->selectedDisplay])) {
|
||||
$options[$this->selectedDisplay] = [
|
||||
'label' => strtoupper($this->selectedDisplay) . ' (custom)',
|
||||
// Only add the original loaded display type as a custom option, not player-controlled input
|
||||
$originalDisplay = $this->original['selectedDisplay'] ?? null;
|
||||
if ($originalDisplay && !isset($options[$originalDisplay])) {
|
||||
$options[$originalDisplay] = [
|
||||
'label' => strtoupper($originalDisplay) . ' (custom)',
|
||||
'description' => 'Currently configured in Proxmox. You can keep it or choose another option.',
|
||||
'supports_memory' => false,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user