Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 771 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'color') #2191

Closed GeeSuth closed 3 months ago

GeeSuth commented 3 months ago

What happened:

When go to UI page of HealthChecksUI https://localhost:7085/healthcheck-ui#/healthchecks the screen seems white and null, the title is appeared but no content. I notice the page like appear and gone quickly. when going to console of browser I notice there an error as title of this issue

What you expected to happen: Opens the dashboard of health checks UI.

Source code sample:

 public static void AddHealthCheck(this IServiceCollection serviceCollection)
        {
            serviceCollection.AddHealthChecks()
               .AddDbContextCheck<RepositoryContext>(name: "Application DB Context", failureStatus: HealthStatus.Degraded);

            serviceCollection.AddHealthChecksUI(setupSettings: setup =>
            {
                setup.AddHealthCheckEndpoint("Basic Health Check", $"/healthz");
            }).AddInMemoryStorage();

        }
        public static void UseHealthCheck(this IApplicationBuilder app)
        {
            app.UseHealthChecks("/healthz", new HealthCheckOptions
            {
                Predicate = _ => true,
                ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse,
                ResultStatusCodes =
                {
                    [HealthStatus.Healthy] = StatusCodes.Status200OK,
                    [HealthStatus.Degraded] = StatusCodes.Status500InternalServerError,
                    [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable,
                },
            }).UseHealthChecksUI(setup =>
            {
                setup.ApiPath = "/healthcheck";
                setup.UIPath = "/healthcheck-ui";
            });
        }

Anything else we need to know?:

Environment: Development

GeeSuth commented 3 months ago

sorry, I find that after searching in release, the team fix this in 7.0.1 release,

1973