diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj
index 5f5130e9..654471b0 100644
--- a/MP-TAB-SERV/MP-TAB-SERV.csproj
+++ b/MP-TAB-SERV/MP-TAB-SERV.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2311.1410
+ 6.16.2311.1411
enable
MP_TAB_SERV
diff --git a/MP-TAB-SERV/Pages/Logout.razor b/MP-TAB-SERV/Pages/Logout.razor
index a881db05..6579df65 100644
--- a/MP-TAB-SERV/Pages/Logout.razor
+++ b/MP-TAB-SERV/Pages/Logout.razor
@@ -1,8 +1,6 @@
@page "/logout"
-
logout
+
-@code {
-}
diff --git a/MP-TAB-SERV/Pages/Logout.razor.cs b/MP-TAB-SERV/Pages/Logout.razor.cs
new file mode 100644
index 00000000..7d75c64a
--- /dev/null
+++ b/MP-TAB-SERV/Pages/Logout.razor.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components;
+using System.Net.Http;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Components.Authorization;
+using Microsoft.AspNetCore.Components.Forms;
+using Microsoft.AspNetCore.Components.Routing;
+using Microsoft.AspNetCore.Components.Web;
+using Microsoft.AspNetCore.Components.Web.Virtualization;
+using Microsoft.JSInterop;
+using MP_TAB_SERV;
+using MP_TAB_SERV.Shared;
+using MP_TAB_SERV.Components;
+using MP.Data;
+using MP.Data.DatabaseModels;
+using MP.Data.DTO;
+using MP.Data.Services;
+using Newtonsoft.Json;
+using NLog;
+using EgwCoreLib.Razor;
+using Blazored.LocalStorage;
+
+namespace MP_TAB_SERV.Pages
+{
+ public partial class Logout
+ {
+ [Inject]
+ protected ILocalStorageService localStorage { get; set; } = null!;
+ [Inject]
+ protected TabDataService TDService { get; set; } = null!;
+ [Inject]
+ protected MessageService MsgServ { get; set; } = null!;
+ [Inject]
+ protected NavigationManager NavMan { get; set; } = null!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ await Task.Delay(1);
+ await localStorage.SetItemAsync("currTkn", "");
+ await TDService.OperatoreDeleteRedis(MsgServ.MatrOpr);
+ NavMan.NavigateTo("regnewdevice");
+ }
+ }
+}
\ No newline at end of file
diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html
index 15d31c57..6e880a19 100644
--- a/MP-TAB-SERV/Resources/ChangeLog.html
+++ b/MP-TAB-SERV/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2311.1410
+ Versione: 6.16.2311.1411
Note di rilascio:
-
diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt
index df8d750d..56646032 100644
--- a/MP-TAB-SERV/Resources/VersNum.txt
+++ b/MP-TAB-SERV/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2311.1410
+6.16.2311.1411
diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml
index 0d76dc00..b9d9e968 100644
--- a/MP-TAB-SERV/Resources/manifest.xml
+++ b/MP-TAB-SERV/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2311.1410
+ 6.16.2311.1411
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html
false
diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs
index 49194873..bf6ce04c 100644
--- a/MP.Data/Services/TabDataService.cs
+++ b/MP.Data/Services/TabDataService.cs
@@ -200,8 +200,8 @@ namespace MP.Data.Services
{
result = dbTabController.ElencoOperatori();
// serializzo e salvo...
- rawData = JsonConvert.SerializeObject(result);
- await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
+ //rawData = JsonConvert.SerializeObject(result);
+ //await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
}
if (result == null)
{
@@ -256,22 +256,22 @@ namespace MP.Data.Services
sw.Start();
AnagOperatoriModel answ = null;
// cerco in redis...
- string currKey = $"{redisBaseKey}:CurrOpr:{matrOpr}";
- RedisValue rawData = await redisDb.StringGetAsync(currKey);
- if (rawData.HasValue)
- {
+ //string currKey = $"{redisBaseKey}:CurrOpr:login:{matrOpr}";
+ //RedisValue rawData = await redisDb.StringGetAsync(currKey);
+ //if (rawData.HasValue)
+ //{
//var encrData = SteamCrypto.DecryptString(rawData, passPhrase);
- answ = JsonConvert.DeserializeObject($"{rawData}");
- source = "REDIS";
- }
- else
- {
- answ = dbTabController.LoginOperatore(matrOpr, authKey);
+ //answ = JsonConvert.DeserializeObject($"{rawData}");
+ //source = "REDIS";
+ //}
+ //else
+ //{
// serializzo e salvo...
- rawData = JsonConvert.SerializeObject(answ);
+ //rawData = JsonConvert.SerializeObject(answ);
//var encrData = SteamCrypto.EncryptString(rawData, passPhrase);
- await redisDb.StringSetAsync(currKey, rawData, ConfigCache);
- }
+ //await redisDb.StringSetAsync(currKey, rawData, ConfigCache);
+ //}
+ answ = dbTabController.LoginOperatore(matrOpr, authKey);
if (answ == null)
{
answ = new AnagOperatoriModel();
@@ -285,7 +285,7 @@ namespace MP.Data.Services
///
/// Scrive l'hash dell'oggetto curr opr
///
- ///
+ ///
///
public async Task OperatoreGetRedis(int matrOpr)
{
@@ -311,6 +311,36 @@ namespace MP.Data.Services
await Task.Delay(1);
return answ;
}
+ ///
+ /// Delete dell'oggetto opr serializzato
+ ///
+ ///
+ ///
+ public async Task OperatoreDeleteRedis(int matrOpr)
+ {
+ string source = "REDIS";
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ bool answ = false;
+ // cerco in redis...
+ string currKey = $"{redisBaseKey}:CurrOpr:{matrOpr}";
+ RedisValue rawData = await redisDb.StringGetAsync(currKey);
+ if (rawData.HasValue)
+ {
+ var done = await ExecFlushRedisPattern(currKey);
+ if (done)
+ {
+
+ answ = true;
+ }
+ }
+ sw.Stop();
+ Log.Debug($"OperatoreDeleteRedis | {source} | {sw.Elapsed.TotalMilliseconds}ms");
+ await Task.Delay(1);
+ return answ;
+ }
+
+
///
/// legge l'hash dell'oggetto curr opr
///