Skip to content

Commit a88ba06

Browse files
committed
TD-5924 Tidy up
1 parent db4a186 commit a88ba06

File tree

5 files changed

+6
-26
lines changed

5 files changed

+6
-26
lines changed

LearningHub.Nhs.WebUI.BlazorClient/Program.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
using Blazored.LocalStorage; // Still required server side even if not used so components dont fail to build
1+
using Blazored.LocalStorage;
22
using LearningHub.Nhs.WebUI.BlazorClient.DI;
3-
43
using LearningHub.Nhs.Shared.Configuration;
54
using LearningHub.Nhs.Shared.Interfaces.Http;
65
using LearningHub.Nhs.WebUI.BlazorClient.Services;
@@ -26,7 +25,6 @@
2625
using TELBlazor.Components.Core.Services.HelperServices;
2726
using TELBlazor.Components.OptionalImplementations.Core.Services.HelperServices;
2827

29-
3028
var builder = WebAssemblyHostBuilder.CreateDefault(args);
3129

3230
var http = new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) };
@@ -54,7 +52,7 @@
5452
.CreateLogger();
5553

5654
// Add Serilog to logging providers
57-
builder.Logging.AddSerilog(Log.Logger, dispose: true);//qqqq may not need dispose for client
55+
builder.Logging.AddSerilog(Log.Logger);
5856

5957
//for really bad fails
6058
try
@@ -85,7 +83,7 @@
8583
builder.Services.AddScoped<LoggingLevelSwitch>(sp => levelSwitch);
8684
builder.Services.AddScoped<ILogLevelSwitcherService, SerilogLogLevelSwitcherService>();
8785

88-
// TODO builder.Services.AddScoped<ICacheService, WasmCacheServiceStub>();
86+
// TODO (QQQQ) implement post TD-5925 builder.Services.AddScoped<ICacheService, WasmCacheServiceStub>();
8987

9088
await builder.Build().RunAsync();
9189
}

LearningHub.Nhs.WebUI.BlazorClient/Services/WasmCacheServiceStub.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// TODO: using LearningHub.Nhs.Caching;
1+
// TODO (QQQQ) implement post TD-5925: using LearningHub.Nhs.Models;
22

33
namespace LearningHub.Nhs.WebUI.BlazorClient.Services
44
{
55
/// <summary>
66
/// We may use storage, we may just stub it and throw an error, we cant directly use redis we may access it via an api
77
/// The cachestub currently just returns there is nothing available so the caller then will revert to calling the api.
88
/// </summary>
9-
public class WasmCacheServiceStub // TODO: ICacheService
9+
public class WasmCacheServiceStub // TODO (QQQQ) implement post TD-5925 and get from NHS.Models: ICacheService
1010
{
1111
public Task<T> GetAsync<T>(string key)
1212
{

LearningHub.Nhs.WebUI/Controllers/Api/BFFController.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public async Task<IActionResult> ProxyRequest(string apiName, string path)
7878
string sanitizedPath = path?.Trim('/').ToLowerInvariant() ?? string.Empty;
7979
string sanitizedApiName = apiName?.Trim('/').ToLowerInvariant() ?? string.Empty;
8080

81-
// qqqq https://lh-web.dev.local/bff/lh-api.dev.local/Catalogue/GetLatestCatalogueAccessRequest/500
8281
IAPIHttpClient apiClient;
8382
try
8483
{
@@ -103,7 +102,6 @@ public async Task<IActionResult> ProxyRequest(string apiName, string path)
103102

104103
if (!this.IsPathAllowed(sanitizedPath))
105104
{
106-
// qqqq "catalogue/getlatestcatalogueaccessrequest/500"
107105
return this.Forbid("This path is not allowed via BFF proxy.");
108106
}
109107

LearningHub.Nhs.WebUI/Startup/ServiceMappings.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon
8888

8989
// Config
9090
services.Configure<OpenAthensScopes>(configuration.GetSection("OpenAthensScopes"));
91-
services.Configure<BFFPathValidationOptions>(configuration.GetSection("Settings:" + BFFPathValidationOptions.SectionName)); // qqqq
91+
services.Configure<BFFPathValidationOptions>(configuration.GetSection("Settings:" + BFFPathValidationOptions.SectionName));
9292

9393
// Blazor
9494
services.AddRazorComponents()
@@ -143,8 +143,6 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon
143143
services.AddScoped<OfflineCheckFilter>();
144144

145145
// <!-- blazor architecture keep at bottom so can use existing services and map them-->
146-
147-
// <!--qqqq blazor services maybe collection so all together and update show whats missing-->
148146
// Future candidates for DI collection
149147
services.AddBlazoredLocalStorage();
150148

LearningHub.Nhs.WebUI/Views/Home/LandingPage.cshtml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,6 @@
3737
Sign up, explore and learn
3838
</div>
3939
</div>
40-
<!--qqqq-->
41-
<component type="typeof(TELBlazor.Components.Components.BaseComponents.TELButton)"
42-
render-mode="WebAssemblyPrerendered"
43-
param-IsSubmitButtonForEditForm="false"
44-
param-NoJSActionUrl="@("nojsfallback/mvcendpoint/telbuttonshowcase")"
45-
param-FormData="@(new Dictionary<string, string>{{"increment","1"}})"
46-
param-ButtonStyle="TELBlazor.Components.Core.Enums.TELButtonStyle.Warning"
47-
param-PreventDoubleClick="false"
48-
param-ButtonText="@("Click me!")"
49-
param-AdditionalCssClasses="@("")"
50-
param-AriaLabel="@("Click Counter")"
51-
param-AssistiveText="@("Click to increase the number")"
52-
param-TabIndex="0"
53-
param-ToolTipTitle="@("Click to increment")" />
5440
<div class="landing-page__access-container">
5541
<div class="nhsuk-width-container app-width-container">
5642
<div class="nhsuk-grid-row">

0 commit comments

Comments
 (0)