diff --git a/MP-TAB-SERV/Components/IobInfoMan.razor b/MP-TAB-SERV/Components/IobInfoMan.razor
index 0ca74e68..190064bc 100644
--- a/MP-TAB-SERV/Components/IobInfoMan.razor
+++ b/MP-TAB-SERV/Components/IobInfoMan.razor
@@ -1,5 +1,3 @@
-
IobInfoMan
-
-@code {
-
-}
+@infosIob.IP
+@infosIob.iType
+@infosIob.name
\ No newline at end of file
diff --git a/MP-TAB-SERV/Components/IobInfoMan.razor.cs b/MP-TAB-SERV/Components/IobInfoMan.razor.cs
index e69de29b..663f2789 100644
--- a/MP-TAB-SERV/Components/IobInfoMan.razor.cs
+++ b/MP-TAB-SERV/Components/IobInfoMan.razor.cs
@@ -0,0 +1,23 @@
+using Microsoft.AspNetCore.Components;
+using MP.Data.DTO;
+using MP.Data.Services;
+
+namespace MP_TAB_SERV.Components
+{
+ public partial class IobInfoMan
+ {
+ [Parameter]
+ public string idxMacch { get; set; } = "";
+
+ [Inject]
+ protected TabDataService TabSrv { get; set; } = null!;
+
+ protected IobInfoDTO infosIob { get; set; } = new IobInfoDTO();
+
+ protected override async Task OnInitializedAsync()
+ {
+ infosIob = await TabSrv.IobInfo(idxMacch);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj
index a99c8a76..1c95f69b 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.2310.516
+ 6.16.2310.517
enable
MP_TAB_SERV
diff --git a/MP-TAB-SERV/Pages/IobInfo.razor b/MP-TAB-SERV/Pages/IobInfo.razor
index 2050c2f2..dcf4d33a 100644
--- a/MP-TAB-SERV/Pages/IobInfo.razor
+++ b/MP-TAB-SERV/Pages/IobInfo.razor
@@ -9,5 +9,5 @@ else
-
+
}
diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html
index d32cd9bc..7c4adefc 100644
--- a/MP-TAB-SERV/Resources/ChangeLog.html
+++ b/MP-TAB-SERV/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2310.516
+ Versione: 6.16.2310.517
Note di rilascio:
-
diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt
index de576d66..4dcc099c 100644
--- a/MP-TAB-SERV/Resources/VersNum.txt
+++ b/MP-TAB-SERV/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2310.516
+6.16.2310.517
diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml
index ec036ee3..2cb14e29 100644
--- a/MP-TAB-SERV/Resources/manifest.xml
+++ b/MP-TAB-SERV/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2310.516
+ 6.16.2310.517
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/DTO/IobInfoDTO.cs b/MP.Data/DTO/IobInfoDTO.cs
new file mode 100644
index 00000000..a0fd39ec
--- /dev/null
+++ b/MP.Data/DTO/IobInfoDTO.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MP.Data.DTO
+{
+ public class IobInfoDTO
+ {
+ public string name { get; set; } = "ND";
+ public string IP { get; set; } = "::1";
+ public string iType { get; set; } = "Win";
+ }
+}
diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs
index 75e34186..2e0a3dc4 100644
--- a/MP.Data/Services/TabDataService.cs
+++ b/MP.Data/Services/TabDataService.cs
@@ -1,5 +1,6 @@
using Microsoft.Extensions.Configuration;
using MP.Data.DatabaseModels;
+using MP.Data.DTO;
using Newtonsoft.Json;
using NLog;
using StackExchange.Redis;
@@ -157,6 +158,32 @@ namespace MP.Data.Services
return result;
}
+
+
+
+ public async Task IobInfo(string IdxMacchina)
+ {
+ string source = "DB";
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ IobInfoDTO? result = new IobInfoDTO();
+ // cerco in redis...
+ string currKey = $"{moonProRedisBaseKey}:{IdxMacchina}";
+ RedisValue rawData = await redisDb.StringGetAsync(currKey);
+ if (!string.IsNullOrEmpty($"{rawData}"))
+ {
+ result = JsonConvert.DeserializeObject($"{rawData}");
+ source = "REDIS";
+ }
+ if (result == null)
+ {
+ result = new IobInfoDTO();
+ }
+ sw.Stop();
+ Log.Debug($"IobInfo | {source} | {sw.Elapsed.TotalMilliseconds}ms");
+ return result;
+ }
+
public void Dispose()
{
// Clear database controller
@@ -414,6 +441,7 @@ namespace MP.Data.Services
private static Logger Log = LogManager.GetCurrentClassLogger();
private string redisBaseKey = "MP:TAB:Cache";
+ private string moonProRedisBaseKey = "MoonPro:SQL2016DEV:MoonPro:hM2IOB";
#endregion Private Fields
}