[성현모] Web.Operation CPMeta 기능 추가
This commit is contained in:
@ -1,7 +1,79 @@
|
||||
@page "/CpMeta"
|
||||
@rendermode InteractiveServer
|
||||
|
||||
@using Web.Operation.Module;
|
||||
@using Web.Operation.Services
|
||||
@using Packet
|
||||
|
||||
@inject CPMetaService _cpMetaService
|
||||
@inject PopupService PopupService
|
||||
|
||||
<h3>CPMeta</h3>
|
||||
|
||||
@code {
|
||||
<RadzenFieldset Style="margin-bottom: 10px;" Text="Server Info">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<RadzenLabel Style="width: 130px;" Text="Server Address"></RadzenLabel>
|
||||
<RadzenTextBox Style="margin-right: 10px;" @bind-Value="@ServerAddress"></RadzenTextBox>
|
||||
</div>
|
||||
</RadzenFieldset>
|
||||
|
||||
}
|
||||
<RadzenFieldset Style="margin-bottom: 10px;" Text="View Options">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<RadzenLabel Style="margin-right: 5px;" Text="ProductID"></RadzenLabel>
|
||||
<RadzenTextBox Style="margin-right: 10px;width: 30rem;" @bind-Value="@SearchProductID"></RadzenTextBox>
|
||||
<RadzenButton Style="margin-right: 30px;" Click="@(() => SearchByProductID())">Search</RadzenButton>
|
||||
|
||||
<RadzenLabel Style="margin-right: 5px;" Text="MacAddress"></RadzenLabel>
|
||||
<RadzenTextBox Style="margin-right: 10px; width: 30rem;" @bind-Value="@SearchProductMacAddress"></RadzenTextBox>
|
||||
<RadzenButton Style="margin-right: 30px;" Click="@(() => SearchByMacAddress())">Search</RadzenButton>
|
||||
</div>
|
||||
</RadzenFieldset>
|
||||
<br />
|
||||
<!--count-->
|
||||
@* <div style="display: flex; justify-content: space-between; margin-bottom: 0.7rem;">
|
||||
<div style="display: flex; align-items:center;">
|
||||
<RadzenLabel Style="color:#BA68C8; font-weight: 600; font-size: 1.1rem; margin-right: 1.2rem;" Text=@($"Total Count: {history.Count}")></RadzenLabel>
|
||||
<RadzenLabel Style="color:#64B5F6; font-weight: 600; font-size: 1.1rem;" Text=@($"Filter Count: {grid.View.Count()}")></RadzenLabel>
|
||||
</div>
|
||||
<div>
|
||||
<RadzenButton Style="background: #7E57C2; margin-right: 0.5rem;" Text="Export CSV(Full Data)" Click="@(() => OnClickExportCSV(false))"></RadzenButton>
|
||||
<RadzenButton Style="background: #1976D2;" Text="Export CSV(Filter Data)" Click="@(() => OnClickExportCSV(true))"></RadzenButton>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<OperationGrid TDataModel="tWbms" DataList="@response.Wbms">
|
||||
|
||||
</OperationGrid>
|
||||
|
||||
@code {
|
||||
private string ServerAddress = "192.168.0.126:9000";
|
||||
private string SearchProductID = string.Empty;
|
||||
private string SearchProductMacAddress = string.Empty;
|
||||
|
||||
Response_GetWbmsMeta response = new Response_GetWbmsMeta();
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private async Task SearchByProductID()
|
||||
{
|
||||
PopupService.OpenIndicator("");
|
||||
if (string.IsNullOrEmpty(SearchProductID) == false)
|
||||
response = await _cpMetaService.GetWbmsMetaByProductID(SearchProductID, ServerAddress);
|
||||
|
||||
await Task.Delay(300);
|
||||
PopupService.CloseIndicator();
|
||||
}
|
||||
|
||||
private async Task SearchByMacAddress()
|
||||
{
|
||||
PopupService.OpenIndicator("");
|
||||
if (string.IsNullOrEmpty(SearchProductMacAddress) == false)
|
||||
response = await _cpMetaService.GetWbmsMetaByMacAddress(SearchProductMacAddress, ServerAddress);
|
||||
|
||||
await Task.Delay(300);
|
||||
PopupService.CloseIndicator();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user