Unify gateway styling and preserve identity through recovery
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user