diff --git a/app/Livewire/Cloud.php b/app/Livewire/Cloud.php index 6da4007..b2f39f6 100644 --- a/app/Livewire/Cloud.php +++ b/app/Livewire/Cloud.php @@ -30,8 +30,13 @@ class Cloud extends Component $planKey = $shown->plan ?? 'team'; $plan = $plans[$planKey] ?? []; $quota = (int) ($shown->quota_gb ?? ($plan['quota_gb'] ?? 500)); - // Usage metering is not wired yet — show the fixture curve until it is. - $used = min($growth[count($growth) - 1], $quota); + // Usage metering is not wired yet — scale the illustrative curve into the + // instance's quota so the chart and the "x / y GB" label never disagree. + $curveMax = max($growth); + if ($curveMax > $quota) { + $growth = array_map(fn ($v) => (int) round($v / $curveMax * $quota), $growth); + } + $used = $growth[count($growth) - 1]; $domain = $shown?->custom_domain ?: ($shown?->subdomain ? $shown->subdomain.'.'.config('provisioning.dns.zone', 'clupilot.com') : 'cloud.example.com'); diff --git a/lang/de/cloud.php b/lang/de/cloud.php index 2f9a659..96d9a39 100644 --- a/lang/de/cloud.php +++ b/lang/de/cloud.php @@ -8,6 +8,10 @@ return [ 'now' => 'jetzt', 'open' => 'Cloud öffnen', 'status_active' => 'Aktiv', + 'status_provisioning' => 'Bereitstellung', + 'status_cancellation_scheduled' => 'Kündigung vorgemerkt', + 'status_failed' => 'Fehler', + 'status_suspended' => 'Ausgesetzt', 'plan' => 'Paket', 'location' => 'Serverstandort', 'version' => 'Version', diff --git a/lang/en/cloud.php b/lang/en/cloud.php index 85ea397..42ebfa1 100644 --- a/lang/en/cloud.php +++ b/lang/en/cloud.php @@ -8,6 +8,10 @@ return [ 'now' => 'now', 'open' => 'Open cloud', 'status_active' => 'Active', + 'status_provisioning' => 'Provisioning', + 'status_cancellation_scheduled' => 'Cancellation scheduled', + 'status_failed' => 'Failed', + 'status_suspended' => 'Suspended', 'plan' => 'Plan', 'location' => 'Server location', 'version' => 'Version', diff --git a/resources/views/components/ui/badge.blade.php b/resources/views/components/ui/badge.blade.php index 097dde9..821bca0 100644 --- a/resources/views/components/ui/badge.blade.php +++ b/resources/views/components/ui/badge.blade.php @@ -9,6 +9,8 @@ 'provisioning' => 'info', 'pending' => 'info', 'suspended' => 'warning', + 'cancellation_scheduled' => 'warning', + 'closed' => 'warning', 'warning' => 'warning', 'failed' => 'danger', 'offline' => 'danger',