2016-06-13 17:42:05 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.HealthCheck
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The status returned for a health check when it performs it check
|
|
|
|
|
|
/// TODO: This model will be used in the WebApi result so needs attributes for JSON usage
|
|
|
|
|
|
/// </summary>
|
2020-05-27 13:48:26 +10:00
|
|
|
|
[DataContract(Name = "healthCheckStatus", Namespace = "")]
|
2016-06-13 17:42:05 +02:00
|
|
|
|
public class HealthCheckStatus
|
|
|
|
|
|
{
|
|
|
|
|
|
public HealthCheckStatus(string message)
|
|
|
|
|
|
{
|
|
|
|
|
|
Message = message;
|
|
|
|
|
|
Actions = Enumerable.Empty<HealthCheckAction>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The status message
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "message")]
|
|
|
|
|
|
public string Message { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The status description if one is necessary
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "description")]
|
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-26 10:52:19 -05:00
|
|
|
|
/// This is optional but would allow a developer to specify a path to an angular HTML view
|
2016-06-13 17:42:05 +02:00
|
|
|
|
/// in order to either show more advanced information and/or to provide input for the admin
|
|
|
|
|
|
/// to configure how an action is executed
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "view")]
|
|
|
|
|
|
public string View { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The status type
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "resultType")]
|
|
|
|
|
|
public StatusResultType ResultType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The potential actions to take (in any)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "actions")]
|
|
|
|
|
|
public IEnumerable<HealthCheckAction> Actions { get; set; }
|
|
|
|
|
|
|
2019-01-27 01:17:32 -05:00
|
|
|
|
// TODO: What else?
|
2016-06-13 17:42:05 +02:00
|
|
|
|
}
|
2017-07-20 11:21:28 +02:00
|
|
|
|
}
|