diff --git a/app/Actions/Docker/GetContainersStatus.php b/app/Actions/Docker/GetContainersStatus.php index 26bd9f0b4..a08056837 100644 --- a/app/Actions/Docker/GetContainersStatus.php +++ b/app/Actions/Docker/GetContainersStatus.php @@ -107,6 +107,8 @@ class GetContainersStatus $statusFromDb = $preview->status; if ($statusFromDb !== $containerStatus) { $preview->update(['status' => $containerStatus]); + } else { + $preview->update(['last_online_at' => now()]); } } else { //Notify user that this container should not be there. @@ -118,6 +120,8 @@ class GetContainersStatus $statusFromDb = $application->status; if ($statusFromDb !== $containerStatus) { $application->update(['status' => $containerStatus]); + } else { + $application->update(['last_online_at' => now()]); } } else { //Notify user that this container should not be there. @@ -160,7 +164,10 @@ class GetContainersStatus $statusFromDb = $database->status; if ($statusFromDb !== $containerStatus) { $database->update(['status' => $containerStatus]); + } else { + $database->update(['last_online_at' => now()]); } + if ($isPublic) { $foundTcpProxy = $this->containers->filter(function ($value, $key) use ($uuid) { if ($this->server->isSwarm()) { @@ -202,6 +209,8 @@ class GetContainersStatus if ($statusFromDb !== $containerStatus) { // ray('Updating status: ' . $containerStatus); $service->update(['status' => $containerStatus]); + } else { + $service->update(['last_online_at' => now()]); } } } diff --git a/app/Actions/Server/ServerCheck.php b/app/Actions/Server/ServerCheck.php index c72f129d3..1dae03fd9 100644 --- a/app/Actions/Server/ServerCheck.php +++ b/app/Actions/Server/ServerCheck.php @@ -14,7 +14,7 @@ use App\Models\Service; use App\Models\ServiceApplication; use App\Models\ServiceDatabase; use App\Notifications\Container\ContainerRestarted; -use Arr; +use Illuminate\Support\Arr; use Lorisleiva\Actions\Concerns\AsAction; class ServerCheck diff --git a/app/Models/Server.php b/app/Models/Server.php index 0fcfd89ab..3076308ad 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -1238,7 +1238,7 @@ $schema://$host { StartSentinel::run($this, true); } } catch (\Throwable $e) { - return handleError($e, $this); + return handleError($e); } }