diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 0e3983f7e..73cf55fcd 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -81,7 +81,9 @@ public function new() $oneClickService = data_get($services, "$oneClickServiceName.compose"); $oneClickDotEnvs = data_get($services, "$oneClickServiceName.envs", null); if ($oneClickDotEnvs) { - $oneClickDotEnvs = Str::of(base64_decode($oneClickDotEnvs))->split('/\r\n|\r|\n/'); + $oneClickDotEnvs = Str::of(base64_decode($oneClickDotEnvs))->split('/\r\n|\r|\n/')->filter(function ($value) { + return !empty($value); + }); } if ($oneClickService) { $destination = StandaloneDocker::whereUuid($destination_uuid)->first(); diff --git a/app/Http/Livewire/Project/Shared/GetLogs.php b/app/Http/Livewire/Project/Shared/GetLogs.php index e82f20497..b693793cf 100644 --- a/app/Http/Livewire/Project/Shared/GetLogs.php +++ b/app/Http/Livewire/Project/Shared/GetLogs.php @@ -33,11 +33,16 @@ public function getLogs($refresh = false) if ($refresh) { $this->outputs = ''; } - $command = Process::run($sshCommand); - $output = $command->output(); - $error = $command->errorOutput(); - $this->doSomethingWithThisChunkOfOutput($output); - $this->doSomethingWithThisChunkOfOutput($error); + Process::run($sshCommand, function (string $type, string $output) { + $this->doSomethingWithThisChunkOfOutput($output); + }); + if ($this->showTimeStamps) { + $this->outputs = str($this->outputs)->split('/\n/')->sort(function ($a, $b) { + $a = explode(' ', $a); + $b = explode(' ', $b); + return $a[0] <=> $b[0]; + })->join("\n"); + } } } public function render() diff --git a/app/Models/Service.php b/app/Models/Service.php index 5b4d5fc09..da3e81cbe 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -118,7 +118,7 @@ public function saveComposeConfigs() public function parse(bool $isNew = false): Collection { - ray()->clearAll(); + // ray()->clearAll(); if ($this->docker_compose_raw) { try { $yaml = Yaml::parse($this->docker_compose_raw); @@ -260,7 +260,7 @@ public function parse(bool $isNew = false): Collection $networks = $serviceNetworks->toArray(); foreach ($definedNetwork as $key => $network) { $networks = array_merge($networks, [ - $network => null + $network ]); } data_set($service, 'networks', $networks); diff --git a/config/sentry.php b/config/sentry.php index e5bd40ee5..b2b99a365 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.109', + 'release' => '4.0.0-beta.110', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index de5c5d268..4bcb4ce5b 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Refresh -
+
-
+
diff --git a/routes/webhooks.php b/routes/webhooks.php index c38c62ae1..e6a6a0af9 100644 --- a/routes/webhooks.php +++ b/routes/webhooks.php @@ -284,7 +284,7 @@ $customerId = data_get($data, 'customer'); $subscription = Subscription::where('stripe_customer_id', $customerId)->first(); if (!$subscription) { - Sleep::for(5); + Sleep::for(5)->seconds(); $subscription = Subscription::where('stripe_customer_id', $customerId)->firstOrFail(); } $planId = data_get($data, 'lines.data.0.plan.id'); diff --git a/versions.json b/versions.json index e61bb360c..0ab7c9023 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.36" }, "v4": { - "version": "4.0.0-beta.109" + "version": "4.0.0-beta.110" } } }