Files
gpw_next/GPW.CORE.WRKLOG.old/Pages/ForceReset.razor
T

39 lines
773 B
Plaintext

@page "/ForceReset"
@attribute [Authorize]
@using CORE.Data.DbModels
@using WRKLOG.old.Data
@inject GpwDataService GDataServ
@inject NavigationManager NavManager
@inject MessageService AppMServ
<div class="card">
<div class="card-header">
Data Reset
</div>
<div class="card-body">
<h1>@message</h1>
<LoadingData></LoadingData>
</div>
</div>
@code {
protected string message = "Resetting Cache!";
protected override async Task OnInitializedAsync()
{
await GDataServ.FlushRedisCache();
AppMServ.clonedRA = null;
AppMServ.recordRA = null;
message = "Reset done!";
// attendo 1 msec
await Task.Delay(1);
// passo a pagina home
NavManager.NavigateTo("", true);
}
}