Include available version in update health check

(cherry picked from commit 15e3c3efb18242caf28b9bfc77a72a78296018bf)
pull/2197/head
Bogdan 9 months ago
parent eec3b01f5b
commit c22b27525a

@ -86,9 +86,20 @@ namespace NzbDrone.Core.HealthCheck.Checks
}
}
if (BuildInfo.BuildDateTime < DateTime.UtcNow.AddDays(-14) && _checkUpdateService.AvailableUpdate() != null)
if (BuildInfo.BuildDateTime < DateTime.UtcNow.AddDays(-14))
{
return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("UpdateAvailableHealthCheckMessage"));
var latestAvailable = _checkUpdateService.AvailableUpdate();
if (latestAvailable != null)
{
return new HealthCheck(GetType(),
HealthCheckResult.Warning,
_localizationService.GetLocalizedString("UpdateAvailableHealthCheckMessage", new Dictionary<string, object>
{
{ "version", $"v{latestAvailable.Version}" }
}),
"#new-update-is-available");
}
}
return new HealthCheck(GetType());

@ -740,7 +740,7 @@
"UnsavedChanges": "Unsaved Changes",
"UnselectAll": "Unselect All",
"UpdateAutomaticallyHelpText": "Automatically download and install updates. You will still be able to install from System: Updates",
"UpdateAvailableHealthCheckMessage": "New update is available",
"UpdateAvailableHealthCheckMessage": "New update is available: {version}",
"UpdateMechanismHelpText": "Use {appName}'s built-in updater or a script",
"UpdateScriptPathHelpText": "Path to a custom script that takes an extracted update package and handle the remainder of the update process",
"UpdateStartupNotWritableHealthCheckMessage": "Cannot install update because startup folder '{startupFolder}' is not writable by the user '{userName}'.",

Loading…
Cancel
Save