mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 00:17:16 +00:00
Merge remote-tracking branch 'origin/next' into improve-application-url-handling
This commit is contained in:
commit
cc4f666ba2
5 files changed
+99
-27
No files matched your search
@@ -112,14 +112,17 @@ class Select extends Component
|
||||
$default_logo = 'images/default.webp';
|
||||
$logo = data_get($service, 'logo', $default_logo);
|
||||
$local_logo_path = public_path($logo);
|
||||
$serviceKey = (string) $key;
|
||||
|
||||
return [
|
||||
'name' => str($key)->headline(),
|
||||
'id' => $serviceKey,
|
||||
'name' => str($serviceKey)->headline(),
|
||||
'docsSlug' => str($serviceKey)->lower()->value(),
|
||||
'logo' => asset($logo),
|
||||
'logo_github_url' => file_exists($local_logo_path)
|
||||
? 'https://raw.githubusercontent.com/coollabsio/coolify/refs/heads/main/public/'.$logo
|
||||
: asset($default_logo),
|
||||
'templateLastUpdated' => $templateLastUpdatedMap[(string) $key] ?? null,
|
||||
'templateLastUpdated' => $templateLastUpdatedMap[$serviceKey] ?? null,
|
||||
] + (array) $service;
|
||||
})->all();
|
||||
|
||||
@@ -336,7 +339,10 @@ class Select extends Component
|
||||
|
||||
public function setType(string $type)
|
||||
{
|
||||
$type = str($type)->lower()->slug()->value();
|
||||
if (! str($type)->startsWith('one-click-service-')) {
|
||||
$type = str($type)->lower()->slug()->value();
|
||||
}
|
||||
|
||||
if ($this->loading) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ class All extends Component
|
||||
|
||||
private function getEnvironmentVariables(bool $isPreview, bool $withSearch = true): Collection
|
||||
{
|
||||
if ($isPreview && ! $this->supportsPreviewEnvironmentVariables()) {
|
||||
return collect();
|
||||
}
|
||||
|
||||
$query = $isPreview
|
||||
? $this->resource->environment_variables_preview()
|
||||
: $this->resource->environment_variables();
|
||||
@@ -119,12 +123,21 @@ class All extends Component
|
||||
return trim($this->search);
|
||||
}
|
||||
|
||||
private function supportsPreviewEnvironmentVariables(): bool
|
||||
{
|
||||
return $this->showPreview && $this->resource instanceof Application;
|
||||
}
|
||||
|
||||
public function getHasEnvironmentVariablesProperty(): bool
|
||||
{
|
||||
return $this->environmentVariables->isNotEmpty() ||
|
||||
$hasPreviewEnvironmentVariables = $this->supportsPreviewEnvironmentVariables() && (
|
||||
$this->environmentVariablesPreview->isNotEmpty() ||
|
||||
$this->hardcodedEnvironmentVariablesPreview->isNotEmpty()
|
||||
);
|
||||
|
||||
return $this->environmentVariables->isNotEmpty() ||
|
||||
$this->hardcodedEnvironmentVariables->isNotEmpty() ||
|
||||
$this->hardcodedEnvironmentVariablesPreview->isNotEmpty();
|
||||
$hasPreviewEnvironmentVariables;
|
||||
}
|
||||
|
||||
private function nullLockedValues($envs)
|
||||
@@ -158,6 +171,10 @@ class All extends Component
|
||||
|
||||
protected function getHardcodedVariables(bool $isPreview)
|
||||
{
|
||||
if ($isPreview && ! $this->supportsPreviewEnvironmentVariables()) {
|
||||
return collect([]);
|
||||
}
|
||||
|
||||
// Only for services and docker-compose applications
|
||||
if ($this->resource->type() !== 'service' &&
|
||||
($this->resourceClass !== 'App\Models\Application' ||
|
||||
|
||||
Reference in new issue
Block a user