Files
jdescopingtool/NEW/src/JdeScoping.Client/Program.cs
T
Joseph Doherty ceb63bfefb refactor(webui): remove pipeline viewer feature
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.
2026-01-21 10:14:43 -05:00

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();