From 8340110a344af2f4703b7f0aad2bbc7f267b495a Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Wed, 25 Feb 2026 16:26:44 -0500 Subject: [PATCH] feat: Add DNS configuration check and update subdomain management UI --- extensions/Servers/Proxmox/Livewire/Subdomain.php | 8 +++++++- extensions/Servers/Proxmox/TechnitiumDns.php | 9 +++++++++ extensions/Servers/Proxmox/views/subdomain.blade.php | 10 ++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/extensions/Servers/Proxmox/Livewire/Subdomain.php b/extensions/Servers/Proxmox/Livewire/Subdomain.php index e6b97157f..ed00ced8a 100644 --- a/extensions/Servers/Proxmox/Livewire/Subdomain.php +++ b/extensions/Servers/Proxmox/Livewire/Subdomain.php @@ -107,10 +107,16 @@ class Subdomain extends Component 'walrus','warthog','weasel','whale','wolf','wolverine','wombat','woodpecker','yak','zebra', ]; + public bool $dnsConfigured = false; + public function mount(Server $server): void { parent::mount($server); - $this->loadServerZones(); + $this->dnsConfigured = TechnitiumDns::isConfigured(); + + if ($this->dnsConfigured) { + $this->loadServerZones(); + } } /** diff --git a/extensions/Servers/Proxmox/TechnitiumDns.php b/extensions/Servers/Proxmox/TechnitiumDns.php index 7eb3b3b9f..1a11907e0 100644 --- a/extensions/Servers/Proxmox/TechnitiumDns.php +++ b/extensions/Servers/Proxmox/TechnitiumDns.php @@ -11,6 +11,15 @@ class TechnitiumDns private string $baseUrl; private string $token; + /** + * Check whether Technitium DNS credentials are configured. + */ + public static function isConfigured(): bool + { + return !empty(config('services.technitium.url')) + && !empty(config('services.technitium.token')); + } + public function __construct() { $this->baseUrl = rtrim((string) config('services.technitium.url', ''), '/'); diff --git a/extensions/Servers/Proxmox/views/subdomain.blade.php b/extensions/Servers/Proxmox/views/subdomain.blade.php index ac24feeca..16885689a 100644 --- a/extensions/Servers/Proxmox/views/subdomain.blade.php +++ b/extensions/Servers/Proxmox/views/subdomain.blade.php @@ -4,6 +4,15 @@ Subdomain + + @if (!$dnsConfigured) +
+ +

DNS Not Configured

+

Subdomain management is unavailable. The administrator needs to set the TECHNITIUM_DNS_URL and TECHNITIUM_DNS_TOKEN environment variables.

+
+ @else +
@@ -470,5 +479,6 @@
@endif + @endif {{-- dnsConfigured --}}