Resolved issues such that application boots and back-office is navigable.

This commit is contained in:
Andy Butland
2020-08-24 09:29:40 +02:00
parent 2cd91a5a54
commit 7884e4ca17
28 changed files with 203 additions and 105 deletions

View File

@@ -24,7 +24,7 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
ILocalizedTextService textService,
IRequestAccessor requestAccessor,
IOptions<GlobalSettings> globalSettings,
IHealthChecksSettings healthChecksSettings,
IOptions<HealthChecksSettings> healthChecksSettings,
IOptions<ContentSettings> contentSettings)
: base(healthChecksSettings)
{

View File

@@ -2,13 +2,15 @@
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Umbraco.Core.Configuration.HealthChecks;
using Umbraco.Core.Configuration.Models;
namespace Umbraco.Web.HealthCheck.NotificationMethods
{
public abstract class NotificationMethodBase : IHealthCheckNotificationMethod
{
protected NotificationMethodBase(IHealthChecksSettings healthCheckSettingsConfig)
protected NotificationMethodBase(IOptions<HealthChecksSettings> healthCheckSettings)
{
var type = GetType();
var attribute = type.GetCustomAttribute<HealthCheckNotificationMethodAttribute>();
@@ -18,7 +20,7 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
return;
}
var notificationMethods = healthCheckSettingsConfig.NotificationSettings.NotificationMethods;
var notificationMethods = healthCheckSettings.Value.NotificationSettings.NotificationMethods;
if(!notificationMethods.TryGetValue(attribute.Alias, out var notificationMethod))
{
Enabled = false;