From ed54245c4b8200a3fc3d2166419a288b1350d3c3 Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Sat, 6 Dec 2025 12:28:32 -0500 Subject: [PATCH] Add Proxmox server specifications display to service view --- app/Livewire/Services/Show.php | 2 +- themes/lucentui/views/services/show.blade.php | 72 +++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Services/Show.php b/app/Livewire/Services/Show.php index 7a91f07f1..6d295fb92 100644 --- a/app/Livewire/Services/Show.php +++ b/app/Livewire/Services/Show.php @@ -30,7 +30,7 @@ class Show extends Component public function mount() { // Attach Proxmox server (if any) so we can show hostname on the service page - $this->proxmoxServer = ProxmoxServer::where('service_id', $this->service->id)->first(); + $this->proxmoxServer = ProxmoxServer::with('os')->where('service_id', $this->service->id)->first(); // Only fetch the actions if the service is active if ($this->service->status == Service::STATUS_ACTIVE) { diff --git a/themes/lucentui/views/services/show.blade.php b/themes/lucentui/views/services/show.blade.php index 00c6a877e..59b42bf6e 100644 --- a/themes/lucentui/views/services/show.blade.php +++ b/themes/lucentui/views/services/show.blade.php @@ -125,6 +125,78 @@ + + @if($proxmoxServer) + @php + $cores = $service->product->settings()->where('key', 'cores')->first()?->value; + $memory = $service->product->settings()->where('key', 'memory')->first()?->value; + $disk = $service->product->settings()->where('key', 'disk')->first()?->value; + $bandwidth = $service->product->settings()->where('key', 'bandwidth')->first()?->value; + @endphp +
+
+ +

Server Specifications

+
+
+ @if($cores) +
+ + CPU Cores + + {{ $cores }} {{ $cores == 1 ? 'Core' : 'Cores' }} +
+ @endif + @if($memory) +
+ + Memory + + + @if($memory >= 1024) + {{ round($memory / 1024, 1) }} GB + @else + {{ $memory }} MB + @endif + +
+ @endif + @if($disk) +
+ + Storage + + {{ $disk }} GB +
+ @endif + @if($bandwidth) +
+ + Bandwidth + + + @if($bandwidth == 0 || $bandwidth == -1) + Unlimited + @elseif($bandwidth >= 1000) + {{ round($bandwidth / 1000, 1) }} TB + @else + {{ $bandwidth }} GB + @endif + +
+ @endif + @if($proxmoxServer->os) +
+ + Operating System + + {{ $proxmoxServer->os->name }} +
+ @endif +
+
+ @endif + @if($service->cancellable || $service->upgradable || count($buttons) > 0)