Merge branch 'release/AddConfMan_02'
This commit is contained in:
+6
-1
@@ -142,7 +142,12 @@ namespace Core
|
||||
/// <summary>
|
||||
/// Upsert valori TargetList (gestiti in remoto)
|
||||
/// </summary>
|
||||
TargetListUpsert
|
||||
TargetListUpsert,
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorno di un applicazione richiamato da remoto
|
||||
/// </summary>
|
||||
TargetAppUpdate
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,8 @@ namespace LiMan.APi.Controllers
|
||||
if (CheckReqKeys(CurrRequest))
|
||||
{
|
||||
result = await dataService.ReleaseGetByApp(CurrRequest.CodApp);
|
||||
// invio notifica x app...
|
||||
dataService.TaskMessPipe.sendMessage(CurrRequest.CodImp);
|
||||
await dataService.recordCall(CurrRequest.CodApp, CurrRequest.CodApp, $"POST:api/release/getall/ | {CurrRequest.MastKey} | {CurrRequest.CodImp} | {CurrRequest.CodApp}");
|
||||
}
|
||||
return result;
|
||||
@@ -114,6 +116,8 @@ namespace LiMan.APi.Controllers
|
||||
if (CheckReqKeys(CurrRequest))
|
||||
{
|
||||
result = await dataService.ReleaseGetCritical();
|
||||
// invio notifica x app...
|
||||
dataService.TaskMessPipe.sendMessage(CurrRequest.CodImp);
|
||||
await dataService.recordCall(CurrRequest.CodApp, CurrRequest.CodApp, $"POST:api/release/getcritical/ | {CurrRequest.MastKey} | {CurrRequest.CodImp} | {CurrRequest.CodApp}");
|
||||
}
|
||||
return result;
|
||||
@@ -145,6 +149,8 @@ namespace LiMan.APi.Controllers
|
||||
dataService.InstallRelUpsert(checkRec);
|
||||
// chiamata x effettuare eventuale snapshot sulle installazioni attive
|
||||
await dataService.InstallRelHistSnapshot(false);
|
||||
// invio notifica x app...
|
||||
dataService.TaskMessPipe.sendMessage(CurrRequest.CodImp);
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(CurrRequest.CodApp, CurrRequest.CodApp, $"POST:api/release/getfilt/ | {CurrRequest.MastKey} | {CurrRequest.CodImp} | {CurrRequest.CodApp}");
|
||||
}
|
||||
@@ -163,6 +169,8 @@ namespace LiMan.APi.Controllers
|
||||
if (CheckReqKeys(CurrRequest))
|
||||
{
|
||||
result = await dataService.ReleaseGetByAppVersLimit(CurrRequest.CodApp, CurrRequest.VersMin, CurrRequest.VersMax);
|
||||
// invio notifica x app...
|
||||
dataService.TaskMessPipe.sendMessage(CurrRequest.CodImp);
|
||||
await dataService.recordCall(CurrRequest.CodApp, CurrRequest.CodApp, $"POST:api/release/getlimit/ | {CurrRequest.MastKey} | {CurrRequest.CodImp} | {CurrRequest.CodApp}");
|
||||
}
|
||||
return result;
|
||||
@@ -279,52 +287,13 @@ namespace LiMan.APi.Controllers
|
||||
if (CheckReqKeys(ManagedApp))
|
||||
{
|
||||
result = dataService.InstallRelClean(ManagedApp.CodImp, ManagedApp.AppKey, ManagedApp.ListCodApp);
|
||||
// invio notifica x app...
|
||||
dataService.TaskMessPipe.sendMessage(ManagedApp.CodImp);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Richiede un eventuale elenco di task da eseguire x il device richiedente
|
||||
/// </summary>
|
||||
/// <param name="CurrRequest">Obj AuthDataDTO con chiavi (master o app)</param>
|
||||
[HttpPost("task-pending")]
|
||||
public async Task<Dictionary<string, string>> Task2ExeRequest([FromBody] AuthDataDTO CurrRequest)
|
||||
{
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrRequest))
|
||||
{
|
||||
// FixMe ToDo !!!
|
||||
// recupera da REDIS i task da eseguire se presenti...
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(CurrRequest.CodImp, CurrRequest.CodImp, $"POST:api/release/task2exe/ | {CurrRequest.MastKey} | {CurrRequest.CodImp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// Registra esecuzoine task richiesti
|
||||
/// </summary>
|
||||
/// <param name="CurrRequest">Obj AuthDataDTO con chiavi (master o app)</param>
|
||||
[HttpPost("task-done")]
|
||||
public async Task<string> Task2ExeResult([FromBody] TaskResultDTO CurrRequest)
|
||||
{
|
||||
string result = "NA";
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrRequest))
|
||||
{
|
||||
// FixMe ToDo !!!
|
||||
// salva in redis e toglie dai task da eseguire la richiesta relativa...
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(CurrRequest.CodImp, CurrRequest.CodImp, $"POST:api/release/save-info/ | {CurrRequest.MastKey} | {CurrRequest.CodImp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
@@ -397,6 +366,9 @@ namespace LiMan.APi.Controllers
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Verifica validità richiesta
|
||||
@@ -413,9 +385,7 @@ namespace LiMan.APi.Controllers
|
||||
// verifica validità chiavi... TBD!!!
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="row">
|
||||
<div class="col-6 px-1">
|
||||
<div class="mb-1">
|
||||
<ListAppShort AppList="AppInstList"></ListAppShort>
|
||||
<ListAppShort AppList="AppInstList" EC_ReqUpdateApp="ProcReqUpdate"></ListAppShort>
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<ListInfoShort Title="License Data" DetailInfo="LicInfo" EnabAbbrev="true" MaxKeyChar="30"></ListInfoShort>
|
||||
|
||||
@@ -3,6 +3,7 @@ using LiMan.DB;
|
||||
using LiMan.DB.DTO;
|
||||
using LiMan.UI.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using Newtonsoft.Json;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using System;
|
||||
@@ -49,6 +50,29 @@ namespace LiMan.UI.Components
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Registrazione richiesta update app remota
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task ProcReqUpdate(AppRelStatusDTO selRec)
|
||||
{
|
||||
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler forzare update applicativo {selRec.CodApp} sul Device? Eventuali configurazioni presenti saranno ripristinate, altrimenti andrà verificato manualmente l'esito dell'operazione."))
|
||||
return;
|
||||
|
||||
// invio task update applicazione
|
||||
LMDService.TaskReqAdd(CodImpSel, EgwAccTask.TargetAppUpdate, selRec.CodApp);
|
||||
ReloadTaskStatus();
|
||||
ReloadTaskResults();
|
||||
// invio notifica update...
|
||||
LMDService.TaskMessPipe.sendMessage(selRec.CodApp);
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnInitialized()
|
||||
@@ -56,29 +80,6 @@ namespace LiMan.UI.Components
|
||||
LMDService.TaskMessPipe.EA_NewMessage += async (sender, e) => await TaskMessPipe_EA_NewMessage(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Evento refresh legato a ricezione evento da MessagePipe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
ReloadTaskResults();
|
||||
isLoading = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
ReloadData();
|
||||
@@ -237,33 +238,46 @@ namespace LiMan.UI.Components
|
||||
#region Private Fields
|
||||
|
||||
private List<AppRelStatusDTO> AppInstList = new List<AppRelStatusDTO>();
|
||||
|
||||
private List<DoughnutStyling> ChartColor = new List<DoughnutStyling>();
|
||||
|
||||
private double[] ChartData = new double[1];
|
||||
|
||||
private string[] ChartLabels = new string[1];
|
||||
|
||||
private string CodImpSel = "";
|
||||
|
||||
private string CodInstSel = "";
|
||||
|
||||
private int currPage = 1;
|
||||
private bool HasFlitCli = false;
|
||||
|
||||
private Dictionary<string, string> DevInfo = new Dictionary<string, string>();
|
||||
|
||||
private bool HasFiltImp = false;
|
||||
|
||||
private bool HasFlitCli = false;
|
||||
|
||||
private bool isLoading = false;
|
||||
|
||||
private Dictionary<string, string> LicInfo = new Dictionary<string, string>();
|
||||
|
||||
private int numRecord = 10;
|
||||
|
||||
private Dictionary<string, string> RunStats = new Dictionary<string, string>();
|
||||
|
||||
private bool showDetail = false;
|
||||
|
||||
private string sKey = "InstAppPareto";
|
||||
|
||||
/// <summary>
|
||||
/// Elenco task eseguiti
|
||||
/// </summary>
|
||||
private Dictionary<string, string> TaskDone = new Dictionary<string, string>();
|
||||
|
||||
private int totalCount = 0;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
private bool showDetail = false;
|
||||
|
||||
private Dictionary<string, string> DevInfo = new Dictionary<string, string>();
|
||||
private Dictionary<string, string> RunStats = new Dictionary<string, string>();
|
||||
private Dictionary<string, string> LicInfo = new Dictionary<string, string>();
|
||||
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string CssDivDetail
|
||||
@@ -480,18 +494,6 @@ namespace LiMan.UI.Components
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue update stato task
|
||||
/// </summary>
|
||||
private void ReloadTaskStatus()
|
||||
{
|
||||
TaskDone = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(CodImpSel))
|
||||
{
|
||||
TaskDone = LMDService.TaskDoneGet(CodImpSel);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rilegge risultato task come obj specifici in area DONE...
|
||||
/// </summary>
|
||||
@@ -510,7 +512,6 @@ namespace LiMan.UI.Components
|
||||
string rawData = TaskDone[devInfoKey];
|
||||
if (!string.IsNullOrEmpty(rawData) && rawData.Count() > 2)
|
||||
{
|
||||
|
||||
DevInfo = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
|
||||
}
|
||||
}
|
||||
@@ -521,7 +522,6 @@ namespace LiMan.UI.Components
|
||||
string rawData = TaskDone["RunStats"];
|
||||
if (!string.IsNullOrEmpty(rawData) && rawData.Count() > 2)
|
||||
{
|
||||
|
||||
RunStats = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
|
||||
}
|
||||
}
|
||||
@@ -531,13 +531,47 @@ namespace LiMan.UI.Components
|
||||
string rawData = TaskDone["LicInfo"];
|
||||
if (!string.IsNullOrEmpty(rawData) && rawData.Count() > 2)
|
||||
{
|
||||
|
||||
LicInfo = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue update stato task
|
||||
/// </summary>
|
||||
private void ReloadTaskStatus()
|
||||
{
|
||||
TaskDone = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(CodImpSel))
|
||||
{
|
||||
TaskDone = LMDService.TaskDoneGet(CodImpSel);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Evento refresh legato a ricezione evento da MessagePipe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
ReloadTaskResults();
|
||||
isLoading = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,7 @@ namespace LiMan.UI.Components
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Force reboot applicazione EgwACC
|
||||
@@ -225,7 +225,7 @@ namespace LiMan.UI.Components
|
||||
/// <returns></returns>
|
||||
private async Task SendReboot()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler forzare il riavvio di EgwAppControlCenter sul Deivice? In caso di update disponibile questo sarà applicato in modo automatico senza conferma utente."))
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler forzare il riavvio di EgwAppControlCenter sul Device? In caso di update disponibile questo sarà applicato in modo automatico senza conferma utente."))
|
||||
return;
|
||||
|
||||
SendTask(Core.Enum.EgwAccTask.ForceUpdate);
|
||||
|
||||
@@ -21,7 +21,15 @@
|
||||
{
|
||||
<tr>
|
||||
<td>@item.CodApp</td>
|
||||
<td class="text-end small">@item.VersNumInstall</td>
|
||||
<td class="text-end small">
|
||||
@if (item.UpToDateStatus < 4 && item.CodApp.StartsWith("IOB-"))
|
||||
{
|
||||
<button class="btn btn-sm btn-light text-success bg-opacity-50 p-1 me-2" title="Richiesta Update Remoto" @onclick="()=> RequestUpdate(item)">
|
||||
<i class="fa-solid fa-circle-up"></i>
|
||||
</button>
|
||||
}
|
||||
@item.VersNumInstall
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
using LiMan.DB.DTO;
|
||||
using LiMan.UI.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using static Core.Enum;
|
||||
using System.Threading.Tasks;
|
||||
using static EgwCoreLib.Razor.Sorter;
|
||||
|
||||
namespace LiMan.UI.Components
|
||||
@@ -14,8 +17,27 @@ namespace LiMan.UI.Components
|
||||
[Parameter]
|
||||
public List<AppRelStatusDTO> AppList { get; set; } = new List<AppRelStatusDTO>();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<AppRelStatusDTO> EC_ReqUpdateApp { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Registrazione richiesta update app remota
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task RequestUpdate(AppRelStatusDTO selRec)
|
||||
{
|
||||
await EC_ReqUpdateApp.InvokeAsync(selRec);
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected LiManDataService LMDService { get; set; } = null!;
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>2.1.2501.2112</Version>
|
||||
<Version>2.1.2501.2115</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 2.1.2501.2112</h4>
|
||||
<h4>Versione: 2.1.2501.2115</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.1.2501.2112
|
||||
2.1.2501.2115
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>2.1.2501.2112</version>
|
||||
<version>2.1.2501.2115</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user