From dddbe40bbe0da5f3719ecbe3eb0712ce0e7f280d Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 18 Oct 2023 11:35:36 +0200 Subject: [PATCH 1/2] fix dashboard ui on small screens --- config/sentry.php | 2 +- config/version.php | 2 +- resources/views/livewire/dashboard.blade.php | 4 ++-- versions.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index 263e642b1..61c18786f 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // 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.93', + 'release' => '4.0.0-beta.94', // 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 1b3ce03c5..4daf3b070 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ count() === 1)
@else -
+
@endif @foreach ($projects as $project)
description }}
@endif - + New Resource diff --git a/versions.json b/versions.json index c4f05a469..2c40f0e11 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.36" }, "v4": { - "version": "4.0.0-beta.93" + "version": "4.0.0-beta.94" } } } From e4aed185a28a283278bab60b30ab7ecf0457887c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 18 Oct 2023 12:48:29 +0200 Subject: [PATCH 2/2] fix: label generation --- app/Models/Service.php | 2 +- bootstrap/helpers/docker.php | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Models/Service.php b/app/Models/Service.php index 95fe826fb..9d14e18eb 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -538,7 +538,7 @@ class Service extends BaseModel $serviceLabels = $serviceLabels->merge($defaultLabels); if (!$isDatabase && $fqdns->count() > 0) { if ($fqdns) { - $serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik($this->uuid, $fqdns, true)); + $serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik($fqdns, true)); } } data_set($service, 'labels', $serviceLabels->toArray()); diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index dfa4c1788..4fc87ac13 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -147,11 +147,12 @@ function defaultLabels($id, $name, $pull_request_id = 0, string $type = 'applica } return $labels; } -function fqdnLabelsForTraefik($uuid, Collection $domains, bool $is_force_https_enabled, $onlyPort = null) +function fqdnLabelsForTraefik(Collection $domains, bool $is_force_https_enabled, $onlyPort = null) { $labels = collect([]); $labels->push('traefik.enable=true'); foreach ($domains as $domain) { + $uuid = (string)new Cuid2(7); $url = Url::fromString($domain); $host = $url->getHost(); $path = $url->getPath(); @@ -212,13 +213,13 @@ function generateLabelsApplication(Application $application, ?ApplicationPreview $onlyPort = $ports[0]; } $pull_request_id = data_get($preview, 'pull_request_id', 0); - // $container_name = generateApplicationContainerName($application, $pull_request_id); + $container_name = generateApplicationContainerName($application, $pull_request_id); $appId = $application->id; if ($pull_request_id !== 0 && $pull_request_id !== null) { $appId = $appId . '-pr-' . $pull_request_id; } $labels = collect([]); - $labels = $labels->merge(defaultLabels($appId, $application->uuid, $pull_request_id)); + $labels = $labels->merge(defaultLabels($appId, $container_name, $pull_request_id)); if ($application->fqdn) { if ($pull_request_id !== 0) { $domains = Str::of(data_get($preview, 'fqdn'))->explode(','); @@ -226,7 +227,8 @@ function generateLabelsApplication(Application $application, ?ApplicationPreview $domains = Str::of(data_get($application, 'fqdn'))->explode(','); } // Add Traefik labels no matter which proxy is selected - $labels = $labels->merge(fqdnLabelsForTraefik($application->uuid, $domains, $application->settings->is_force_https_enabled, $onlyPort)); + $labels = $labels->merge(fqdnLabelsForTraefik($domains, $application->settings->is_force_https_enabled, $onlyPort)); } + ray($labels); return $labels->all(); }