Table of Contents

Class QuartzDashboardEndpointRouteBuilderExtensions

Namespace
Quartz
Assembly
Quartz.Dashboard.dll

Maps the Quartz.NET Dashboard's pages, hub and assets into an application's routes.

public static class QuartzDashboardEndpointRouteBuilderExtensions
Inheritance
QuartzDashboardEndpointRouteBuilderExtensions
Inherited Members

Methods

MapQuartzDashboard(IEndpointRouteBuilder)

Maps the Quartz.NET Dashboard endpoints with its own Blazor component root, under the path DashboardPath configured — which defaults to /quartz. Use this overload when the host application does not have its own Blazor Server setup.

public static IEndpointConventionBuilder MapQuartzDashboard(this IEndpointRouteBuilder builder)

Parameters

builder IEndpointRouteBuilder

Returns

IEndpointConventionBuilder

Remarks

What comes back covers the dashboard's pages and its live-events hub together, so RequireAuthorization() or AllowAnonymous() on it is a statement about the dashboard rather than about half of it. Saying neither, and configuring neither AuthorizationPolicy nor a fallback policy, fails startup.

MapQuartzDashboard(IEndpointRouteBuilder, RazorComponentsEndpointConventionBuilder)

Maps the Quartz.NET Dashboard endpoints into an existing Blazor Server application. Use this overload when the host application already calls MapRazorComponents<App>().AddInteractiveServerRenderMode() to avoid registering a second /_blazor SignalR endpoint.

public static IEndpointConventionBuilder MapQuartzDashboard(this IEndpointRouteBuilder builder, RazorComponentsEndpointConventionBuilder existingComponents)

Parameters

builder IEndpointRouteBuilder
existingComponents RazorComponentsEndpointConventionBuilder

Returns

IEndpointConventionBuilder

Examples

var blazor = endpoints.MapRazorComponents<App>()
    .AddInteractiveServerRenderMode();

endpoints.MapQuartzDashboard(blazor);

And in the host's Routes.razor:

<Router AppAssembly="typeof(App).Assembly"
        AdditionalAssemblies="new[] { typeof(Quartz.Dashboard.Components.QuartzDashboardApp).Assembly }">

Remarks

The host application's interactive router must also be able to resolve the dashboard pages: add typeof(QuartzDashboardApp).Assembly to the AdditionalAssemblies of the <Router> in the host's Routes.razor. Otherwise the dashboard renders on the initial request but the interactive router replaces it with the application's not-found page once the circuit starts.

MapQuartzDashboard(IEndpointRouteBuilder, string)

Maps the Quartz.NET Dashboard endpoints with its own Blazor component root, under the given route pattern.

public static IEndpointConventionBuilder MapQuartzDashboard(this IEndpointRouteBuilder builder, string pattern)

Parameters

builder IEndpointRouteBuilder

The endpoint route builder.

pattern string

The path the dashboard is served under, for example /admin/quartz.

Returns

IEndpointConventionBuilder

Remarks

Naming the path where the endpoints are mapped is how the rest of ASP.NET Core reads — MapHealthChecks("/health") — and it puts the route beside an application's other routes rather than in a registration callback somewhere else.

The pattern given here wins over DashboardPath, whichever way that was set, and is held to the same rule: a plain URL path starting with /, with no {, }, ?, #, . or .. segments and no empty ones.

There is no counterpart on the overload that takes an existing components builder, because the dashboard page routes are fixed at /quartz when integrating with an application's own Blazor root — the same reason a custom DashboardPath is rejected there.