feat(server): implement server patch check notifications
- Added a new job, ServerPatchCheckJob, to handle server patch checks and notifications. - Introduced a new notification class, ServerPatchCheck, for sending updates via email, Discord, Slack, Pushover, and Telegram. - Updated notification settings models to include server patch notification options for email, Discord, Slack, Pushover, and Telegram. - Created a migration to add server patch notification fields to the respective settings tables. - Enhanced the UI to allow users to enable/disable server patch notifications across different channels.
This commit is contained in:
@@ -28,6 +28,7 @@ class DiscordNotificationSettings extends Model
|
||||
'server_disk_usage_discord_notifications',
|
||||
'server_reachable_discord_notifications',
|
||||
'server_unreachable_discord_notifications',
|
||||
'server_patch_discord_notifications',
|
||||
'discord_ping_enabled',
|
||||
];
|
||||
|
||||
@@ -46,6 +47,7 @@ class DiscordNotificationSettings extends Model
|
||||
'server_disk_usage_discord_notifications' => 'boolean',
|
||||
'server_reachable_discord_notifications' => 'boolean',
|
||||
'server_unreachable_discord_notifications' => 'boolean',
|
||||
'server_patch_discord_notifications' => 'boolean',
|
||||
'discord_ping_enabled' => 'boolean',
|
||||
];
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ class EmailNotificationSettings extends Model
|
||||
'scheduled_task_success_email_notifications',
|
||||
'scheduled_task_failure_email_notifications',
|
||||
'server_disk_usage_email_notifications',
|
||||
'server_patch_email_notifications',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -61,6 +62,7 @@ class EmailNotificationSettings extends Model
|
||||
'scheduled_task_success_email_notifications' => 'boolean',
|
||||
'scheduled_task_failure_email_notifications' => 'boolean',
|
||||
'server_disk_usage_email_notifications' => 'boolean',
|
||||
'server_patch_email_notifications' => 'boolean',
|
||||
];
|
||||
|
||||
public function team()
|
||||
|
||||
@@ -29,6 +29,7 @@ class PushoverNotificationSettings extends Model
|
||||
'server_disk_usage_pushover_notifications',
|
||||
'server_reachable_pushover_notifications',
|
||||
'server_unreachable_pushover_notifications',
|
||||
'server_patch_pushover_notifications',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -47,6 +48,7 @@ class PushoverNotificationSettings extends Model
|
||||
'server_disk_usage_pushover_notifications' => 'boolean',
|
||||
'server_reachable_pushover_notifications' => 'boolean',
|
||||
'server_unreachable_pushover_notifications' => 'boolean',
|
||||
'server_patch_pushover_notifications' => 'boolean',
|
||||
];
|
||||
|
||||
public function team()
|
||||
|
||||
@@ -28,6 +28,7 @@ class SlackNotificationSettings extends Model
|
||||
'server_disk_usage_slack_notifications',
|
||||
'server_reachable_slack_notifications',
|
||||
'server_unreachable_slack_notifications',
|
||||
'server_patch_slack_notifications',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -45,6 +46,7 @@ class SlackNotificationSettings extends Model
|
||||
'server_disk_usage_slack_notifications' => 'boolean',
|
||||
'server_reachable_slack_notifications' => 'boolean',
|
||||
'server_unreachable_slack_notifications' => 'boolean',
|
||||
'server_patch_slack_notifications' => 'boolean',
|
||||
];
|
||||
|
||||
public function team()
|
||||
|
||||
@@ -29,6 +29,7 @@ class TelegramNotificationSettings extends Model
|
||||
'server_disk_usage_telegram_notifications',
|
||||
'server_reachable_telegram_notifications',
|
||||
'server_unreachable_telegram_notifications',
|
||||
'server_patch_telegram_notifications',
|
||||
|
||||
'telegram_notifications_deployment_success_thread_id',
|
||||
'telegram_notifications_deployment_failure_thread_id',
|
||||
@@ -41,6 +42,7 @@ class TelegramNotificationSettings extends Model
|
||||
'telegram_notifications_server_disk_usage_thread_id',
|
||||
'telegram_notifications_server_reachable_thread_id',
|
||||
'telegram_notifications_server_unreachable_thread_id',
|
||||
'telegram_notifications_server_patch_thread_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -59,6 +61,7 @@ class TelegramNotificationSettings extends Model
|
||||
'server_disk_usage_telegram_notifications' => 'boolean',
|
||||
'server_reachable_telegram_notifications' => 'boolean',
|
||||
'server_unreachable_telegram_notifications' => 'boolean',
|
||||
'server_patch_telegram_notifications' => 'boolean',
|
||||
|
||||
'telegram_notifications_deployment_success_thread_id' => 'encrypted',
|
||||
'telegram_notifications_deployment_failure_thread_id' => 'encrypted',
|
||||
@@ -71,6 +74,7 @@ class TelegramNotificationSettings extends Model
|
||||
'telegram_notifications_server_disk_usage_thread_id' => 'encrypted',
|
||||
'telegram_notifications_server_reachable_thread_id' => 'encrypted',
|
||||
'telegram_notifications_server_unreachable_thread_id' => 'encrypted',
|
||||
'telegram_notifications_server_patch_thread_id' => 'encrypted',
|
||||
];
|
||||
|
||||
public function team()
|
||||
|
||||
Reference in New Issue
Block a user