From 8563ed0a203c5974e94e2d8868880ab7e12d430e 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) --- .../Notifications/Notification.js | 14 ++++++++++- .../Notifications/NotificationEventItems.js | 15 +++++++++++- .../NotificationBaseFixture.cs | 7 ++++++ .../220_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 | 2 ++ .../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 | 3 ++- src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs | 5 ++++ .../Notifications/NotificationResource.cs | 6 +++++ 37 files changed, 286 insertions(+), 4 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/220_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 b4aebae09..9fb6a1ef0 100644 --- a/frontend/src/Settings/Notifications/Notifications/Notification.js +++ b/frontend/src/Settings/Notifications/Notifications/Notification.js @@ -64,6 +64,7 @@ class Notification extends Component { onMovieFileDelete, onMovieFileDeleteForUpgrade, onHealthIssue, + onHealthRestored, onApplicationUpdate, supportsOnGrab, supportsOnDownload, @@ -74,6 +75,7 @@ class Notification extends Component { supportsOnMovieFileDelete, supportsOnMovieFileDeleteForUpgrade, supportsOnHealthIssue, + supportsOnHealthRestored, supportsOnApplicationUpdate } = this.props; @@ -135,6 +137,14 @@ class Notification extends Component { null } + { + supportsOnHealthRestored && onHealthRestored ? + : + null + } + { supportsOnApplicationUpdate && onApplicationUpdate ?