mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Начал работу над страницей с вывводом данных с SNMP запроса.
Сделал маршрут для пинга
This commit is contained in:
1 parent
6e0d61aa6e
commit
26e80b1936
6 files changed
+61
-6
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
<RadzenStack Gap="4px">
|
||||
<RadzenFormField Text="Тип подключения">
|
||||
<RadzenDropDown Data="printerConnectionTypeItems" TValue="int" TextProperty="Name" ValueProperty="Id" @bind-Value="DataToPrinterAdd.PrinterConnetctionTypeId" />
|
||||
<RadzenDropDown Data="printerConnectionTypeItems" TValue="int" TextProperty="Name" ValueProperty="Id" ValueChanged="@OnConnetctionTypeChanged" />
|
||||
</RadzenFormField>
|
||||
<RadzenFormField Text="Название принтера">
|
||||
<RadzenTextBox @bind-Value="DataToPrinterAdd.Name"/>
|
||||
@@ -41,6 +41,7 @@
|
||||
private List<Shared.Models.Printer.PrinterConnectionTypeItem> printerConnectionTypeItems = new();
|
||||
private List<Shared.Models.Printer.PrinterPrintTypeItem> printerPrintTypeItems = new();
|
||||
private List<string> articleItems = new();
|
||||
private string tempIpAddressOrHostname = default!;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -49,6 +50,24 @@
|
||||
await GetArticleItems();
|
||||
}
|
||||
|
||||
async Task OnConnetctionTypeChanged(int newValue)
|
||||
{
|
||||
DataToPrinterAdd.PrinterConnetctionTypeId = newValue;
|
||||
|
||||
switch (DataToPrinterAdd.PrinterConnetctionTypeId)
|
||||
{
|
||||
case 1:
|
||||
DataToPrinterAdd.OidForQueryCountPrintedAllTime = "1.3.6.1.2.1.43.10.2.1.4.1.1";
|
||||
DataToPrinterAdd.IpAddressOrHostname = tempIpAddressOrHostname;
|
||||
return;
|
||||
case 2:
|
||||
DataToPrinterAdd.OidForQueryCountPrintedAllTime = string.Empty;
|
||||
tempIpAddressOrHostname = DataToPrinterAdd.IpAddressOrHostname ?? string.Empty;
|
||||
DataToPrinterAdd.IpAddressOrHostname = string.Empty;
|
||||
return;
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
async Task GetPrinterConnectionTypeItems()
|
||||
{
|
||||
var responce = await http.GetAsync(Shared.Classes.ApiRoutes.Printer.ListConnectionType);
|
||||
|
||||
Reference in new issue
Block a user