STATS:
- Aggiunta pagina ForceReset - completato porting cache redis standard
This commit is contained in:
+300
-19
@@ -72,29 +72,34 @@ namespace MP.Stats.Data
|
||||
|
||||
public async Task<List<AzioniUL>> ActionsGetAll()
|
||||
{
|
||||
//return Task.FromResult(dbController.ActionsGetAll());
|
||||
List<AzioniUL> dbResult = new List<AzioniUL>();
|
||||
string cacheKey = "MP:STATS:AZIONI_ALL";
|
||||
string rawData;
|
||||
var redisDataList = await distributedCache.GetAsync(cacheKey);
|
||||
if (redisDataList != null)
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<AzioniUL> result = new List<AzioniUL>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = $"{redisBaseKey}:Cache:AZIONI_ALL";
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
rawData = Encoding.UTF8.GetString(redisDataList);
|
||||
dbResult = JsonConvert.DeserializeObject<List<AzioniUL>>(rawData);
|
||||
result = JsonConvert.DeserializeObject<List<AzioniUL>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.ActionsGetAll();
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDataList = Encoding.UTF8.GetBytes(rawData);
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt);
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per AzioniUL: {ts.TotalMilliseconds} ms");
|
||||
result = dbController.ActionsGetAll();
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<AzioniUL>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"ActionsGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
public Task<List<AutocompleteModel>> ArticoliGetSearch(int numRecord, string searchVal = "")
|
||||
@@ -207,9 +212,39 @@ namespace MP.Stats.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
public Task<List<Macchine>> MacchineGetAll()
|
||||
public async Task<List<Macchine>> MacchineGetAll()
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<Macchine> result = new List<Macchine>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = $"{redisBaseKey}:Cache:Macchine";
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<Macchine>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.MacchineGetAll().ToList();
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<Macchine>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"MacchineGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
return Task.FromResult(dbController.MacchineGetAll().ToList());
|
||||
#endif
|
||||
}
|
||||
|
||||
public Task<List<AutocompleteModel>> MachineList()
|
||||
@@ -248,6 +283,42 @@ namespace MP.Stats.Data
|
||||
|
||||
public async Task<List<ResControlli>> StatControlliGetAll(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<ResControlli> result = new List<ResControlli>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:CONTROLLI", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<ResControlli>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatControlliGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<ResControlli>();
|
||||
}
|
||||
// se necessario filtro..
|
||||
if (!string.IsNullOrEmpty(searchVal))
|
||||
{
|
||||
result = result
|
||||
.Where(x => x.Note.Contains(searchVal, StringComparison.InvariantCultureIgnoreCase))
|
||||
.ToList();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatControlliGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
//return Task.FromResult(dbController.StatControlliGetAll(DataStart, DataEnd, IdxMacchina, IdxODL, KeyRichiesta, CodArticolo).ToArray());
|
||||
List<ResControlli> dbResult = new List<ResControlli>();
|
||||
string cacheKey = getCacheKey("MP:STATS:CONTROLLI", CurrFilter);
|
||||
@@ -271,10 +342,40 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per ResControlli: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
public async Task<List<DdbTurni>> StatDdbGetAll(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<DdbTurni> result = new List<DdbTurni>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKeyPaged($"{redisBaseKey}:DDBT", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<DdbTurni>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatDdbGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo, CurrFilter.FirstRecord, CurrFilter.NumRecord);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<DdbTurni>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatDdbGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
//return Task.FromResult(dbController.StatDdbGetAll(numRecord, searchVal).ToArray());
|
||||
List<DdbTurni> dbResult = new List<DdbTurni>();
|
||||
string cacheKey = getCacheKeyPaged("MP:STATS:DDBT", CurrFilter);
|
||||
@@ -298,6 +399,7 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per DdbTurni: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -321,6 +423,31 @@ namespace MP.Stats.Data
|
||||
|
||||
public async Task<int> StatDdbGetCount(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
int numRec = 0;
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:DDBT-COUNT", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
numRec = JsonConvert.DeserializeObject<int>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
numRec = dbController.StatDdbGetCount(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(numRec);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatDdbGetCount | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return numRec;
|
||||
#if false
|
||||
int numRec = 0;
|
||||
string cacheKey = getCacheKey("MP:STATS:DDBT-COUNT", CurrFilter);
|
||||
string rawData;
|
||||
@@ -343,6 +470,7 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per DdbTurni: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(numRec);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -353,6 +481,35 @@ namespace MP.Stats.Data
|
||||
/// <returns></returns>
|
||||
public async Task<List<OdlEnergyModel>> StatOdlEnergyGetAll(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<OdlEnergyModel> result = new List<OdlEnergyModel>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:ODL_ENERGY", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<OdlEnergyModel>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatOdlEnergyGetFilt(CurrFilter.IdxMacchina, CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<OdlEnergyModel>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatOdlEnergyGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
List<OdlEnergyModel> dbResult = new List<OdlEnergyModel>();
|
||||
string cacheKey = getCacheKey("MP:STATS:ODL_ENERGY", CurrFilter);
|
||||
string rawData;
|
||||
@@ -375,6 +532,7 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per ODL_Energy: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -385,6 +543,35 @@ namespace MP.Stats.Data
|
||||
/// <returns></returns>
|
||||
public async Task<List<StatsODL>> StatOdlGetAll(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<StatsODL> result = new List<StatsODL>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:ODL", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<StatsODL>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatOdlGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<StatsODL>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatOdlEnergyGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
List<StatsODL> dbResult = new List<StatsODL>();
|
||||
string cacheKey = getCacheKey("MP:STATS:ODL", CurrFilter);
|
||||
string rawData;
|
||||
@@ -407,10 +594,40 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per ODL: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
public async Task<List<ResScarti>> StatScartiGetAll(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<ResScarti> result = new List<ResScarti>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:SCARTI:RAW", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<ResScarti>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatScartiGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<ResScarti>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatScartiGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
//return Task.FromResult(dbController.StatScartiGetAll(DataStart, DataEnd, IdxMacchina, IdxODL, KeyRichiesta, CodArticolo).ToArray());
|
||||
List<ResScarti> dbResult = new List<ResScarti>();
|
||||
string cacheKey = getCacheKey("MP:STATS:SCARTI:RAW", CurrFilter);
|
||||
@@ -434,6 +651,7 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per ResScarti: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
public async Task<List<TurniOee>> StatTurniOeeGetAllAsync(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo, string searchVal = "")
|
||||
@@ -443,6 +661,36 @@ namespace MP.Stats.Data
|
||||
|
||||
public async Task<List<TurniOee>> StatTurniOeeGetAllCached(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<TurniOee> result = new List<TurniOee>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:OEE", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<TurniOee>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatTurniOeeGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<TurniOee>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatTurniOeeGetAllCached | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
|
||||
#if false
|
||||
List<TurniOee> dbResult = new List<TurniOee>();
|
||||
string cacheKey = getCacheKey("MP:STATS:OEE", CurrFilter);
|
||||
string rawData;
|
||||
@@ -465,10 +713,40 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per TurniOee: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
public async Task<List<UserActionLog>> StatUserLogGetAll(SelectData CurrFilter, string searchVal = "")
|
||||
{
|
||||
// setup parametri costanti
|
||||
string source = "DB";
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
List<UserActionLog> result = new List<UserActionLog>();
|
||||
// cerco in redis...
|
||||
DateTime adesso = DateTime.Now;
|
||||
string currKey = getCacheKey($"{redisBaseKey}:USRACTLOG", CurrFilter);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<UserActionLog>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.StatUserLogGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, FastCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<UserActionLog>();
|
||||
}
|
||||
sw.Stop();
|
||||
_logger.LogDebug($"StatUserLogGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
|
||||
return result;
|
||||
#if false
|
||||
//return Task.FromResult(dbController.StatUserLogGetAll(DataStart, DataEnd, IdxMacchina, IdxODL, KeyRichiesta, CodArticolo).ToArray());
|
||||
List<UserActionLog> dbResult = new List<UserActionLog>();
|
||||
string cacheKey = getCacheKey("MP:STATS:USRACTLOG", CurrFilter);
|
||||
@@ -497,6 +775,7 @@ namespace MP.Stats.Data
|
||||
_logger.LogTrace($"Effettuata lettura da DB + caching per UserActionLog: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(dbResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -637,7 +916,9 @@ namespace MP.Stats.Data
|
||||
|
||||
private static ILogger<MpStatsService> _logger;
|
||||
|
||||
#if false
|
||||
private static List<AzioniUL> ActionsList = new List<AzioniUL>();
|
||||
#endif
|
||||
|
||||
private readonly IDistributedCache distributedCache;
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@page "/ForceReset"
|
||||
|
||||
<LoadingData Title="Clear Cache..." DisplayMode="LoadingData.SpinMode.Growl" DisplaySize="LoadingData.CtrlSize.Large"></LoadingData>
|
||||
@@ -0,0 +1,21 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.Services;
|
||||
using MP.Stats.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MP.Stats.Pages
|
||||
{
|
||||
public partial class ForceReset
|
||||
{
|
||||
[Inject]
|
||||
protected MpStatsService StatService { get; set; }
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await StatService.FlushCache();
|
||||
await Task.Delay(500);
|
||||
NavManager.NavigateTo("/", true);
|
||||
}
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,11 @@
|
||||
<span class="oi oi-clock" aria-hidden="true"></span> Task Scheduler
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-2">
|
||||
<NavLink class="nav-link" href="ForceReset">
|
||||
<span class="oi oi-reload" aria-hidden="true"></span> Force Reset
|
||||
</NavLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user