-
- 1.1.2409.1807
+ 1.1.2409.1910
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false
diff --git a/LiMan.UI/Components/ListApplicazioni.razor b/LiMan.UI/Components/ListApplicazioni.razor
index ce74132..7e9da4f 100644
--- a/LiMan.UI/Components/ListApplicazioni.razor
+++ b/LiMan.UI/Components/ListApplicazioni.razor
@@ -62,6 +62,7 @@
{
| Tipo |
Descrizione |
+ Rel. |
Db ConnString |
|
}
@@ -100,7 +101,13 @@
@record.Descrizione
|
-
+ |
+ @if (CurrVersNum(record.CodApp) != "0.0.0.0")
+ {
+ @CurrVersNum(record.CodApp)
+ }
+ |
+
@if (UserHasClaim("Admin"))
{
@record.TplConnString
diff --git a/LiMan.UI/Components/ListApplicazioni.razor.cs b/LiMan.UI/Components/ListApplicazioni.razor.cs
index 62bf62b..af4ed2a 100644
--- a/LiMan.UI/Components/ListApplicazioni.razor.cs
+++ b/LiMan.UI/Components/ListApplicazioni.razor.cs
@@ -182,6 +182,17 @@ namespace LiMan.UI.Components
#region Private Fields
+ private string CurrVersNum(string CodApp)
+ {
+ string answ = "";
+ var pUpd = Task.Run(async () =>
+ {
+ answ = await DataService.ReleaseLastGetByApp(CodApp);
+ });
+ pUpd.Wait();
+ return answ;
+ }
+
private string gridKey = "ListApplicazioni";
private List ListRecords;
diff --git a/LiMan.UI/Data/LiManDataService.cs b/LiMan.UI/Data/LiManDataService.cs
index ec5aa22..4857752 100644
--- a/LiMan.UI/Data/LiManDataService.cs
+++ b/LiMan.UI/Data/LiManDataService.cs
@@ -12,6 +12,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using NLog;
+using Org.BouncyCastle.Asn1.Pkcs;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
@@ -287,7 +288,6 @@ namespace LiMan.UI.Data
{
Log.Error($"Error during AuthClaimByUserID:{Environment.NewLine}{exc}");
}
- //return await Task.FromResult(dbResult);
return dbResult;
}
@@ -934,6 +934,54 @@ namespace LiMan.UI.Data
///
public async Task> ReleaseGetByApp(string CodApp)
{
+ string source = "DB";
+ List? dbResult = new List();
+ try
+ {
+ string currKey = $"{Const.rKeyConfig}:App:AllRel:{CodApp}";
+ Stopwatch stopWatch = new Stopwatch();
+ stopWatch.Start();
+ string? rawData = await redisDb.StringGetAsync(currKey);
+ if (!string.IsNullOrEmpty(rawData))
+ {
+ source = "REDIS";
+ var tempResult = JsonConvert.DeserializeObject>(rawData);
+ if (tempResult == null)
+ {
+ dbResult = new List();
+ }
+ else
+ {
+ dbResult = tempResult;
+ }
+ }
+ else
+ {
+ dbResult = dbControllerNext.ReleaseGetByApp(CodApp);
+ rawData = JsonConvert.SerializeObject(dbResult, JSSettings);
+ await redisDb.StringSetAsync(currKey, rawData, LongCache);
+ // per evitare loopback uso deserialize...
+ var tempResult = JsonConvert.DeserializeObject>(rawData);
+ if (tempResult != null)
+ {
+ dbResult = tempResult;
+ }
+ }
+ if (dbResult == null)
+ {
+ dbResult = new List();
+ }
+ stopWatch.Stop();
+ TimeSpan ts = stopWatch.Elapsed;
+ Log.Debug($"ReleaseGetByApp | {source} in: {ts.TotalMilliseconds} ms");
+ }
+ catch (Exception exc)
+ {
+ Log.Error($"Error during ReleaseGetByApp:{Environment.NewLine}{exc}");
+ }
+ return dbResult;
+
+#if false
await Task.Delay(1);
List dbResult = new List();
Stopwatch stopWatch = new Stopwatch();
@@ -942,7 +990,39 @@ namespace LiMan.UI.Data
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per ReleaseGetByApp | {CodApp} | {ts.TotalMilliseconds} ms");
- return dbResult;
+ return dbResult;
+#endif
+ }
+
+ ///
+ /// Ultima Release dato Applicativo
+ ///
+ /// Codice Applicazione
+ ///
+ public async Task ReleaseLastGetByApp(string CodApp)
+ {
+ string answ = "";
+ RedisKey currKey = $"{Const.rKeyConfig}:App:CurrRel";
+ var rawVal = await redisDb.HashGetAsync(currKey, CodApp);
+ if (rawVal.HasValue)
+ {
+ answ = $"{rawVal}";
+ }
+ else
+ {
+ var rawList = await ReleaseGetByApp(CodApp);
+ if (rawList != null)
+ {
+ var lastRel = rawList
+ .OrderByDescending(x => x.VersVal)
+ .ThenByDescending(x => x.ReleaseDate)
+ .FirstOrDefault() ?? new ReleaseModel() { CodApp = CodApp };
+ answ = lastRel.VersNum;
+ // salvo su redis tab...
+ await redisDb.HashSetAsync(currKey, CodApp, answ);
+ }
+ }
+ return answ;
}
///
diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj
index fb648ba..f48cf8f 100644
--- a/LiMan.UI/LiMan.UI.csproj
+++ b/LiMan.UI/LiMan.UI.csproj
@@ -2,7 +2,7 @@
net6.0
- 1.1.2409.1807
+ 1.1.2409.1910
LiMan.UI
LiMan.UI
diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html
index d997f84..21bb0bd 100644
--- a/LiMan.UI/Resources/ChangeLog.html
+++ b/LiMan.UI/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 1.1.2409.1807
+ Versione: 1.1.2409.1910
Note di rilascio:
-
diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt
index e130097..2c7f5a0 100644
--- a/LiMan.UI/Resources/VersNum.txt
+++ b/LiMan.UI/Resources/VersNum.txt
@@ -1 +1 @@
-1.1.2409.1807
+1.1.2409.1910
diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml
index 7ed87fd..5f8f799 100644
--- a/LiMan.UI/Resources/manifest.xml
+++ b/LiMan.UI/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.1.2409.1807
+ 1.1.2409.1910
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false
|