From 505c560ed6dfb07580b706cf2fade3ec977209a2 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 14 Aug 2019 10:17:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20healths-ui=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HealthChecksAppBuilderExtensions.cs | 6 +++ Bootstrap.Admin/wwwroot/html/Healths-UI.html | 49 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 Bootstrap.Admin/wwwroot/html/Healths-UI.html diff --git a/Bootstrap.Admin/HealthChecks/HealthChecksAppBuilderExtensions.cs b/Bootstrap.Admin/HealthChecks/HealthChecksAppBuilderExtensions.cs index f76ae8d2..3718ebc1 100644 --- a/Bootstrap.Admin/HealthChecks/HealthChecksAppBuilderExtensions.cs +++ b/Bootstrap.Admin/HealthChecks/HealthChecksAppBuilderExtensions.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Diagnostics.HealthChecks; using Newtonsoft.Json; +using System.Threading.Tasks; namespace Microsoft.AspNetCore.Builder { @@ -33,6 +34,11 @@ namespace Microsoft.AspNetCore.Builder [HealthStatus.Unhealthy] = StatusCodes.Status200OK } }); + app.UseWhen(context => context.Request.Path == "/healths-ui", builder => builder.Run(request => + { + request.Response.Redirect("/html/Healths-UI.html"); + return Task.CompletedTask; + })); return app; } } diff --git a/Bootstrap.Admin/wwwroot/html/Healths-UI.html b/Bootstrap.Admin/wwwroot/html/Healths-UI.html new file mode 100644 index 00000000..d9ae290f --- /dev/null +++ b/Bootstrap.Admin/wwwroot/html/Healths-UI.html @@ -0,0 +1,49 @@ + + + + + + + + + + 健康检查 + + + + + + + + + + + +
+
+
+ 健康检查结果 +
+
+
耗时:--
+
+
+
+
+ + + + + + + + + + \ No newline at end of file