From 5b701aafc13a712c2900c787b2cea01432b5c037 Mon Sep 17 00:00:00 2001 From: The Dark <12370876+CheAle14@users.noreply.github.com> Date: Mon, 8 May 2023 02:57:14 +0100 Subject: [PATCH] New: On Health Restored notification (cherry picked from commit 5fdc8514da7c7ad98192f2ecb2415b3a7b5d0d05) Closes #3631 Closes #3637 --- .../Notifications/Notification.js | 16 +++++++++++-- .../Notifications/NotificationEventItems.js | 15 +++++++++++- .../Notifications/NotificationResource.cs | 6 +++++ .../NotificationBaseFixture.cs | 7 ++++++ .../065_health_restored_notification.cs | 14 +++++++++++ src/NzbDrone.Core/Datastore/TableMapping.cs | 1 + .../HealthCheck/HealthCheckRestoredEvent.cs | 16 +++++++++++++ .../HealthCheck/HealthCheckService.cs | 7 ++++++ src/NzbDrone.Core/Localization/Core/en.json | 3 +++ .../Notifications/Apprise/Apprise.cs | 5 ++++ .../Notifications/Boxcar/Boxcar.cs | 5 ++++ .../CustomScript/CustomScript.cs | 15 ++++++++++++ .../Notifications/Discord/Discord.cs | 23 ++++++++++++++++++ .../Notifications/Email/Email.cs | 5 ++++ .../Notifications/Gotify/Gotify.cs | 5 ++++ .../Notifications/INotification.cs | 2 ++ src/NzbDrone.Core/Notifications/Join/Join.cs | 5 ++++ .../Notifications/Mailgun/Mailgun.cs | 5 ++++ .../MediaBrowser/MediaBrowser.cs | 8 +++++++ .../Notifications/Notifiarr/Notifiarr.cs | 5 ++++ .../Notifications/NotificationBase.cs | 7 ++++++ .../Notifications/NotificationDefinition.cs | 4 +++- .../Notifications/NotificationFactory.cs | 7 ++++++ .../Notifications/NotificationService.cs | 24 +++++++++++++++++++ src/NzbDrone.Core/Notifications/Ntfy/Ntfy.cs | 5 ++++ .../Notifications/Prowl/Prowl.cs | 5 ++++ .../Notifications/PushBullet/PushBullet.cs | 5 ++++ .../Notifications/Pushover/Pushover.cs | 5 ++++ .../Notifications/SendGrid/SendGrid.cs | 5 ++++ .../Notifications/Simplepush/Simplepush.cs | 5 ++++ .../Notifications/Slack/Slack.cs | 17 +++++++++++++ .../Notifications/Telegram/Telegram.cs | 5 ++++ .../Notifications/Twitter/Twitter.cs | 5 ++++ .../Notifications/Webhook/Webhook.cs | 5 ++++ .../Notifications/Webhook/WebhookBase.cs | 13 ++++++++++ .../Notifications/Webhook/WebhookEventType.cs | 1 + src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs | 5 ++++ 37 files changed, 287 insertions(+), 4 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/065_health_restored_notification.cs create mode 100644 src/NzbDrone.Core/HealthCheck/HealthCheckRestoredEvent.cs diff --git a/frontend/src/Settings/Notifications/Notifications/Notification.js b/frontend/src/Settings/Notifications/Notifications/Notification.js index d7cfa81d3..9e2e881c4 100644 --- a/frontend/src/Settings/Notifications/Notifications/Notification.js +++ b/frontend/src/Settings/Notifications/Notifications/Notification.js @@ -62,6 +62,7 @@ class Notification extends Component { onAlbumDelete, onArtistDelete, onHealthIssue, + onHealthRestored, onDownloadFailure, onImportFailure, onTrackRetag, @@ -73,6 +74,7 @@ class Notification extends Component { supportsOnAlbumDelete, supportsOnArtistDelete, supportsOnHealthIssue, + supportsOnHealthRestored, supportsOnDownloadFailure, supportsOnImportFailure, supportsOnTrackRetag, @@ -145,6 +147,14 @@ class Notification extends Component { } + { + supportsOnHealthRestored && onHealthRestored ? + : + null + } + { supportsOnDownloadFailure && onDownloadFailure &&