72 lines
1.8 KiB
Plaintext
72 lines
1.8 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>OEE%</li>
|
|
<li>Stats Details</li>
|
|
<li>Graph & Analytics</li>
|
|
</ul>
|
|
<LoadingDataSmall></LoadingDataSmall>
|
|
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" placeholder="New Message" @bind="@newMessage"></input>
|
|
@* <div class="input-group-append">
|
|
<span class="input-group-text">@newMessage</span>
|
|
</div>*@
|
|
<button class="btn btn-success" type="submit">send</button>
|
|
</div>
|
|
|
|
}
|
|
@code {
|
|
protected bool dataLoaded = false;
|
|
private List<DisplayDataDTO>? ListRecords { get; set; } = null;
|
|
|
|
private string _newMessage { get; set; } = "";
|
|
|
|
public string newMessage
|
|
{
|
|
get => _newMessage;
|
|
set
|
|
{
|
|
_newMessage = value;
|
|
MMDataService.alarmPipe.sendMessage(value);
|
|
}
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
}
|