Unify gateway styling and preserve identity through recovery
ci / java (push) Failing after 15m11s
ci / nightly-windev (push) Failing after 10m18s
ci / portable (push) Failing after 27m42s
ci / windows-x86 (push) Failing after 22m19s

This commit is contained in:
Joseph Doherty
2026-11-13 20:12:00 -05:00
parent b06921ce85
commit 26a90883fa
76 changed files with 20585 additions and 128 deletions
+13 -2
View File
@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.Extensions.FileProviders;
using MxUiCanary.Components;
@@ -6,12 +7,20 @@ var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseUrls("http://127.0.0.1:0");
builder.WebHost.UseStaticWebAssets();
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
builder.Services.AddDataProtection().UseEphemeralDataProtectionProvider();
builder.Services.AddAuthorizationCore(options => {
ZB.MOM.WW.Secrets.Ui.SecretsAuthorization.AddSecretsAuthorization(options);
options.AddPolicy(DashboardAuthenticationDefaults.AlarmsPolicy, policy => policy.AddRequirements(AuthenticatedDashboardRoleRequirement.AnyDashboardRole));
});
builder.Services.AddSingleton<Microsoft.AspNetCore.Authorization.IAuthorizationHandler, AuthenticatedDashboardRoleHandler>();
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddSingleton<IDashboardSnapshotService, StubSnapshotService>();
builder.Services.AddSingleton<IDashboardSnapshotFeed, IdleSnapshotFeed>();
builder.Services.AddSingleton<IDashboardApiKeyManagementService, ManagingApiKeyService>();
builder.Services.AddSingleton<AuthenticationStateProvider, StubAuthenticationStateProvider>();
builder.Services.AddScoped<AuthenticationStateProvider, StubAuthenticationStateProvider>();
builder.Services.AddSingleton<ZB.MOM.WW.GalaxyRepository.IGalaxyHierarchyCache, FixtureGalaxyCache>();
builder.Services.AddSingleton<IDashboardBrowseService, DashboardBrowseService>();
builder.Services.AddSingleton<FaultableBrowseService>();
builder.Services.AddSingleton<IDashboardBrowseService>(s=>s.GetRequiredService<FaultableBrowseService>());
builder.Services.AddSingleton<IDashboardLiveDataService, FixtureLiveData>();
builder.Services.AddSingleton<ZB.MOM.WW.GalaxyRepository.IGalaxyDeployNotifier, ZB.MOM.WW.GalaxyRepository.GalaxyDeployNotifier>();
builder.Services.AddSingleton<DashboardBrowseSearchIndex>();
@@ -25,4 +34,6 @@ app.MapPost("/fixtures/snapshot/{scene}",(string scene, IDashboardSnapshotServic
((StubSnapshotService)source).Scene = scene; return Results.Ok(new { scene, syntheticOnly=true });
});
app.MapGet("/provenance",()=>new { theme=typeof(ZB.MOM.WW.Theme.ThemeShell).Assembly.GetName().Version?.ToString(), syntheticOnly=true });
app.MapPost("/fixtures/fail-next-browse",(FaultableBrowseService source)=>{source.FailNext=true;return Results.Ok();});
app.MapGet("/fixtures/browse-counts",(FaultableBrowseService source)=>new{attempts=source.Attempts});
app.Run();