Files
mapo-mono/MP.MONO.UI/Components/ParamOverview.razor
T
2022-02-15 19:21:19 +01:00

51 lines
1.2 KiB
Plaintext

@using MP.MONO.UI.Components
@using MP.MONO.Core.DTO
@using MP.MONO.UI.Data
@inject CurrentDataService MMDataService
@if (@dataLoaded && ListRecords != null)
{
<ul class="list-group">
@foreach (var item in ListRecords)
{
<li class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between" title="order">
<div>@item.Title</div>
<div>
<h5> <b>@item.Value</b></h5>
</div>
</div>
</li>
}
</ul>
}
else
{
<ul>
<li>Current Parameters</li>
<li>Values Log</li>
<li>Parameters History</li>
</ul>
<LoadingDataSmall></LoadingDataSmall>
}
@code {
protected bool dataLoaded = false;
private List<DisplayDataDTO>? ListRecords { get; set; } = null;
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
protected async Task ReloadData()
{
await Task.Delay(10);
ListRecords = await MMDataService.MachineDisplay();
await Task.Delay(500);
dataLoaded = true;
}
}