|
|
@ -1,5 +1,7 @@ |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using HealthChecks.UI.Configuration; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
namespace WebStatus.Controllers |
|
|
@ -19,6 +21,20 @@ namespace WebStatus.Controllers |
|
|
|
return Redirect($"{basePath}/hc-ui"); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpGet("/Config")] |
|
|
|
public IActionResult Config() |
|
|
|
{ |
|
|
|
var configurationValues = _configuration.GetSection("HealthChecksUI:HealthChecks") |
|
|
|
.GetChildren() |
|
|
|
.SelectMany(cs => cs.GetChildren()) |
|
|
|
.Union(_configuration.GetSection("HealthChecks-UI:HealthChecks") |
|
|
|
.GetChildren() |
|
|
|
.SelectMany(cs => cs.GetChildren())) |
|
|
|
.ToDictionary(v => v.Path, v => v.Value); |
|
|
|
|
|
|
|
return View(configurationValues); |
|
|
|
} |
|
|
|
|
|
|
|
public IActionResult Error() |
|
|
|
{ |
|
|
|
return View(); |
|
|
|