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:
@@ -144,7 +144,7 @@ class Subdomain extends Component
|
||||
if (preg_match('/^fc[0-9a-f]{1,2}:/i', $ip) || preg_match('/^fd[0-9a-f]{1,2}:/i', $ip)) {
|
||||
return false;
|
||||
}
|
||||
if (strpos($ip, '::ffff:') === 0 || strpos($ip, '::ffff:') !== false) {
|
||||
if (strpos($ip, '::ffff:') === 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -223,7 +223,7 @@ class Subdomain extends Component
|
||||
{
|
||||
$this->validate([
|
||||
'newSubdomain' => 'required|string|regex:/^[a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?$/i',
|
||||
'selectedIpId' => 'required|exists:ext_proxmox_ip_addresses,id',
|
||||
'selectedIpId' => ['required', \Illuminate\Validation\Rule::exists('ext_proxmox_ip_addresses', 'id')->where('server_id', $this->server->id)],
|
||||
], [
|
||||
'newSubdomain.regex' => 'Invalid subdomain format. Use only letters, numbers, and hyphens.',
|
||||
'selectedIpId.required' => 'Please select an IP address.',
|
||||
@@ -285,12 +285,6 @@ class Subdomain extends Component
|
||||
$this->notify('This subdomain already exists for an IPv6 address on this server. Please choose a different name.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if we already have both IPv4 and IPv6 for this subdomain
|
||||
if ($existingIpv4Count > 0 && $existingIpv6Count > 0) {
|
||||
$this->notify('This subdomain already exists for both IPv4 and IPv6 addresses on this server. Please choose a different name.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the subdomain via Technitium DNS API
|
||||
$dns = new TechnitiumDns;
|
||||
@@ -532,9 +526,6 @@ class Subdomain extends Component
|
||||
|
||||
$dns = new TechnitiumDns;
|
||||
if ($dns->deleteRecord($this->selectedZone, $name, $type, $ipAddress)) {
|
||||
// Update database with new record list
|
||||
$this->updateSubdomainRecords();
|
||||
|
||||
$this->notify('DNS record deleted successfully!', 'success');
|
||||
$this->loadZoneRecords();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user