Enhance Proxmox components with input validation, error handling, and UI improvements
This commit is contained in:
@@ -92,11 +92,16 @@ class Index extends Component
|
||||
}
|
||||
}
|
||||
|
||||
$proxmox->request('/nodes/' . $this->server->node->name . '/qemu', 'post', data: [
|
||||
'vmid' => $this->server->vm_id,
|
||||
'force' => true,
|
||||
'archive' => $this->volid,
|
||||
]);
|
||||
try {
|
||||
$proxmox->request('/nodes/' . $this->server->node->name . '/qemu', 'post', data: [
|
||||
'vmid' => $this->server->vm_id,
|
||||
'force' => true,
|
||||
'archive' => $this->volid,
|
||||
]);
|
||||
} catch (\Throwable $e) {
|
||||
$this->notify('Backup restore failed: ' . $e->getMessage(), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->notify('Backup restoration in progress', 'success');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user