feat: implement server tags management with Proxmox-style color generation and syncing

This commit is contained in:
2025-12-18 20:38:12 -05:00
parent b7547fd01b
commit bdd168d26d
6 changed files with 407 additions and 1 deletions

View File

@@ -23,6 +23,18 @@
</div>
@endif
<span class="font-medium">{{ $status->name }}</span>
{{-- Server Tags (Proxmox-style) --}}
@if($server->tags && count($server->tags) > 0)
<div class="flex items-center gap-1.5 ml-2">
@foreach($server->tags as $tag)
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium text-white"
style="background-color: {{ $tag['color'] ?? '#6366f1' }};">
{{ $tag['text'] }}
</span>
@endforeach
</div>
@endif
</div>
<div class="flex items-center gap-2 px-3 py-1.5 rounded-lg
@if($status->status == 'running') text-success bg-success/20
@@ -132,7 +144,7 @@
<div class="flex flex-col">
<div class="flex items-center gap-2 mb-1">
<x-ri-speed-line class="size-4 text-base/50" />
<span class="text-xs text-base/50">Bandwidth</span>
<span class="text-xs text-base/50">Bandwidth (95% threshold: {{ $this->bandwidthThreshold95 }} GiB)</span>
</div>
<span class="text-base font-medium">
{{ $this->monthlyTraffic }} GiB / {{ $this->bandwidthThreshold95 }} GiB