Skip to content

Commit 01a1da1

Browse files
Added Routes
1 parent dc3cc7c commit 01a1da1

File tree

7 files changed

+180
-309
lines changed

7 files changed

+180
-309
lines changed

DeveloperTools/Controllers/RoutesController.cs

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

tests/temp/Routes/Index.cshtml renamed to DeveloperTools/EPiServer.DeveloperTools.Views/Views/Routes/Index.cshtml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
@using System.Collections
2-
@using DeveloperTools.Models
3-
@using EPiServer.Shell
4-
@inherits System.Web.Mvc.WebViewPage<IEnumerable<DeveloperTools.Models.RouteModel>>
5-
6-
@{
7-
Layout = Paths.ToResource("EPiServer.DeveloperTools", "Views/Shared/DevToolsMaster.cshtml");
8-
}
1+
@model IEnumerable<EPiServer.DeveloperTools.Features.Routes.RouteModel>
92

103
<div class="epi-contentArea">
114
<h1 class="EP-prefix">Routes</h1>
125
<p>
13-
Dumps all routes registered in the Application and you can find out which routes can handle a request.
6+
Dumps all endpoints registered in the application.
147
</p>
158
</div>
169
<div class="epi-formArea">
17-
<div>
10+
@*<div>
1811
@using (Html.BeginForm("Index", "Routes", new { }, FormMethod.Post))
1912
{
2013
@Html.AntiForgeryToken()
@@ -24,17 +17,18 @@
2417
<input type="submit" value="Find Route" class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-Search"/>
2518
</span>
2619
}
27-
</div>
20+
</div>*@
2821
<br/>
2922
<table cellpadding="0" cellspacing="0" border="0" class="display" id="theList">
3023
<thead>
3124
<tr>
3225
<th align="left">Order</th>
3326
<th align="left">Name</th>
34-
<th align="left">Type</th>
3527
<th align="left">Url</th>
36-
<th align="left">RouteHandler </th>
37-
<th align="left">Defaults </th>
28+
<th align="left">RouteHandler</th>
29+
<th align="left">Methods</th>
30+
<th align="left">Parameters</th>
31+
<th align="left">Defaults</th>
3832
</tr>
3933
</thead>
4034
<tbody>
@@ -43,37 +37,19 @@
4337
<tr @(entry.IsSelected ? "style='background-color:LightGreen'" : string.Empty)>
4438
<td>@entry.Order</td>
4539
<td>@entry.Name</td>
46-
<td>@entry.Type</td>
4740
<td>@entry.Url</td>
4841
<td>@entry.RouteHandler</td>
42+
<td>@entry.Methods</td>
43+
<td>@entry.Parameters</td>
4944
<td>@entry.Defaults</td>
5045
</tr>
51-
if (entry.IsSelected)
52-
{
53-
<tr style='background-color: LightGreen'>
54-
<td>@entry.Order</td>
55-
<td></td>
56-
<td>@entry.DataTokens</td>
57-
<td></td>
58-
<td></td>
59-
<td></td>
60-
</tr>
61-
<tr style='background-color: LightGreen'>
62-
<td>@entry.Order</td>
63-
<td></td>
64-
<td>@entry.Values</td>
65-
<td></td>
66-
<td></td>
67-
<td></td>
68-
</tr>
69-
}
7046
}
7147
</tbody>
7248
</table>
7349

7450
</div>
7551

76-
@section Scripts {
52+
@section AdditionalScripts {
7753
<script>
7854
$(document).ready(function () {
7955
$('#theList').dataTable(

DeveloperTools/Features/AppEnvironment/AppEnvironmentController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public AppEnvironmentController(IWebHostEnvironment environment, IConfiguration
2424

2525
public ActionResult Index()
2626
{
27-
var model = new AppEnvironmentModel { Assemblies = GetLoadedAssemblies(), Misc = GetMiscValues(), ConnectionString = GetConnectionStrings() };
27+
var model = new AppEnvironmentModel
28+
{
29+
Assemblies = GetLoadedAssemblies(), Misc = GetMiscValues(), ConnectionString = GetConnectionStrings()
30+
};
2831

2932
return View(model);
3033
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Microsoft.AspNetCore.Routing;
2+
3+
namespace EPiServer.DeveloperTools.Features.Routes;
4+
5+
public class RouteModel
6+
{
7+
public string Order { get; set; }
8+
public string Name { get; set; }
9+
public string Url { get; set; }
10+
public string Defaults { get; set; }
11+
public string RouteHandler { get; set; }
12+
public string Methods { get; set; }
13+
public string Parameters { get; set; }
14+
public string Values { get; set; }
15+
public string Constraints { get; set; }
16+
public string RouteExistingFiles { get; set; }
17+
public bool IsSelected { get; set; }
18+
public RouteBase Route { get; set; }
19+
}

0 commit comments

Comments
 (0)