merges v8 healthcheck changes from #5557 into netcore branch.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System;
|
||||
@@ -85,10 +85,13 @@ namespace Umbraco.Cms.Core.HealthChecks.Checks
|
||||
}
|
||||
|
||||
string resultMessage = string.Format(CheckErrorMessage, ItemPath, Values, CurrentValue);
|
||||
return Task.FromResult(new HealthCheckStatus(resultMessage)
|
||||
var healthCheckStatus = new HealthCheckStatus(resultMessage)
|
||||
{
|
||||
ResultType = StatusResultType.Error, ReadMoreLink = ReadMoreLink
|
||||
}.Yield());
|
||||
ResultType = StatusResultType.Error,
|
||||
ReadMoreLink = ReadMoreLink
|
||||
};
|
||||
|
||||
return Task.FromResult(healthCheckStatus.Yield());
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.Collections.Generic;
|
||||
@@ -9,6 +9,7 @@ using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Core.HealthChecks.Checks.Configuration
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Health check for the recommended production configuration for Notification Email.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
namespace Umbraco.Cms.Core.HealthChecks.Checks
|
||||
{
|
||||
public enum ProvidedValueValidation
|
||||
{
|
||||
None = 1,
|
||||
Email = 2,
|
||||
Regex = 3
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
@@ -44,6 +44,10 @@ namespace Umbraco.Cms.Core.HealthChecks
|
||||
/// Get the status for this health check
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// If there are possible actions to take to rectify this check, this method must be overridden by a sub class
|
||||
/// in order to explicitly provide those actions.
|
||||
/// </remarks>
|
||||
public abstract Task<IEnumerable<HealthCheckStatus>> GetStatus();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@@ -68,6 +68,18 @@ namespace Umbraco.Cms.Core.HealthChecks
|
||||
[DataMember(Name = "valueRequired")]
|
||||
public bool ValueRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if a value required, how it is validated
|
||||
/// </summary>
|
||||
[DataMember(Name = "providedValueValidation")]
|
||||
public string ProvidedValueValidation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if a value required, and is validated by a regex, what the regex to use is
|
||||
/// </summary>
|
||||
[DataMember(Name = "providedValueValidationRegex")]
|
||||
public string ProvidedValueValidationRegex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a value to rectify the issue
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user