ceb63bfefb
Remove the read-only pipeline viewer from the web UI: - Delete PipelineViewer.razor page and supporting components - Delete PipelineController and PipelineMapper from API - Delete Pipeline DTOs from Core - Delete PipelineApiClient from Client - Remove navigation link and DI registrations - Delete obsolete plan documents The ConfigManager utility retains pipeline editing capabilities.
64 lines
2.4 KiB
C#
64 lines
2.4 KiB
C#
using JdeScoping.Client;
|
|
using JdeScoping.Client.Auth;
|
|
using JdeScoping.Client.Http;
|
|
using JdeScoping.Client.Services;
|
|
using JdeScoping.Core.ApiContracts;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using Radzen;
|
|
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
builder.RootComponents.Add<App>("#app");
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
|
|
|
// Configure HttpClient with AuthRedirectHandler for global 401 handling
|
|
// In Blazor WebAssembly, the browser automatically handles cookies for same-origin requests
|
|
builder.Services.AddScoped<AuthRedirectHandler>();
|
|
builder.Services.AddScoped(sp =>
|
|
{
|
|
var navigationManager = sp.GetRequiredService<NavigationManager>();
|
|
var handler = new AuthRedirectHandler(navigationManager)
|
|
{
|
|
InnerHandler = new HttpClientHandler()
|
|
};
|
|
return new HttpClient(handler)
|
|
{
|
|
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
|
|
};
|
|
});
|
|
|
|
// Radzen services
|
|
builder.Services.AddRadzenComponents();
|
|
|
|
// Authentication services (cookie-based)
|
|
builder.Services.AddAuthorizationCore();
|
|
builder.Services.AddScoped<IUserStorageService, UserStorageService>();
|
|
builder.Services.AddScoped<AuthStateProvider>();
|
|
builder.Services.AddScoped<AuthenticationStateProvider>(sp => sp.GetRequiredService<AuthStateProvider>());
|
|
builder.Services.AddScoped<IAuthStateProvider>(sp => sp.GetRequiredService<AuthStateProvider>());
|
|
|
|
// Crypto service for login encryption
|
|
builder.Services.AddScoped<ICryptoService, CryptoService>();
|
|
|
|
builder.Services.AddScoped<IAuthService, AuthService>();
|
|
|
|
// SignalR service
|
|
builder.Services.AddScoped<IHubConnectionService, HubConnectionService>();
|
|
|
|
// Refresh status service (monitors data sync status)
|
|
builder.Services.AddScoped<IRefreshStatusService, RefreshStatusService>();
|
|
|
|
// Typed API clients (shared contracts)
|
|
builder.Services.AddScoped<ISearchApiClient, SearchApiClient>();
|
|
builder.Services.AddScoped<ILookupApiClient, LookupApiClient>();
|
|
builder.Services.AddScoped<IAuthApiClient, AuthApiClient>();
|
|
builder.Services.AddScoped<IFileApiClient, FileApiClient>();
|
|
|
|
// Search services
|
|
builder.Services.AddScoped<ISearchValidationService, SearchValidationService>();
|
|
builder.Services.AddScoped<ISearchSubmissionService, SearchSubmissionService>();
|
|
|
|
await builder.Build().RunAsync();
|