diff --git a/app/Livewire/Project/Index.php b/app/Livewire/Project/Index.php
index a27a3652f..0e4f15a5c 100644
--- a/app/Livewire/Project/Index.php
+++ b/app/Livewire/Project/Index.php
@@ -18,20 +18,7 @@ class Index extends Component
public function mount()
{
$this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
- $this->projects = Project::ownedByCurrentTeam()->get()->map(function ($project) {
- $project->settingsRoute = route('project.edit', ['project_uuid' => $project->uuid]);
- $project->canUpdate = auth()->user()->can('update', $project);
- $project->canCreateResource = auth()->user()->can('createAnyResource');
- $firstEnvironment = $project->environments->first();
- $project->addResourceRoute = $firstEnvironment
- ? route('project.resource.create', [
- 'project_uuid' => $project->uuid,
- 'environment_uuid' => $firstEnvironment->uuid,
- ])
- : null;
-
- return $project;
- });
+ $this->projects = Project::ownedByCurrentTeam()->get();
$this->servers = Server::ownedByCurrentTeam()->count();
}
@@ -39,11 +26,4 @@ public function render()
{
return view('livewire.project.index');
}
-
- public function navigateToProject($projectUuid)
- {
- $project = collect($this->projects)->firstWhere('uuid', $projectUuid);
-
- return $this->redirect($project->navigateTo(), navigate: false);
- }
}
diff --git a/app/Livewire/Project/Shared/GetLogs.php b/app/Livewire/Project/Shared/GetLogs.php
index 43fd97c34..304f7b411 100644
--- a/app/Livewire/Project/Shared/GetLogs.php
+++ b/app/Livewire/Project/Shared/GetLogs.php
@@ -33,6 +33,8 @@ class GetLogs extends Component
public ?string $container = null;
+ public ?string $displayName = null;
+
public ?string $pull_request = null;
public ?bool $streamLogs = false;
diff --git a/app/Livewire/Server/New/ByIp.php b/app/Livewire/Server/New/ByIp.php
index 116775a6f..35526d59e 100644
--- a/app/Livewire/Server/New/ByIp.php
+++ b/app/Livewire/Server/New/ByIp.php
@@ -7,7 +7,6 @@
use App\Models\Team;
use App\Support\ValidationPatterns;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
-use Illuminate\Support\Collection;
use Livewire\Attributes\Locked;
use Livewire\Component;
@@ -39,25 +38,12 @@ class ByIp extends Component
public int $port = 22;
- public bool $is_swarm_manager = false;
-
- public bool $is_swarm_worker = false;
-
- public $selected_swarm_cluster = null;
-
public bool $is_build_server = false;
- #[Locked]
- public Collection $swarm_managers;
-
public function mount()
{
$this->name = generate_random_name();
$this->private_key_id = $this->private_keys->first()?->id;
- $this->swarm_managers = Server::isUsable()->get()->where('settings.is_swarm_manager', true);
- if ($this->swarm_managers->count() > 0) {
- $this->selected_swarm_cluster = $this->swarm_managers->first()->id;
- }
}
protected function rules(): array
@@ -72,9 +58,6 @@ protected function rules(): array
'ip' => 'required|string',
'user' => 'required|string',
'port' => 'required|integer|between:1,65535',
- 'is_swarm_manager' => 'required|boolean',
- 'is_swarm_worker' => 'required|boolean',
- 'selected_swarm_cluster' => 'nullable|integer',
'is_build_server' => 'required|boolean',
];
}
@@ -94,11 +77,6 @@ protected function messages(): array
'port.required' => 'The Port field is required.',
'port.integer' => 'The Port field must be an integer.',
'port.between' => 'The Port field must be between 1 and 65535.',
- 'is_swarm_manager.required' => 'The Swarm Manager field is required.',
- 'is_swarm_manager.boolean' => 'The Swarm Manager field must be true or false.',
- 'is_swarm_worker.required' => 'The Swarm Worker field is required.',
- 'is_swarm_worker.boolean' => 'The Swarm Worker field must be true or false.',
- 'selected_swarm_cluster.integer' => 'The Swarm Cluster field must be an integer.',
'is_build_server.required' => 'The Build Server field is required.',
'is_build_server.boolean' => 'The Build Server field must be true or false.',
]);
@@ -140,9 +118,6 @@ public function submit()
'team_id' => currentTeam()->id,
'private_key_id' => $this->private_key_id,
];
- if ($this->is_swarm_worker) {
- $payload['swarm_cluster'] = $this->selected_swarm_cluster;
- }
if ($this->is_build_server) {
data_forget($payload, 'proxy');
}
@@ -150,13 +125,6 @@ public function submit()
$server->proxy->set('status', 'exited');
$server->proxy->set('type', ProxyTypes::TRAEFIK->value);
$server->save();
- if ($this->is_build_server) {
- $this->is_swarm_manager = false;
- $this->is_swarm_worker = false;
- } else {
- $server->settings->is_swarm_manager = $this->is_swarm_manager;
- $server->settings->is_swarm_worker = $this->is_swarm_worker;
- }
$server->settings->is_build_server = $this->is_build_server;
$server->settings->save();
diff --git a/app/Livewire/SettingsOauth.php b/app/Livewire/SettingsOauth.php
index e23f94a73..f17730a10 100644
--- a/app/Livewire/SettingsOauth.php
+++ b/app/Livewire/SettingsOauth.php
@@ -29,7 +29,16 @@ public function mount()
return redirect()->route('home');
}
$this->oauth_settings_map = OauthSetting::all()->sortBy('provider')->reduce(function ($carry, $setting) {
- $carry[$setting->provider] = $setting;
+ $carry[$setting->provider] = [
+ 'id' => $setting->id,
+ 'provider' => $setting->provider,
+ 'enabled' => $setting->enabled,
+ 'client_id' => $setting->client_id,
+ 'client_secret' => $setting->client_secret,
+ 'redirect_uri' => $setting->redirect_uri,
+ 'tenant' => $setting->tenant,
+ 'base_url' => $setting->base_url,
+ ];
return $carry;
}, []);
@@ -38,16 +47,48 @@ public function mount()
private function updateOauthSettings(?string $provider = null)
{
if ($provider) {
- $oauth = $this->oauth_settings_map[$provider];
+ $oauthData = $this->oauth_settings_map[$provider];
+ $oauth = OauthSetting::find($oauthData['id']);
+
+ $oauth->fill([
+ 'enabled' => $oauthData['enabled'],
+ 'client_id' => $oauthData['client_id'],
+ 'client_secret' => $oauthData['client_secret'],
+ 'redirect_uri' => $oauthData['redirect_uri'],
+ 'tenant' => $oauthData['tenant'],
+ 'base_url' => $oauthData['base_url'],
+ ]);
+
if (! $oauth->couldBeEnabled()) {
$oauth->update(['enabled' => false]);
throw new \Exception('OAuth settings are not complete for '.$oauth->provider.'. Please fill in all required fields.');
}
$oauth->save();
+
+ // Update the array with fresh data
+ $this->oauth_settings_map[$provider] = [
+ 'id' => $oauth->id,
+ 'provider' => $oauth->provider,
+ 'enabled' => $oauth->enabled,
+ 'client_id' => $oauth->client_id,
+ 'client_secret' => $oauth->client_secret,
+ 'redirect_uri' => $oauth->redirect_uri,
+ 'tenant' => $oauth->tenant,
+ 'base_url' => $oauth->base_url,
+ ];
+
$this->dispatch('success', 'OAuth settings for '.$oauth->provider.' updated successfully!');
} else {
- foreach (array_values($this->oauth_settings_map) as &$setting) {
- $setting->save();
+ foreach (array_values($this->oauth_settings_map) as $settingData) {
+ $oauth = OauthSetting::find($settingData['id']);
+ $oauth->update([
+ 'enabled' => $settingData['enabled'],
+ 'client_id' => $settingData['client_id'],
+ 'client_secret' => $settingData['client_secret'],
+ 'redirect_uri' => $settingData['redirect_uri'],
+ 'tenant' => $settingData['tenant'],
+ 'base_url' => $settingData['base_url'],
+ ]);
}
}
}
diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php
index 4b152dd11..84502872e 100644
--- a/resources/views/components/navbar.blade.php
+++ b/resources/views/components/navbar.blade.php
@@ -79,7 +79,7 @@
}">
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index a1ff81e84..0a7909761 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -47,7 +47,7 @@
diff --git a/resources/views/livewire/project/edit.blade.php b/resources/views/livewire/project/edit.blade.php
index 591643402..dfaf20ed9 100644
--- a/resources/views/livewire/project/edit.blade.php
+++ b/resources/views/livewire/project/edit.blade.php
@@ -1,19 +1,19 @@
{{ data_get_str($project, 'name')->limit(10) }} > Edit | Coolify
-
-
+
\ No newline at end of file
diff --git a/resources/views/livewire/project/index.blade.php b/resources/views/livewire/project/index.blade.php
index fd6e4c422..e1e1a22bc 100644
--- a/resources/views/livewire/project/index.blade.php
+++ b/resources/views/livewire/project/index.blade.php
@@ -11,29 +11,38 @@
@endcan
All your projects are here.
-
-
-
+
+ @foreach ($projects as $project)
+
diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php
index c54f69dde..2aff4fc1c 100644
--- a/resources/views/livewire/project/shared/get-logs.blade.php
+++ b/resources/views/livewire/project/shared/get-logs.blade.php
@@ -34,7 +34,9 @@
}
}">
- @if ($resource?->type() === 'application' || str($resource?->type())->startsWith('standalone'))
+ @if ($displayName)
+
{{ $displayName }}
+ @elseif ($resource?->type() === 'application' || str($resource?->type())->startsWith('standalone'))
{{ $container }}
@else
{{ str($container)->beforeLast('-')->headline() }}
diff --git a/resources/views/livewire/server/new/by-ip.blade.php b/resources/views/livewire/server/new/by-ip.blade.php
index 94d0fccbd..e41342ca2 100644
--- a/resources/views/livewire/server/new/by-ip.blade.php
+++ b/resources/views/livewire/server/new/by-ip.blade.php
@@ -31,45 +31,9 @@ class="font-bold underline" target="_blank"
helper="Build servers are used to build your applications, so you cannot deploy applications to it."
label="Use it as a build server?" />
-
-
Swarm (experimental)
-
- @if ($is_swarm_worker || $is_build_server)
-
- @else
-
- @endif
- @if ($is_swarm_manager || $is_build_server)
-
- @else
-
- @endif
- @if ($is_swarm_worker && count($swarm_managers) > 0)
-
-
- @foreach ($swarm_managers as $server)
- @if ($loop->first)
- {{ $server->name }}
- @else
- {{ $server->name }}
- @endif
- @endforeach
-
-
- @endif
-
Continue
@endif
-
+
\ No newline at end of file
diff --git a/resources/views/livewire/server/proxy/logs.blade.php b/resources/views/livewire/server/proxy/logs.blade.php
index ea4a68674..17fe65f4c 100644
--- a/resources/views/livewire/server/proxy/logs.blade.php
+++ b/resources/views/livewire/server/proxy/logs.blade.php
@@ -7,7 +7,7 @@
Logs
-
+
diff --git a/resources/views/livewire/server/security/patches.blade.php b/resources/views/livewire/server/security/patches.blade.php
index fd7b61ad9..7627cf91f 100644
--- a/resources/views/livewire/server/security/patches.blade.php
+++ b/resources/views/livewire/server/security/patches.blade.php
@@ -56,48 +56,53 @@
step2ButtonText="Update All
Packages" />
-
-
-
- Package
- @if ($packageManager !== 'dnf')
- Current Version
- @endif
- New Version
- Action
-
-
-
- @foreach ($updates as $update)
+
+
+
-
- @if (data_get_str($update, 'package')->contains('docker') || data_get_str($update, 'package')->contains('kernel'))
-
-
-
-
-
-
-
-
- @endif
- {{ data_get($update, 'package') }}
-
- @if ($packageManager !== 'dnf')
- {{ data_get($update, 'current_version') }}
- @endif
- {{ data_get($update, 'new_version') }}
-
- Update
-
+ Package
+ Version
+ Action
- @endforeach
-
-
+
+
+ @foreach ($updates as $update)
+
+
+
+ @if (data_get_str($update, 'package')->contains('docker') || data_get_str($update, 'package')->contains('kernel'))
+
+
+
+
+
+
+
+
+ @endif
+
{{ data_get($update, 'package') }}
+
+
+
+
+ {{ data_get($update, 'new_version') }}
+ @if ($packageManager !== 'dnf' && data_get($update, 'current_version'))
+
+ @endif
+
+
+
+ Update
+
+
+ @endforeach
+
+
+
@endif
@endif
diff --git a/resources/views/livewire/server/show.blade.php b/resources/views/livewire/server/show.blade.php
index 5f99ad97f..4cce11e20 100644
--- a/resources/views/livewire/server/show.blade.php
+++ b/resources/views/livewire/server/show.blade.php
@@ -337,7 +337,7 @@ class="w-full input opacity-50 cursor-not-allowed"
Sentinel Logs
+ container="coolify-sentinel" displayName="Sentinel" lazy />
Logs
@@ -353,7 +353,7 @@ class="w-full input opacity-50 cursor-not-allowed"
Sentinel Logs
+ container="coolify-sentinel" displayName="Sentinel" lazy />
Logs
diff --git a/resources/views/livewire/settings-oauth.blade.php b/resources/views/livewire/settings-oauth.blade.php
index 6a967504d..7650a5654 100644
--- a/resources/views/livewire/settings-oauth.blade.php
+++ b/resources/views/livewire/settings-oauth.blade.php
@@ -16,33 +16,33 @@
@foreach ($oauth_settings_map as $oauth_setting)
-
{{ ucfirst($oauth_setting->provider) }}
+
{{ ucfirst($oauth_setting['provider']) }}
-
+
-
-
-
- @if ($oauth_setting->provider == 'azure')
-
+ @if ($oauth_setting['provider'] == 'azure')
+
@endif
- @if ($oauth_setting->provider == 'google')
-
@endif
@if (
- $oauth_setting->provider == 'authentik' ||
- $oauth_setting->provider == 'clerk' ||
- $oauth_setting->provider == 'zitadel' ||
- $oauth_setting->provider == 'gitlab')
-
@endif