server->name) ->description($this->server->description), Stat::make('Status', $this->status()), Stat::make('Address', $this->server->allocation->address), ]; } private function status(): string { $status = Str::title($this->server->condition); $uptime = collect(cache()->get("servers.{$this->server->id}.uptime"))->last() ?? 0; if ($uptime === 0) { return $status; } $uptime = now()->subMillis($uptime)->diffForHumans(syntax: CarbonInterface::DIFF_ABSOLUTE, short: true, parts: 2); return "$status ($uptime)"; } }