fix: show defined resources in server tab, so you will know what you need to delete before you can delete the server.

This commit is contained in:
Andras Bacsai
2023-11-27 09:39:43 +01:00
parent ec21155c9e
commit d396f649df
16 changed files with 85 additions and 14 deletions

View File

@@ -194,6 +194,12 @@ class Server extends BaseModel
{
return instant_remote_process(["df /| tail -1 | awk '{ print $5}' | sed 's/%//g'"], $this, false);
}
public function definedResources() {
$applications = $this->applications();
$databases = $this->databases();
$services = $this->services();
return $applications->concat($databases)->concat($services->get());
}
public function hasDefinedResources()
{
$applications = $this->applications()->count() > 0;