Spostato ricalcolo totale in setup
This commit is contained in:
@@ -6,10 +6,22 @@
|
||||
|
||||
@inject MessageService AppMService
|
||||
|
||||
<h3>Setup</h3>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Setup</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(isLoading)
|
||||
{
|
||||
<MP.Prog.Components.LoadingData></MP.Prog.Components.LoadingData>
|
||||
}
|
||||
else
|
||||
|
||||
<MP.Prog.Components.Test></MP.Prog.Components.Test>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
{
|
||||
<button id="btnForceCheck" class="btn btn-danger btn-sm btn-block" @onclick="() => ForceCheck(0)" title="Forza verifica archivio (totale)">
|
||||
<i class="fas fa-sync-alt"></i> Update Completo Archivio <i class="far fa-folder-open"></i>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
@*<div class="card-footer">Footer</div>*@
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Prog.Data;
|
||||
|
||||
namespace MP.Prog.Pages
|
||||
{
|
||||
public partial class Setup
|
||||
{
|
||||
#region Private Properties
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected FileArchDataService DataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async void ForceCheck(int maxHour)
|
||||
{
|
||||
isLoading = true;
|
||||
await DataService.updateAllArchive(maxHour);
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user