Files
mapo-mono/MP.MONO.UI/Pages/Test.razor
T
Samuele Locatelli c62674bd0a Test dati analisi allarmi
- completata pagina Test x freq
- fix chiamate linq su DB
2022-09-22 12:40:16 +02:00

60 lines
1.8 KiB
Plaintext

@page "/Test"
@using MP.MONO.UI.Data
@inject CurrentDataService MMDataService
<div class="card">
<div class="card-header">
<h3>Test</h3>
</div>
<div class="card-body">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
@*else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">No record found</div>
}*@
else
{
<table class="table table-sm table-striped table-responsive-lg small">
<thead>
<tr>
<th>AlarmId</th>
<th>Description</th>
<th><div class="float-end"># Events</div></th>
<th><div class="float-end">%</div></th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr>
<td class="text-nowrap">
@record.AlarmId
</td>
<td> @record.AlarmDescription</td>
<td>
<div class="float-end">@record.EventCount</div>
</td>
<td>
<div class="float-end">
@if (totalEvents!= 0)
{
<span class="text-success">@($"{(double)record.EventCount/totalEvents:P2}")</span>
}
</div>
</td>
</tr>
}
</tbody>
</table>
}
</div>
</div>