Files
egwcapp/EgwControlCenter.App/Components/Compo/TargetSetup.razor
T
2024-10-02 16:14:15 +02:00

120 lines
5.9 KiB
Plaintext

<div class="card shadow">
<div class="card-header">
<div class="d-flex justify-content-between">
<div class="p-0 d-flex">
<div class="px-0">
<h5>Configuration Setup</h5>
</div>
@if (RemoteCallActive)
{
<div class="px-2">
<i class="fa-solid fa-cloud-arrow-down fs-4 text-success"></i>
</div>
}
</div>
<div class="p-0 d-flex">
<div class="px-1">
@if (PwdOk)
{
<div class="input-group">
<button class="btn btn-sm btn-outline-success shadow" @onclick="DoSave" title="Save All Changes"><i class="fa-regular fa-floppy-disk"></i> Save</button>
<button class="btn btn-sm btn-outline-secondary shadow" @onclick="DoCancel" title="Reload Saved"><i class="fa-solid fa-rotate"></i> Reload</button>
<button class="btn btn-sm btn-outline-danger shadow" @onclick="DoReset" title="Reset to Empty/Standard"><i class="fa-solid fa-ban"></i> Reset</button>
<button class="btn btn-sm btn-outline-dark" @onclick="ToggleSetup" title="Close Configuration Setup"><i class="fa-solid fa-angles-right"></i></button>
</div>
}
else
{
<div class="px-1">
<button class="btn btn-sm btn-outline-dark w-100" @onclick="ToggleSetup" title="Chiudi Setup Controlli"><i class="fa-solid fa-angles-right"></i></button>
</div>
}
</div>
</div>
</div>
</div>
<div class="card-body py-0 px-2">
@if (PwdOk)
{
<div class="row py-0">
<div class="col-12 mt-1">
<div class="input-group input-group-sm">
<label class="input-group-text small">MainKey</label>
<input type="text" class="form-control text-end" @bind="@MainKey">
<button class="btn btn-sm @btnSyncClass" @onclick="TrySync" title="Verifica AuthChannel"><i class="fa-solid fa-cloud-arrow-up"></i></button>
</div>
</div>
<div class="col-6 my-1">
<div class="input-group input-group-sm">
<span class="input-group-text">Cod</span>
<input type="text" class="form-control" value="@CodImpiego" disabled>
</div>
</div>
<div class="col-6 my-1">
<div class="input-group input-group-sm">
<span class="input-group-text">Key</span>
<input type="text" class="form-control" value="@AppKey" disabled>
</div>
</div>
<div class="col-6">
<div class="input-group input-group-sm">
<label class="input-group-text small">Refresh Period <small>(10..3600 sec)</small></label>
<input type="number" class="form-control text-end" @bind="@RefreshPeriod">
</div>
</div>
<div class="col-6">
<div class="input-group input-group-sm">
<label class="input-group-text small">Veto Check <small>(30..14'400 minutes)</small></label>
<input type="number" class="form-control text-end" @bind="@VetoCheck">
</div>
</div>
<div class="col-12 my-1">
<table class="table table-striped table-sm text-start shadow border mb-0">
<thead>
<tr class="bg-dark bg-gradient text-light">
<th class="text-center" style="width: 2rem;"></th>
<th>App Type</th>
<th>Path</th>
<th class="text-end" style="width: 3rem;">Enabled</th>
</tr>
</thead>
<tbody>
@foreach (var item in ListRecords)
{
<tr>
<td class="text-center">@item.Idx</td>
<td>@item.ApplicationType</td>
<td>
<input type="text" class="form-control form-control-sm" @bind="@item.BasePath" />
</td>
<td class="text-end">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" @bind="@item.IsEnabled">
</div>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
}
else
{
<div class="input-group flex-nowrap my-4">
<span class="input-group-text" id="addon-wrapping">Verify Auth Password</span>
<input type="password" class="form-control" @bind="@SetupPwd">
</div>
}
</div>
@if (PwdOk && totalCount > 5)
{
<div class="card-footer py-0 align-middle">
<EgwCoreLib.Razor.DataPager PageSize="@numRecord" currPage="@currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="@totalCount" showLoading="@isLoading"></EgwCoreLib.Razor.DataPager>
</div>
}
</div>