[Route("/test/racing-lap-test.html")]
public IActionResult RacingLaps()
{
- Debug.Print(configuration.GetValue<string>("Defaults:Texts:PostLap"));
return View();
}
[Route("test/racing-test.html")]
public IActionResult RacingCars()
{
- Debug.Print(configuration.GetValue<string>("Defaults:Texts:PostCar"));
return View();
}
+ [Route("test/full-lap.html")]
+ public IActionResult FullLap()
+ {
+ IEnumerable<Lap> laps = Laps.GetInstance().GetLaps();
+ return View(laps);
+ }
+
+ [Route("test/full-car.html")]
+ public IActionResult FullCar()
+ {
+ IEnumerable<Car> cars = Cars.GetInstance().GetCars();
+ return View(cars);
+ }
+
[HttpPost]
public async Task<IActionResult> PostCar()
{
{
"iisSettings": {
"windowsAuthentication": false,
- "anonymousAuthentication": true,
+ "anonymousAuthentication": true,
"iisExpress": {
- "applicationUrl": "http://106.120.62.58:63687",
+ //"applicationUrl": "http://106.120.62.58:63687",
+ "applicationUrl": "http://0.0.0.0:63687",
"sslPort": 0
}
},
"GearRacingCloud": {
"commandName": "Project",
"launchBrowser": true,
- "applicationUrl": "http://106.120.62.58:63687",
+ //"applicationUrl": "http://106.120.62.58:63687",
+ "applicationUrl": "http://0.0.0.0:63687",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
<h1 class="text-center">Lap Counter</h1>
-<table class="table table-bordered table-striped">
- <tr>
- <th class="text-center"><h2>Driver</h2></th>
- <th class="text-center"><h2>Laptime</h2></th>
- <th class="text-center"><h2>Car Id</h2></th>
- </tr>
- @foreach (Lap lap in Model.OrderBy(l => l.laptime))
- {
- <tr>
- <th class="text-center"><p>@lap.driver</p></th>
- <th class="text-center"><p>@TimeSpan.FromMilliseconds(lap.laptime)</p></th>
- <th class="text-center"><p>@lap.carId</p></th>
- </tr>
- }
-</table>
\ No newline at end of file
+<div>
+ <table class="table-striped table-rounded" width="100%">
+ <thead>
+ <tr>
+ <th class="text-center"><h2>Driver</h2></th>
+ <th class="text-center"><h2>Laptime</h2></th>
+ <th class="text-center"><h2>Car Id</h2></th>
+ </tr>
+ </thead>
+ <tbody>
+ @if(Model.Count() == 0)
+ {
+ <tr>
+ <th class="text-center" colspan="5"><p>No registered lap!</p></th>
+ </tr>
+ }
+
+ @foreach (Lap lap in Model.OrderBy(l => l.laptime))
+ {
+ <tr>
+ <th class="text-center"><p>@lap.driver</p></th>
+ <th class="text-center"><p>@TimeSpan.FromMilliseconds(lap.laptime)</p></th>
+ <th class="text-center"><p>@lap.carId</p></th>
+ </tr>
+ }
+ </tbody>
+ </table>
+</div>
--- /dev/null
+@model IEnumerable<Car>
+
+@{
+ ViewData["Title"] = "FullCarView";
+}
+
+<h2>FullCarView</h2>
+
+<div>
+ <table class="table-striped table-rounded" width="100%">
+ <thead>
+ <tr>
+ <th class="text-center"><h2>Id</h2></th>
+ <th class="text-center"><h2>IP adress</h2></th>
+ <th class="text-center"><h2>Name</h2></th>
+ <th class="text-center"><h2>Access point's MAC</h2></th>
+ <th class="text-center"><h2>Access point's SSID</h2></th>
+ </tr>
+ </thead>
+ <tbody>
+ @if (Model.Count() == 0)
+ {
+ <tr>
+ <th class="text-center" colspan="5"><p>No registered car!</p></th>
+ </tr>
+ }
+
+ @foreach (Car car in Model)
+ {
+ <tr>
+ <th class="text-center"><p>@car.carId</p></th>
+ <th class="text-center"><p>@car.carIp</p></th>
+ <th class="text-center"><p>@car.carName</p></th>
+ <th class="text-center"><p>@car.apMac</p></th>
+ <th class="text-center"><p>@car.apSsid</p></th>
+ </tr>
+ }
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
--- /dev/null
+@model IEnumerable<Lap>
+
+@{
+ ViewData["Title"] = "FullLapView";
+}
+
+<h1 class="text-center">Full Lap View</h1>
+
+<div>
+ <table class="table-striped table-rounded" width="100%">
+ <thead>
+ <tr>
+ <th class="text-center"><h2>Lap Id</h2></th>
+ <th class="text-center"><h2>TimeStamp</h2></th>
+ <th class="text-center"><h2>Laptime</h2></th>
+ <th class="text-center"><h2>Driver</h2></th>
+ <th class="text-center"><h2>Car Id</h2></th>
+ </tr>
+ </thead>
+ <tbody>
+ @if (Model.Count() == 0)
+ {
+ <tr>
+ <th class="text-center" colspan="5"><p>No registered lap!</p></th>
+ </tr>
+ }
+
+ @foreach (Lap lap in Model)
+ {
+ <tr>
+ <th class="text-center"><p>@lap.id</p></th>
+ <th class="text-center"><p>@lap.timeStamp</p></th>
+ <th class="text-center"><p>@TimeSpan.FromMilliseconds(lap.laptime)</p></th>
+ <th class="text-center"><p>@lap.driver</p></th>
+ <th class="text-center"><p>@lap.carId</p></th>
+ </tr>
+ }
+ </tbody>
+ </table>
+</div>
+++ /dev/null
-@{
- ViewData["Title"] = "FullLapView";
-}
-
-<h1 class="text-center">Lap Counter</h1>
-
-<div class="container">
- <div class="row">
- <div class="col-md-4 text-center"><h2>Id</h2></div>
- <div class="col-md-2 text-center"><h2>Timestamp</h2></div>
- <div class="col-md-2 text-center"><h2>Laptime</h2></div>
- <div class="col-md-2 text-center"><h2>Driver</h2></div>
- <div class="col-md-2 text-center"><h2>Car Id</h2></div>
- </div>
- @foreach (Lap lap in Model)
- {
- <div class="row">
- <div class="col-md-4 text-center"><p>@lap.id</p></div>
- <div class="col-md-2 text-center"><p>@lap.timeStamp</p></div>
- <div class="col-md-2 text-center"><p>@TimeSpan.FromMilliseconds(lap.laptime)</p></div>
- <div class="col-md-2 text-center"><p>@lap.driver</p></div>
- <div class="col-md-2 text-center"><p>@lap.carId</p></div>
- </div>
- }
-</div>
-
body {
padding-top: 50px;
padding-bottom: 20px;
+ background-image: radial-gradient(rgba(255,255,255,1), #f97777);
+ background-repeat: no-repeat, repeat, repeat;
+ min-height: 100%;
+}
+
+html {
+ min-height: 100%;
}
/* Wrapping element */
.table-striped > tbody > tr:nth-child(odd) > td,
.table-striped > tbody > tr:nth-child(odd) > th {
- background-color: #f97777;
+ background-color: lightcyan;
+}
+
+.table-striped > tbody > tr:nth-child(even) > td,
+.table-striped > tbody > tr:nth-child(even) > th {
+ background-color: lightblue;
+}
+
+.table-rounded {
+ border-collapse: separate;
+ border: solid black 1px;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+}
+
+.table-rounded > thead {
+ background-color: white;
+}
+
+.table-rounded > thead > tr > th:first-child {
+ border-radius: 10px 0 0 0;
}
-.table {
- border-radius: 25px
-}
\ No newline at end of file
+.table-rounded > thead > tr > th:last-child {
+ border-radius: 0 10px 0 0;
+}
+
+.table-rounded > thead > tr > th:only-child {
+ border-radius: 10px 10px 0 0;
+}
+
+.table-rounded > tbody > tr:last-child > th:first-child {
+ border-radius: 0 0 0 10px;
+}
+
+.table-rounded > tbody > tr:last-child > th:last-child {
+ border-radius: 0 0 10px 0;
+}
+
+.table-rounded > tbody > tr:last-child > th:only-child {
+ border-radius: 0 0 10px 10px;
+}