added monitor history and pilots page.

set home page. (monitor page)
This commit is contained in:
chris.watts90@outlook.com 2017-04-28 21:52:06 +01:00
parent e690c1e6a9
commit ba91962eac
7 changed files with 156 additions and 3 deletions

View File

@ -9,14 +9,15 @@ namespace RaceLapTimer.Modules
{
public class MonitorModule:NancyModule
{
public MonitorModule() : base("/monitor")
public MonitorModule()
{
Get[""] = args => GetMonitorHomePage(args);
Get["/monitor"] = args => GetMonitorHomePage(args);
}
private dynamic GetMonitorHomePage(dynamic args)
{
throw new NotImplementedException();
return View["Monitor.cshtml"];
}
}
}

View File

@ -16,7 +16,7 @@ namespace RaceLapTimer.Modules
private dynamic GetPilotsListHomePage(dynamic args)
{
throw new NotImplementedException();
return View["Pilots.cshtml"];
}
}
}

View File

@ -18,7 +18,12 @@ namespace RaceLapTimer.Modules
Get[""] = args => GetSystemHomePage(args);
Get["/pilot"] = args => GetSystemPilotPage(args);
Get["/soundfile"] = args => GetSystemSoundFilePage(args);
Get["/configuraiton"] = args => GetConfigurationHomePage(args);
}
private dynamic GetConfigurationHomePage(dynamic args)
{
throw new NotImplementedException();
}
//this will return system configuration settings home page.

View File

@ -131,12 +131,19 @@
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<None Include="www\Views\History.cshtml" />
<None Include="www\Views\index.cshtml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="www\Views\login.cshtml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="www\Views\Monitor.cshtml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="www\Views\Pilots.cshtml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="www\Views\RaceDirector.cshtml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

View File

@ -0,0 +1,59 @@
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
@{
Layout = "razor-layout.cshtml";
ViewBag.Title = "History";
ViewBag.CreateRaceApiEndpoint = "/api/racesession/create";
}
<h3>@ViewBag.Title</h3>
<table>
<thead>
<tr>
<td>Session</td>
<td>Mode</td>
<td>Pilots</td>
<td>Total Laps</td>
<td>Fastest Lap</td>
<td>Fastest Pilot</td>
<td>Average Lap Time</td>
</tr>
</thead>
<tbody>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,38 @@
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
@{
Layout = "razor-layout.cshtml";
ViewBag.Title = "Monitor";
}
<h3>@ViewBag.Title</h3>
<table>
<thead>
<tr>
<td>Race Name</td>
<td>Pilot Count</td>
<td>Lap Count</td>
</tr>
</thead>
<tbody>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,43 @@
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
@{
Layout = "razor-layout.cshtml";
ViewBag.Title = "Pilots";
}
<h3>@ViewBag.Title</h3>
<table>
<thead>
<tr>
<td>Name</td>
<td>Quad</td>
<td>Total Races</td>
<td>Total Laps</td>
</tr>
</thead>
<tbody>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
</tr>
<tr>
<td>None</td>
<td>0</td>
<td>10</td>
<td>10</td>
</tr>
</tbody>
</table>