From 5696fa2efef89b829274969c389875aea4b7b4e7 Mon Sep 17 00:00:00 2001 From: Robin Dadswell <19610103+RobinDadswell@users.noreply.github.com> Date: Fri, 7 May 2021 00:22:23 +0100 Subject: [PATCH] Fixed: Wiki links on all health checks --- .../HealthCheck/Checks/AppDataLocationCheck.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs | 2 +- .../HealthCheck/Checks/ImportMechanismCheck.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/MonoTlsCheck.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/ProxyCheck.cs | 6 +++--- .../HealthCheck/Checks/RemotePathMappingCheck.cs | 4 ++-- src/NzbDrone.Core/HealthCheck/Checks/SystemTimeCheck.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs index a322ea085..20f6043e9 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.HealthCheck.Checks if (_appFolderInfo.StartUpFolder.IsParentPath(_appFolderInfo.AppDataFolder) || _appFolderInfo.StartUpFolder.PathEquals(_appFolderInfo.AppDataFolder)) { - return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("AppDataLocationHealthCheckMessage")); + return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("AppDataLocationHealthCheckMessage"), "#updating_will_not_be_possible_to_prevent_deleting_appdata_on_update"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs index c88958914..84f7985aa 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.HealthCheck.Checks if (!downloadClients.Any()) { - return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("DownloadClientCheckNoneAvailableMessage")); + return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("DownloadClientCheckNoneAvailableMessage"), "#no_download_client_is_available"); } foreach (var downloadClient in downloadClients) diff --git a/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs index 61f35e7cf..b9380ad54 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.HealthCheck.Checks { if (!_configService.EnableCompletedDownloadHandling) { - return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("ImportMechanismHealthCheckMessage")); + return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("ImportMechanismHealthCheckMessage"), "#completed_download_handling_is_disabled"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs index 5a6710d66..7476c994e 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.HealthCheck.Checks } catch (Exception e) { - return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("MediaInfoDllCheckMessage"), e.Message)); + return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("MediaInfoDllCheckMessage"), e.Message), "#mediainfo_not_loaded"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/MonoTlsCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/MonoTlsCheck.cs index 2284ab3a5..b6de39284 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/MonoTlsCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/MonoTlsCheck.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.HealthCheck.Checks .WriteSentryDebug("LegacyTlsProvider", monoVersion.ToString()) .Write(); - return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("MonoTlsCheckMessage")); + return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("MonoTlsCheckMessage"), "#mono_tls_legacy"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs index 084c7c1da..eb5b0a05c 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.HealthCheck.Checks if (ptpIndexerOldSettings.Any()) { - return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("PtpOldSettingsCheckMessage"), string.Join(", ", ptpIndexerOldSettings))); + return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("PtpOldSettingsCheckMessage"), string.Join(", ", ptpIndexerOldSettings)), "#ptp_settings_old"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/ProxyCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/ProxyCheck.cs index 7ac940c16..ef58c38fe 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/ProxyCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/ProxyCheck.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Core.HealthCheck.Checks var addresses = Dns.GetHostAddresses(_configService.ProxyHostname); if (!addresses.Any()) { - return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("ProxyCheckResolveIpMessage"), _configService.ProxyHostname)); + return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("ProxyCheckResolveIpMessage"), _configService.ProxyHostname), "#proxy_failed_resolve_ip"); } var request = _cloudRequestBuilder.Create() @@ -51,13 +51,13 @@ namespace NzbDrone.Core.HealthCheck.Checks if (response.StatusCode == HttpStatusCode.BadRequest) { _logger.Error("Proxy Health Check failed: {0}", response.StatusCode); - return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("ProxyCheckBadRequestMessage"), response.StatusCode)); + return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("ProxyCheckBadRequestMessage"), response.StatusCode), "#proxy_failed_test"); } } catch (Exception ex) { _logger.Error(ex, "Proxy Health Check failed"); - return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("ProxyCheckFailedToTestMessage"), request.Url)); + return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("ProxyCheckFailedToTestMessage"), request.Url), "#proxy_failed_test"); } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs index 146c1ec01..e7b1fba5f 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs @@ -136,7 +136,7 @@ namespace NzbDrone.Core.HealthCheck.Checks { // If the file doesn't exist but MovieInfo is not null then the message is coming from // ImportApprovedMovies and the file must have been removed part way through processing - return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckFileRemoved"), moviePath)); + return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("RemotePathMappingCheckFileRemoved"), moviePath), "#remote_path_file_removed"); } } @@ -152,7 +152,7 @@ namespace NzbDrone.Core.HealthCheck.Checks // that the user realises something is wrong. if (dlpath.IsNullOrWhiteSpace()) { - return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("RemotePathMappingCheckImportFailed")); + return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("RemotePathMappingCheckImportFailed"), "#remote_path_import_failed"); } if (!dlpath.IsPathValid()) diff --git a/src/NzbDrone.Core/HealthCheck/Checks/SystemTimeCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/SystemTimeCheck.cs index 36e913e69..f5c7aada3 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/SystemTimeCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/SystemTimeCheck.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.HealthCheck.Checks if (Math.Abs(result.DateTimeUtc.Subtract(systemTime).TotalDays) >= 1) { _logger.Error("System time mismatch. SystemTime: {0} Expected Time: {1}. Update system time", systemTime, result.DateTimeUtc); - return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("SystemTimeCheckMessage")); + return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("SystemTimeCheckMessage"), "#system_time_off"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs index 8eac0310b..98c77682e 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs @@ -70,7 +70,7 @@ namespace NzbDrone.Core.HealthCheck.Checks if (BuildInfo.BuildDateTime < DateTime.UtcNow.AddDays(-14) && _checkUpdateService.AvailableUpdate() != null) { - return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("UpdateAvailable")); + return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("UpdateAvailable"), "#new_update_is_available"); } return new HealthCheck(GetType());