Skip to content

Fix Dashboard /_blazor endpoint conflict with host Blazor apps#2975

Merged
lahma merged 1 commit into3.xfrom
two-blazors
Apr 3, 2026
Merged

Fix Dashboard /_blazor endpoint conflict with host Blazor apps#2975
lahma merged 1 commit into3.xfrom
two-blazors

Conversation

@lahma
Copy link
Copy Markdown
Member

@lahma lahma commented Apr 3, 2026

Summary

Fixes #2974

  • Add MapQuartzDashboard(existingComponents) overload that integrates into the host's existing Blazor setup via AddAdditionalAssemblies, avoiding a duplicate /_blazor SignalR endpoint
  • Extract inline JS from QuartzDashboardApp.razor into a Blazor JS initializer (Quartz.Dashboard.lib.module.js) that auto-loads in both standalone and integrated modes
  • Inject dashboard CSS via <HeadContent> in DashboardLayout so it works when rendered inside a host app's root component
  • Add @layout DashboardLayout scoped to Pages/ so dashboard pages render correctly when discovered by the host's Router
  • Remove HealthChecks UI packages and configuration from example app

Usage for apps with existing Blazor Server setup

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

endpoints.MapQuartzDashboard(blazor);

Standalone usage (unchanged)

endpoints.MapQuartzDashboard();

Test plan

  • Build passes with zero warnings/errors
  • Quartz.Examples.AspNetCore — dashboard at /quartz renders and navigates correctly (standalone mode)
  • Host app with its own MapRazorComponents<App>().AddInteractiveServerRenderMode() — dashboard works via MapQuartzDashboard(blazor) without /_blazor conflict

🤖 Generated with Claude Code

Add MapQuartzDashboard(existingComponents) overload that integrates into
the host's existing Blazor setup via AddAdditionalAssemblies, avoiding a
duplicate /_blazor SignalR endpoint.

Also extract inline JS to a Blazor JS initializer, inject dashboard CSS
via HeadContent, and remove HealthChecks UI from the example app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 3, 2026

@lahma lahma merged commit a2ac0cb into 3.x Apr 3, 2026
15 checks passed
@lahma lahma deleted the two-blazors branch April 3, 2026 05:50
This was referenced Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant