diff --git a/Core/Const.cs b/Core/Const.cs
index 51aec76..db6b319 100644
--- a/Core/Const.cs
+++ b/Core/Const.cs
@@ -12,6 +12,7 @@ namespace Core
// classi utilità x cache REDIS dati DB
public const string redisBaseAddr = "LiMan:Ui";
public const string rKeyConfig = $"{redisBaseAddr}:Cache";
- public const string ENR_MSG_PIPE = $"{redisBaseAddr}:Enroll:Messages";
+ public const string ENRL_MSG_PIPE = $"{redisBaseAddr}:MPipe:Enroll";
+ public const string TASK_MSG_PIPE = $"{redisBaseAddr}:MPipe:Tasks";
}
}
diff --git a/LiMan.Api/Data/ApiDataService.cs b/LiMan.Api/Data/ApiDataService.cs
index b4259e1..b89d9e4 100644
--- a/LiMan.Api/Data/ApiDataService.cs
+++ b/LiMan.Api/Data/ApiDataService.cs
@@ -65,7 +65,8 @@ namespace LiMan.APi.Data
};
// conf messagepipe: setup canali pub/sub
- EnrollMessPipe = new MessagePipe(redisConn, Const.ENR_MSG_PIPE);
+ EnrollMessPipe = new MessagePipe(redisConn, Const.ENRL_MSG_PIPE);
+ TaskMessPipe = new MessagePipe(redisConn, Const.TASK_MSG_PIPE);
// conf DB
string connStrDB = _configuration.GetConnectionString("LiMan.DB");
@@ -88,6 +89,10 @@ namespace LiMan.APi.Data
/// Wrapper x invio/ricezione messaggi sul canale dedicato agli eventi enroll
///
public MessagePipe EnrollMessPipe { get; set; } = null!;
+ ///
+ /// Wrapper x invio/ricezione messaggi sul canale dedicato agli eventi Task
+ ///
+ public MessagePipe TaskMessPipe { get; set; } = null!;
#endregion Public Properties
@@ -1127,6 +1132,8 @@ namespace LiMan.APi.Data
redisHashKeyDelete(reqKey, res.Key);
done += answ ? 1 : 0;
}
+ // invio string in messagepipe x forzare refresh...
+ TaskMessPipe.sendMessage(CodImp);
return done;
}
@@ -1151,6 +1158,8 @@ namespace LiMan.APi.Data
redisHashKeyDelete(runKey, res.Key);
done += answ ? 1 : 0;
}
+ // invio string in messagepipe x forzare refresh...
+ TaskMessPipe.sendMessage(CodImp);
return done;
}
@@ -1190,6 +1199,8 @@ namespace LiMan.APi.Data
{
answ.TryAdd(item.Key, item.Value);
}
+ // invio string in messagepipe x forzare refresh...
+ TaskMessPipe.sendMessage(CodImp);
return answ;
}
diff --git a/LiMan.Api/Resources/ChangeLog.html b/LiMan.Api/Resources/ChangeLog.html
index 85af114..821d18e 100644
--- a/LiMan.Api/Resources/ChangeLog.html
+++ b/LiMan.Api/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2501.1717
+ Versione: 2.1.2501.1814
Note di rilascio:
-
diff --git a/LiMan.Api/Resources/VersNum.txt b/LiMan.Api/Resources/VersNum.txt
index 8c10e37..4604f72 100644
--- a/LiMan.Api/Resources/VersNum.txt
+++ b/LiMan.Api/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2501.1717
+2.1.2501.1814
diff --git a/LiMan.Api/Resources/manifest.xml b/LiMan.Api/Resources/manifest.xml
index 7188436..f756601 100644
--- a/LiMan.Api/Resources/manifest.xml
+++ b/LiMan.Api/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2501.1717
+ 2.1.2501.1814
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false
diff --git a/LiMan.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html
index 29eeae5..5ae4385 100644
--- a/LiMan.Transfer/Resources/ChangeLog.html
+++ b/LiMan.Transfer/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
-
Versione: 2.1.2501.1717
+ Versione: 2.1.2501.1814
Note di rilascio:
diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt
index 8c10e37..4604f72 100644
--- a/LiMan.Transfer/Resources/VersNum.txt
+++ b/LiMan.Transfer/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2501.1717
+2.1.2501.1814
diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml
index 531071a..03f135f 100644
--- a/LiMan.Transfer/Resources/manifest.xml
+++ b/LiMan.Transfer/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2501.1717
+ 2.1.2501.1814
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/EnrollList.razor.cs b/LiMan.UI/Components/EnrollList.razor.cs
index 729f66b..503b884 100644
--- a/LiMan.UI/Components/EnrollList.razor.cs
+++ b/LiMan.UI/Components/EnrollList.razor.cs
@@ -43,7 +43,6 @@ namespace LiMan.UI.Components
///
public virtual void Dispose()
{
- //LMDService.EnrollMessPipe.EA_NewMessage -= EnrollMessPipe_EA_NewMessage;
LMDService.EnrollMessPipe.EA_NewMessage -= async (sender, e) => await EnrollMessPipe_EA_NewMessage(sender, e);
}
diff --git a/LiMan.UI/Components/InstAppPareto.razor b/LiMan.UI/Components/InstAppPareto.razor
index 7069b4b..9736eaa 100644
--- a/LiMan.UI/Components/InstAppPareto.razor
+++ b/LiMan.UI/Components/InstAppPareto.razor
@@ -16,7 +16,8 @@
-
| # Lic.
+ |
+ # Lic.
|
@@ -55,6 +56,7 @@
@@ -90,11 +94,22 @@
Detail Info
-
- - TDB Info 1
- - TDB Info 2
- - TDB Info 3
-
+ @if (showDetail)
+ {
+
+ @foreach (var item in DetailData)
+ {
+ -
+
+ @item.Key
+
+
+ @item.Value
+
+
+ }
+
+ }
diff --git a/LiMan.UI/Components/InstAppPareto.razor.cs b/LiMan.UI/Components/InstAppPareto.razor.cs
index a2d28c7..bf0fa4a 100644
--- a/LiMan.UI/Components/InstAppPareto.razor.cs
+++ b/LiMan.UI/Components/InstAppPareto.razor.cs
@@ -1,4 +1,5 @@
using EgwCoreLib.Razor.Data;
+using LiMan.DB;
using LiMan.DB.DTO;
using LiMan.UI.Data;
using Microsoft.AspNetCore.Components;
@@ -27,7 +28,7 @@ namespace LiMan.UI.Components
public void Dispose()
{
- //MServ.EA_TaskUpdate -= MServ_EA_TaskUpdate;
+ LMDService.TaskMessPipe.EA_NewMessage -= async (sender, e) => await TaskMessPipe_EA_NewMessage(sender, e);
}
#endregion Public Methods
@@ -50,7 +51,30 @@ namespace LiMan.UI.Components
protected override void OnInitialized()
{
- //MServ.EA_TaskUpdate += MServ_EA_TaskUpdate;
+ LMDService.TaskMessPipe.EA_NewMessage += async (sender, e) => await TaskMessPipe_EA_NewMessage(sender, e);
+ }
+
+ ///
+ /// Evento refresh legato a ricezione evento da MessagePipe
+ ///
+ ///
+ ///
+ private async Task TaskMessPipe_EA_NewMessage(object sender, EventArgs e)
+ {
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // qualsiasi messaggio fa scattare reload data
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ // verifico se sia il cod impianto selezionato, nel faso forzo refreesh...
+ if (!string.IsNullOrEmpty(CodImpSel) && CodImpSel.Equals(currArgs.newMessage))
+ {
+ isLoading = true;
+ ReloadTaskStatus();
+ await ReloadTaskResults();
+ isLoading = false;
+ await InvokeAsync(StateHasChanged);
+ }
+ }
}
protected override void OnParametersSet()
@@ -191,6 +215,31 @@ namespace LiMan.UI.Components
#endregion Private Fields
+ private string cssNumPill(int numRec)
+ {
+ return numRec > 0 ? "text-bg-primary" : "text-bg-secondary";
+ }
+
+ private bool showDetail = false;
+
+ private Dictionary DetailData = new Dictionary();
+
+ private void showDetReq()
+ {
+ showDetail = true;
+ DetailData = new Dictionary(TaskReq);
+ }
+ private void showDetRun()
+ {
+ showDetail = true;
+ DetailData = new Dictionary(TaskRun);
+ }
+ private void showDetDone()
+ {
+ showDetail = true;
+ DetailData = new Dictionary(TaskDone);
+ }
+
#region Private Properties
private string CssDivDetail
@@ -421,6 +470,18 @@ namespace LiMan.UI.Components
}
}
+ ///
+ /// Rilegge risultato task come obj specifici in area DONE...
+ ///
+ ///
+ private async Task ReloadTaskResults()
+ {
+ if (TaskDone != null && TaskDone.Count > 0)
+ {
+ await Task.Delay(100);
+ }
+ }
+
#endregion Private Methods
}
}
\ No newline at end of file
diff --git a/LiMan.UI/Components/InstallInfoStats.razor b/LiMan.UI/Components/InstallInfoStats.razor
index aaa9bd6..ecb8e7a 100644
--- a/LiMan.UI/Components/InstallInfoStats.razor
+++ b/LiMan.UI/Components/InstallInfoStats.razor
@@ -96,15 +96,7 @@
@if (HasFiltImpiego)
{
-
}
diff --git a/LiMan.UI/Components/InstallInfoStats.razor.cs b/LiMan.UI/Components/InstallInfoStats.razor.cs
index 6252ea5..95aedc5 100644
--- a/LiMan.UI/Components/InstallInfoStats.razor.cs
+++ b/LiMan.UI/Components/InstallInfoStats.razor.cs
@@ -18,6 +18,7 @@ namespace LiMan.UI.Components
public void Dispose()
{
LMDService.EnrollMessPipe.EA_NewMessage -= async (sender, e) => await EnrollMessPipe_EA_NewMessage(sender, e);
+ LMDService.TaskMessPipe.EA_NewMessage -= async (sender, e) => await TaskMessPipe_EA_NewMessage(sender, e);
MServ.EA_SelCodImp -= async () => await MServ_EA_SelCodImp();
MServ.EA_SelCodInst -= async () => await MServ_EA_SelCodInst();
}
@@ -61,6 +62,7 @@ namespace LiMan.UI.Components
protected override async Task OnInitializedAsync()
{
LMDService.EnrollMessPipe.EA_NewMessage += async (sender, e) => await EnrollMessPipe_EA_NewMessage(sender, e);
+ LMDService.TaskMessPipe.EA_NewMessage += async (sender, e) => await TaskMessPipe_EA_NewMessage(sender, e);
MServ.EA_SelCodImp += async () => await MServ_EA_SelCodImp();
MServ.EA_SelCodInst += async () => await MServ_EA_SelCodInst();
await ReloadLicData();
@@ -134,6 +136,64 @@ namespace LiMan.UI.Components
}
}
+ ///
+ /// Evento refresh legato a ricezione evento da MessagePipe
+ ///
+ ///
+ ///
+ private async Task TaskMessPipe_EA_NewMessage(object sender, EventArgs e)
+ {
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // qualsiasi messaggio fa scattare reload data
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ // verifico se sia il cod impianto selezionato, nel faso forzo refreesh...
+ if (!string.IsNullOrEmpty(CodImpSel) && CodImpSel.Equals(currArgs.newMessage))
+ {
+ isLoading = true;
+ ReloadTaskStatus();
+ isLoading = false;
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ }
+
+ ///
+ /// Esegue update stato task
+ ///
+ private void ReloadTaskStatus()
+ {
+ TaskReq = new Dictionary();
+ TaskRun = new Dictionary();
+ TaskDone = new Dictionary();
+ if (!string.IsNullOrEmpty(CodImpSel))
+ {
+ TaskReq = LMDService.TaskReqGet(CodImpSel);
+ TaskRun = LMDService.TaskRunGet(CodImpSel);
+ TaskDone = LMDService.TaskDoneGet(CodImpSel);
+ }
+ }
+
+ private string BtnState(int numRec)
+ {
+ return numRec > 0 ? "btn-primary" : "btn-secondary";
+ }
+
+ ///
+ /// Lista Task in stato DONE
+ ///
+ private Dictionary TaskDone = new Dictionary();
+
+ ///
+ /// Lista Task in stato REQUESTED
+ ///
+ private Dictionary TaskReq = new Dictionary();
+
+ ///
+ /// Lista Task in stato RUNNING
+ ///
+ private Dictionary TaskRun = new Dictionary();
+
///
/// Selezionato CodImp (PC)
///
@@ -147,6 +207,7 @@ namespace LiMan.UI.Components
DetailFilt.Clear();
DetailFilt.Add("Cliente", MServ.UsrParamGet("Cliente"));
DetailFilt.Add("PC", MServ.UsrParamGet("PcInst"));
+ ReloadTaskStatus();
isLoading = false;
await InvokeAsync(StateHasChanged);
}
@@ -230,8 +291,14 @@ namespace LiMan.UI.Components
optPar = string.IsNullOrEmpty(optPar) ? $"{DateTime.Now:yyyy-MM-dd HH:mm:ss}" : optPar;
// registro la richiesta
LMDService.TaskReqAdd(CodImpSel, reqTask, optPar);
+ // aggiorno stato...
+ ReloadTaskStatus();
// mando notifica con messageservice...
MServ.ReportTaskChange();
+#if false
+ // invio string in messagepipe x forzare refresh...
+ LMDService.TaskMessPipe.sendMessage(CodImpSel);
+#endif
}
}
diff --git a/LiMan.UI/Components/ListAppShort.razor b/LiMan.UI/Components/ListAppShort.razor
index 974221f..ad3fef8 100644
--- a/LiMan.UI/Components/ListAppShort.razor
+++ b/LiMan.UI/Components/ListAppShort.razor
@@ -3,16 +3,22 @@
- | Applicazioni Gestite |
+
+ Applicazione
+
+ |
+
+ Versione
+
+ |
@foreach (var item in ListRecord)
{
- |
- @item.CodApp
- |
+ @item.CodApp |
+ @item.VersNumInstall |
}
diff --git a/LiMan.UI/Components/ListAppShort.razor.cs b/LiMan.UI/Components/ListAppShort.razor.cs
index 8618ba7..3b55a6e 100644
--- a/LiMan.UI/Components/ListAppShort.razor.cs
+++ b/LiMan.UI/Components/ListAppShort.razor.cs
@@ -1,7 +1,9 @@
using LiMan.DB.DTO;
+using LiMan.UI.Data;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Linq;
+using static EgwCoreLib.Razor.Sorter;
namespace LiMan.UI.Components
{
@@ -14,6 +16,13 @@ namespace LiMan.UI.Components
#endregion Public Properties
+ #region Protected Properties
+
+ [Inject]
+ protected MessageService MServ { get; set; } = null!;
+
+ #endregion Protected Properties
+
#region Protected Methods
protected override void OnParametersSet()
@@ -35,6 +44,18 @@ namespace LiMan.UI.Components
isLoading = false;
}
+ protected void SortRequested(SortCallBack e)
+ {
+ isLoading = true;
+ if (sortField == e.ParamName)
+ {
+ sortAsc = e.IsAscending;
+ }
+ sortField = e.ParamName;
+ ReloadData();
+ isLoading = false;
+ }
+
#endregion Protected Methods
#region Private Fields
@@ -44,20 +65,77 @@ namespace LiMan.UI.Components
private List ListRecord = new List();
private int numRecord = 10;
private List SearchRecord = new List();
+ private string sKey = "ListAppShort";
private int totalCount = 0;
#endregion Private Fields
+ #region Private Properties
+
+ private bool sortAsc
+ {
+ get
+ {
+ bool answ = false;
+ var sVal = MServ.UsrParamGet($"{sKey}_sort");
+ if (!string.IsNullOrEmpty(sVal))
+ {
+ bool.TryParse(sVal, out answ);
+ }
+ return answ;
+ }
+ set => MServ.UsrParamSet($"{sKey}_sort", $"{value}");
+ }
+
+ private string sortField
+ {
+ get => MServ.UsrParamGet($"{sKey}_field");
+ set => MServ.UsrParamSet($"{sKey}_field", $"{value}");
+ }
+
+ #endregion Private Properties
+
#region Private Methods
private void ReloadData()
{
- totalCount = AppList.Count;
SearchRecord = AppList
.OrderBy(x => x.CodApp)
.ToList();
+ totalCount = SearchRecord.Count;
// sistemo tabella
- ListRecord = AppList
+ switch (sortField)
+ {
+ case "CodApp":
+ if (sortAsc)
+ {
+ SearchRecord = SearchRecord.OrderBy(x => x.CodApp).ThenByDescending(x => x.VersNumInstall).ToList();
+ }
+ else
+ {
+ SearchRecord = SearchRecord.OrderByDescending(x => x.CodApp).ThenByDescending(x => x.VersNumInstall).ToList();
+ }
+ break;
+
+ case "VersNumInstall":
+ if (sortAsc)
+ {
+ SearchRecord = SearchRecord.OrderBy(x => x.VersNumInstall).ThenByDescending(x => x.CodApp).ToList();
+ }
+ else
+ {
+ SearchRecord = SearchRecord.OrderByDescending(x => x.VersNumInstall).ThenByDescending(x => x.CodApp).ToList();
+ }
+ break;
+
+ default:
+ SearchRecord = SearchRecord
+ .OrderBy(x => x.CodApp)
+ .ThenByDescending(x => x.VersNumInstall)
+ .ToList();
+ break;
+ }
+ ListRecord = SearchRecord
.Skip((currPage - 1) * numRecord)
.Take(numRecord)
.ToList();
diff --git a/LiMan.UI/Data/LiManDataService.cs b/LiMan.UI/Data/LiManDataService.cs
index 393fa2f..f35c7d5 100644
--- a/LiMan.UI/Data/LiManDataService.cs
+++ b/LiMan.UI/Data/LiManDataService.cs
@@ -53,7 +53,8 @@ namespace LiMan.UI.Data
};
// conf messagepipe: setup canali pub/sub
- EnrollMessPipe = new MessagePipe(redisConn, Const.ENR_MSG_PIPE);
+ EnrollMessPipe = new MessagePipe(redisConn, Const.ENRL_MSG_PIPE);
+ TaskMessPipe = new MessagePipe(redisConn, Const.TASK_MSG_PIPE);
_emailSender = emailSender;
// conf cache
@@ -82,6 +83,10 @@ namespace LiMan.UI.Data
/// Wrapper x invio/ricezione messaggi sul canale dedicato agli eventi enroll
///
public MessagePipe EnrollMessPipe { get; set; } = null!;
+ ///
+ /// Wrapper x invio/ricezione messaggi sul canale dedicato agli eventi Task
+ ///
+ public MessagePipe TaskMessPipe { get; set; } = null!;
#endregion Public Properties
diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj
index be1e951..9331efd 100644
--- a/LiMan.UI/LiMan.UI.csproj
+++ b/LiMan.UI/LiMan.UI.csproj
@@ -2,7 +2,7 @@
net6.0
- 2.1.2501.1717
+ 2.1.2501.1814
LiMan.UI
LiMan.UI
diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html
index 85af114..821d18e 100644
--- a/LiMan.UI/Resources/ChangeLog.html
+++ b/LiMan.UI/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
License Manager
- Versione: 2.1.2501.1717
+ Versione: 2.1.2501.1814
Note di rilascio:
-
diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt
index 8c10e37..4604f72 100644
--- a/LiMan.UI/Resources/VersNum.txt
+++ b/LiMan.UI/Resources/VersNum.txt
@@ -1 +1 @@
-2.1.2501.1717
+2.1.2501.1814
diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml
index 7188436..f756601 100644
--- a/LiMan.UI/Resources/manifest.xml
+++ b/LiMan.UI/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 2.1.2501.1717
+ 2.1.2501.1814
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip
https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html
false
|