mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Show suspended servers (#870)
This commit is contained in:
parent
2525af8f02
commit
18fe4f1123
@ -458,6 +458,9 @@ class Server extends Model
|
||||
}
|
||||
|
||||
if ($type === ServerResourceType::Time) {
|
||||
if ($this->isSuspended()) {
|
||||
return 'Suspended';
|
||||
}
|
||||
if ($resourceAmount === 0) {
|
||||
return 'Offline';
|
||||
}
|
||||
@ -484,7 +487,7 @@ class Server extends Model
|
||||
public function condition(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn () => $this->status?->value ?? $this->retrieveStatus(),
|
||||
get: fn () => $this->isSuspended() ? 'Suspended' : $this->status?->value ?? $this->retrieveStatus(),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user