Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: docker cleanup email notifications

Andras Bacsai6a7b28384403
diff --git a/app/Notifications/Server/DockerCleanupFailed.php b/app/Notifications/Server/DockerCleanupFailed.php
index d7f70e0292..53714925c4 100644
--- a/app/Notifications/Server/DockerCleanupFailed.php
+++ b/app/Notifications/Server/DockerCleanupFailed.php
@@ -25,8 +25,8 @@ class DockerCleanupFailed extends CustomEmailNotification
$mail = new MailMessage;
$mail->subject("Coolify: [ACTION REQUIRED] Docker cleanup job failed on {$this->server->name}");
$mail->view('emails.docker-cleanup-failed', [
- 'serverName' => $this->server->name,
- 'message' => $this->message,
+ 'name' => $this->server->name,
+ 'text' => $this->message,
]);
return $mail;
diff --git a/app/Notifications/Server/DockerCleanupSuccess.php b/app/Notifications/Server/DockerCleanupSuccess.php
index eb84de787e..85a819da20 100644
--- a/app/Notifications/Server/DockerCleanupSuccess.php
+++ b/app/Notifications/Server/DockerCleanupSuccess.php
@@ -25,14 +25,13 @@ class DockerCleanupSuccess extends CustomEmailNotification
$mail = new MailMessage;
$mail->subject("Coolify: Docker cleanup job succeeded on {$this->server->name}");
$mail->view('emails.docker-cleanup-success', [
- 'serverName' => $this->server->name,
- 'message' => $this->message,
+ 'name' => $this->server->name,
+ 'text' => $this->message,
]);
return $mail;
}
-
public function toDiscord(): DiscordMessage
{
return new DiscordMessage(
diff --git a/resources/views/emails/docker-cleanup-failed.blade.php b/resources/views/emails/docker-cleanup-failed.blade.php
index 9661df0848..a12f20fa8e 100644
--- a/resources/views/emails/docker-cleanup-failed.blade.php
+++ b/resources/views/emails/docker-cleanup-failed.blade.php
@@ -1,8 +1,8 @@
<x-emails.layout>
-Docker Cleanup on {{ $serverName }} FAILED with the following error:
+Docker Cleanup on {{ $name }} FAILED with the following error:
<pre>
-{{ $message }}
+{{ $text }}
</pre>
</x-emails.layout>
diff --git a/resources/views/emails/docker-cleanup-success.blade.php b/resources/views/emails/docker-cleanup-success.blade.php
index 9437504565..8671d74c81 100644
--- a/resources/views/emails/docker-cleanup-success.blade.php
+++ b/resources/views/emails/docker-cleanup-success.blade.php
@@ -1,8 +1,9 @@
<x-emails.layout>
-Docker Cleanup on "{{ $serverName }}" succeeded with the following message:
+Docker Cleanup on {{ $name }} succeeded with the following message:
+
<pre>
-"{{ $message }}"
+{{ $text }}
</pre>
-</x-emails.layout>
\ No newline at end of file
+</x-emails.layout>
diff --git a/resources/views/livewire/notifications/email.blade.php b/resources/views/livewire/notifications/email.blade.php
index 37bfac0e0f..5b998975d2 100644
--- a/resources/views/livewire/notifications/email.blade.php
+++ b/resources/views/livewire/notifications/email.blade.php
@@ -142,14 +142,12 @@
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Server</h3>
<div class="flex flex-col gap-1.5 pl-1">
- <x-forms.checkbox instantSave="saveModel"
- helper="Send an email when Docker Cleanup is run on a server."
- id="dockerCleanupSuccessEmailNotifications" label="Docker Cleanup Success" />
- <x-forms.checkbox instantSave="saveModel"
- helper="Send an email when Docker Cleanup fails on a server."
- id="dockerCleanupFailureEmailNotifications" label="Docker Cleanup Failure" />
- <x-forms.checkbox instantSave="saveModel" helper="Send an email when server disk usage is high."
- id="serverDiskUsageEmailNotifications" label="Server Disk Usage" />
+ <x-forms.checkbox instantSave="saveModel" id="dockerCleanupSuccessEmailNotifications"
+ label="Docker Cleanup Success" />
+ <x-forms.checkbox instantSave="saveModel" id="dockerCleanupFailureEmailNotifications"
+ label="Docker Cleanup Failure" />
+ <x-forms.checkbox instantSave="saveModel" id="serverDiskUsageEmailNotifications"
+ label="Server Disk Usage" />
<x-forms.checkbox instantSave="saveModel" id="serverReachableEmailNotifications"
label="Server Reachable" />
<x-forms.checkbox instantSave="saveModel" id="serverUnreachableEmailNotifications"