diff --git a/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs b/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs
index c7be39bf..2458baa7 100644
--- a/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs
+++ b/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs
@@ -16,6 +16,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
public class ConfigDataService : BaseServ
{
+ #region Public Constructors
public ConfigDataService(IConfiguration configuration, IConnectionMultiplexer RedisConn) : base(configuration, RedisConn)
{
@@ -23,11 +24,15 @@ namespace EgwCoreLib.Lux.Data.Services
Log.Info($"ConfigDataService | Init OK");
}
+ #endregion Public Constructors
+
+ #region Public Methods
+
///
- /// restituisce l'elenco dell'HW valido in memoria
+ /// Restituisce l'elenco dell'HW valido da cache REDIS
///
///
- public List ElencoHw(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB")
+ public List HwModelList(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB")
{
List result = new List();
// leggo obj da redis cache
@@ -38,16 +43,36 @@ namespace EgwCoreLib.Lux.Data.Services
{
var currList = JsonConvert.DeserializeObject>($"{rawData}");
result = currList ?? new List();
- //var currList = JsonConvert.DeserializeObject($"{rawData}");
- //if (currList != null && currList.ListItem != null)
- //{
- // result = currList.ListItem;
- //}
}
return result;
}
+ ///
+ /// Restituisce l'elenco dei profili da cache REDIS
+ ///
+ ///
+ public List ProfileList(Constants.EXECENVIRONMENTS execEnvironment, string ProfReq = "Default")
+ {
+ List result = new List();
+ // leggo obj da redis cache
+ var currKey = $"{redisBaseKey}:{execEnvironment}:PROFLIST:{ProfReq}";
+ RedisValue rawData = redisDb.StringGet(currKey);
+ // prendo solo i valori validi (Description <> FamilyName)
+ if (rawData.HasValue)
+ {
+ var currList = JsonConvert.DeserializeObject>($"{rawData}");
+ result = currList ?? new List();
+ }
+ return result;
+ }
+
+ #endregion Public Methods
+
+ #region Private Fields
+
private static Logger Log = LogManager.GetCurrentClassLogger();
private string redisBaseKey = "Lux";
+
+ #endregion Private Fields
}
-}
+}
\ No newline at end of file
diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs
index f3aa2c83..8f3fbb5d 100644
--- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs
+++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs
@@ -27,6 +27,7 @@ namespace EgwCoreLib.Lux.Data.Services
calcTag = _config.GetValue("ServerConf:ImageCalcTag") ?? "svg-preview";
bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "Egw:bom";
hmlChannel = _config.GetValue("ServerConf:HwListChannel") ?? "Egw:hml";
+ profListChannel = _config.GetValue("ServerConf:ProfListChannel") ?? "Egw:prof";
updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw:update";
// verifico la url base
apiUrl = _config.GetValue("ServerConf:Prog.ApiUrl") ?? "https://iis01.egalware.com/lux/srv/api";
diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs
index a076ceb5..479b52aa 100644
--- a/Lux.API/Controllers/WindowController.cs
+++ b/Lux.API/Controllers/WindowController.cs
@@ -128,7 +128,7 @@ namespace Lux.API.Controllers
Stopwatch sw = new Stopwatch();
sw.Start();
string hwReq = id ?? "HW.AGB";
- var answ = _confService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, hwReq);
+ var answ = _confService.HwModelList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, hwReq);
if (answ == null || answ.Count == 0)
{
await sendHwReq();
diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs
index e37b68fc..98252058 100644
--- a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs
+++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs
@@ -59,7 +59,7 @@ namespace Lux.UI.Components.Compo.Config
#region Protected Methods
///
- /// Reset selezione
+ /// Richiesta update elenco HW preferiti/configurati
///
protected async Task DoReqUpdate()
{
@@ -143,7 +143,7 @@ namespace Lux.UI.Components.Compo.Config
///
/// Effettua vera richiesta della BOM
///
- ///
+ ///
///
private async Task callRefreshHwList(string reqUid)
{
@@ -171,7 +171,6 @@ namespace Lux.UI.Components.Compo.Config
///
///
///
- ///
private void PipeHwList_EA_NewMessage(object? sender, EventArgs e)
{
ReloadData();
@@ -182,7 +181,7 @@ namespace Lux.UI.Components.Compo.Config
private void ReloadData()
{
isLoading = true;
- AllRecords = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, confHw);
+ AllRecords = CDService.HwModelList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, confHw);
// se ho ricerca testuale faccio filtro ulteriore...
if (string.IsNullOrEmpty(SearchVal))
{
diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor
index 40a2a35e..af861de3 100644
--- a/Lux.UI/Components/Compo/Config/ProfileMan.razor
+++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor
@@ -1,8 +1,13 @@