Files
mapo-core/MP.WASM.Mon/Client/Pages/FetchMSE.razor
T
2022-07-08 17:27:08 +02:00

49 lines
1015 B
Plaintext

@page "/fetchmse"
@using MP.Data
@using MP.Data.DatabaseModels
@using MP.WASM.Mon.Shared
@inject HttpClient Http
<PageTitle>MSE Data</PageTitle>
<h1>MSE Data</h1>
@if (listMSE == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Macc</th>
<th>Sem</th>
<th>Art</th>
</tr>
</thead>
<tbody>
@foreach (var item in listMSE)
{
<tr>
<td>@item.LastUpdate?.ToShortDateString()</td>
<td>@item.CodMacchina</td>
<td>@item.Semaforo</td>
<td>@item.CodArticolo</td>
</tr>
}
</tbody>
</table>
}
@code {
private List<MappaStatoExpl>? listMSE;
protected override async Task OnInitializedAsync()
{
listMSE = await Http.GetFromJsonAsync<List<MappaStatoExpl>>("api/MSE");
}
}