Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit fb51ba4

Browse files
authored
feat(webstatus): simplify webstatus project (#298)
Remove unnecessary codes and dependency - JQuery - Controller and Views - Default CSS and JS files of MVC project
1 parent c4ace8a commit fb51ba4

File tree

16 files changed

+4
-271
lines changed

16 files changed

+4
-271
lines changed

src/Web/WebStatus/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Web/WebStatus/Controllers/HomeController.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/Web/WebStatus/Models/ErrorViewModel.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/Web/WebStatus/Startup.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ public void ConfigureServices(IServiceCollection services)
2626
services
2727
.AddHealthChecksUI()
2828
.AddSqlServerStorage(Configuration["ConnectionStrings"]);
29-
30-
services.AddControllersWithViews();
3129
}
3230

3331
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -37,26 +35,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
3735
{
3836
app.UseDeveloperExceptionPage();
3937
}
40-
else
41-
{
42-
app.UseExceptionHandler("/Home/Error");
43-
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
44-
app.UseHsts();
45-
}
46-
app.UseHttpsRedirection();
47-
app.UseStaticFiles();
4838

4939
app.UseRouting();
5040

51-
app.UseAuthorization();
52-
5341
app.UseEndpoints(endpoints =>
5442
{
55-
endpoints.MapControllerRoute(
56-
name: "default",
57-
pattern: "{controller=Home}/{action=Index}/{id?}");
58-
59-
endpoints.MapHealthChecksUI();
43+
endpoints.MapHealthChecksUI(setup =>
44+
setup.UIPath = "/");
6045
});
6146
}
6247
}

src/Web/WebStatus/Views/Home/Index.cshtml

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Web/WebStatus/Views/Home/Privacy.cshtml

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Web/WebStatus/Views/Shared/Error.cshtml

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/Web/WebStatus/Views/Shared/_Layout.cshtml

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/Web/WebStatus/Views/Shared/_ValidationScriptsPartial.cshtml

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/Web/WebStatus/Views/_ViewImports.cshtml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)