feat: use new notification event names
This commit is contained in:
@@ -17,7 +17,7 @@ class HighDiskUsage extends CustomEmailNotification
|
||||
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return setNotificationChannels($notifiable, 'server_disk_usage');
|
||||
return $notifiable->getEnabledChannels('server_disk_usage');
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
@@ -45,7 +45,7 @@ class HighDiskUsage extends CustomEmailNotification
|
||||
$message->addField('Disk usage', "{$this->disk_usage}%", true);
|
||||
$message->addField('Threshold', "{$this->server_disk_usage_notification_threshold}%", true);
|
||||
$message->addField('What to do?', '[Link](https://coolify.io/docs/knowledge-base/server/automated-cleanup)', true);
|
||||
$message->addField('Change Settings', '[Threshold](' . base_url() . '/server/' . $this->server->uuid . '#advanced) | [Notification](' . base_url() . '/notifications/discord)');
|
||||
$message->addField('Change Settings', '[Threshold]('.base_url().'/server/'.$this->server->uuid.'#advanced) | [Notification]('.base_url().'/notifications/discord)');
|
||||
|
||||
return $message;
|
||||
}
|
||||
@@ -65,8 +65,8 @@ class HighDiskUsage extends CustomEmailNotification
|
||||
$description .= "Please cleanup your disk to prevent data-loss.\n";
|
||||
$description .= "Tips for cleanup: https://coolify.io/docs/knowledge-base/server/automated-cleanup\n";
|
||||
$description .= "Change settings:\n";
|
||||
$description .= "- Threshold: " . base_url() . "/server/" . $this->server->uuid . "#advanced\n";
|
||||
$description .= "- Notifications: " . base_url() . "/notifications/discord";
|
||||
$description .= '- Threshold: '.base_url().'/server/'.$this->server->uuid."#advanced\n";
|
||||
$description .= '- Notifications: '.base_url().'/notifications/discord';
|
||||
|
||||
return new SlackMessage(
|
||||
title: 'High disk usage detected',
|
||||
|
||||
Reference in New Issue
Block a user