Merge branch 'release/AddRelMan02'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2409.1716</h4>
|
||||
<h4>Versione: 1.1.2409.1807</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2409.1716
|
||||
1.1.2409.1807
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2409.1716</version>
|
||||
<version>1.1.2409.1807</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -136,6 +136,6 @@
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="PagerReloadNum" numPageChanged="PagerReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNum" numPageChanged="SetPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@ namespace LiMan.UI.Components
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AppMService.EA_UserNameUpd -= AppMessages_EA_UserNameUpd;
|
||||
AppMServ.EA_UserNameUpd -= AppMessages_EA_UserNameUpd;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
@@ -56,7 +56,25 @@ namespace LiMan.UI.Components
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; }
|
||||
protected MessageService AppMServ { get; set; }
|
||||
|
||||
protected string AppTipoSel
|
||||
{
|
||||
get => appTipoSel;
|
||||
set
|
||||
{
|
||||
if (appTipoSel != value)
|
||||
{
|
||||
currPage = 1;
|
||||
appTipoSel = value;
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ReloadAllData();
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected LiManDataService DataService { get; set; }
|
||||
@@ -124,53 +142,31 @@ namespace LiMan.UI.Components
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.EA_UserNameUpd += AppMessages_EA_UserNameUpd;
|
||||
userName = AppMService.UserName;
|
||||
AppMServ.EA_UserNameUpd += AppMessages_EA_UserNameUpd;
|
||||
userName = AppMServ.UserName;
|
||||
numRecord = await AppMServ.NumRowGridGet(gridKey);
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task PagerReloadNum(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected async Task PagerReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected async Task ResetData()
|
||||
{
|
||||
await fullReload();
|
||||
}
|
||||
|
||||
private Dictionary<string, string> ListAppType
|
||||
protected async Task SetNum(int newNum)
|
||||
{
|
||||
get => Core.Enum.AppType;
|
||||
numRecord = newNum;
|
||||
await AppMServ.NumRowGridSet(gridKey, newNum);
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected string AppTipoSel
|
||||
protected async Task SetPage(int newNum)
|
||||
{
|
||||
get => appTipoSel;
|
||||
set
|
||||
{
|
||||
if (appTipoSel != value)
|
||||
{
|
||||
currPage = 1;
|
||||
appTipoSel = value;
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ReloadAllData();
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
currPage = newNum;
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
private string appTipoSel { get; set; } = "";
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
@@ -186,39 +182,51 @@ namespace LiMan.UI.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string gridKey = "ListApplicazioni";
|
||||
private List<ApplicativoModel> ListRecords;
|
||||
|
||||
private ApplicativoModel recordEdit = null;
|
||||
|
||||
private ApplicativoModel recordSel = null;
|
||||
|
||||
private List<ApplicativoModel> SearchRecords;
|
||||
|
||||
private string userName = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string appTipoSel { get; set; } = "";
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppMService.PageNum;
|
||||
return AppMServ.PageNum;
|
||||
}
|
||||
set
|
||||
{
|
||||
AppMService.PageNum = value;
|
||||
AppMServ.PageNum = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private Dictionary<string, string> ListAppType
|
||||
{
|
||||
get => Core.Enum.AppType;
|
||||
}
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppMService.PageSize;
|
||||
return AppMServ.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
AppMService.PageSize = value;
|
||||
AppMServ.PageSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +236,7 @@ namespace LiMan.UI.Components
|
||||
|
||||
private void AppMessages_EA_UserNameUpd()
|
||||
{
|
||||
userName = AppMService.UserName;
|
||||
userName = AppMServ.UserName;
|
||||
}
|
||||
|
||||
private async Task fullReload()
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Applicazione</th>
|
||||
<th class="text-lect">Rilascio</th>
|
||||
<th class="text-right">Vers. Num</th>
|
||||
<th class="text-right">Vers. Text</th>
|
||||
<th class="text-right">Tags</th>
|
||||
<th class="text-start">Rilascio</th>
|
||||
<th class="text-end">Vers. Num</th>
|
||||
<th class="text-end">Vers. Text</th>
|
||||
<th class="text-end">Tags</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -59,19 +59,23 @@
|
||||
<td>
|
||||
<b>@record.CodApp</b>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td class="text-start">
|
||||
@($"{record.ReleaseDate:yyyy.MM.dd}")
|
||||
<div class="small">
|
||||
|
||||
@($"{record.ReleaseDate:ddd, HH:mm:ss}")
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td class="text-end">
|
||||
@record.VersNum
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td class="text-end">
|
||||
@record.VersText
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td class="text-end">
|
||||
@record.RelTags
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td class="text-end">
|
||||
@if (recordEdit == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" @onclick="() => DoDelete(record)" title="Edit record"><i class="fas fa-trash"></i></button>
|
||||
@@ -88,6 +92,6 @@
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="PagerReloadNum" numPageChanged="PagerReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,6 +42,9 @@ namespace LiMan.UI.Components
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected LiManDataService DataService { get; set; }
|
||||
|
||||
@@ -60,9 +63,6 @@ namespace LiMan.UI.Components
|
||||
};
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
protected async Task DoDelete(ReleaseModel rec2del)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler eliminare il record?"))
|
||||
@@ -83,19 +83,25 @@ namespace LiMan.UI.Components
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
numRecord = await AppMServ.NumRowGridGet(gridKey);
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task PagerReloadNum(int newNum)
|
||||
protected async Task SetNumRec(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
await AppMServ.NumRowGridSet(gridKey, newNum);
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected async Task PagerReloadPage(int newNum)
|
||||
protected async Task SetPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
await ReloadAllData();
|
||||
@@ -106,6 +112,7 @@ namespace LiMan.UI.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string gridKey = "ListRelease";
|
||||
private List<ReleaseModel> ListRecords;
|
||||
|
||||
private ReleaseModel recordEdit = null;
|
||||
@@ -120,6 +127,9 @@ namespace LiMan.UI.Components
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
private IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
private int numRecord { get; set; } = 10;
|
||||
|
||||
private int totalCount { get; set; } = 0;
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace LiMan.UI.Components
|
||||
ListApp = await DataService.ApplicazioniNextGetAll();
|
||||
ListInstall = await DataService.InstallazioniNextGetAll();
|
||||
//bool StatoRichiesta = true;
|
||||
//SearchRecords = await DataService.LicenzeNextGetFilt(AppMService.DetailDBFilter);
|
||||
//SearchRecords = await DataService.LicenzeNextGetFilt(AppMServ.DetailDBFilter);
|
||||
SearchRecords = await DataService.TicketsGetFilt(true, SelApp, SelInst);
|
||||
//totalCount = SearchRecords.Count();
|
||||
//AllRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
using LiMan.DB.DBModels;
|
||||
using Blazored.LocalStorage;
|
||||
using LiMan.DB.DBModels;
|
||||
using Microsoft.AspNetCore.Session;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.UI.Data
|
||||
{
|
||||
public class MessageService
|
||||
{
|
||||
public MessageService(ILocalStorageService genLocalStorage)
|
||||
{
|
||||
// gestione sessioni in browser
|
||||
localStore = genLocalStorage;
|
||||
}
|
||||
#region Public Events
|
||||
|
||||
public event Action EA_FilterUpdated;
|
||||
@@ -89,20 +97,6 @@ namespace LiMan.UI.Data
|
||||
}
|
||||
}
|
||||
}
|
||||
public string UserName
|
||||
{
|
||||
get => _userName;
|
||||
set
|
||||
{
|
||||
if (_userName != value)
|
||||
{
|
||||
_userName = value;
|
||||
ReportUserUpd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string PageName
|
||||
{
|
||||
@@ -118,6 +112,7 @@ namespace LiMan.UI.Data
|
||||
}
|
||||
|
||||
public int PageNum { get; set; } = 1;
|
||||
|
||||
public int PageSize { get; set; } = 10;
|
||||
|
||||
public string SearchVal
|
||||
@@ -163,6 +158,19 @@ namespace LiMan.UI.Data
|
||||
}
|
||||
}
|
||||
|
||||
public string UserName
|
||||
{
|
||||
get => _userName;
|
||||
set
|
||||
{
|
||||
if (_userName != value)
|
||||
{
|
||||
_userName = value;
|
||||
ReportUserUpd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Fields
|
||||
@@ -180,7 +188,6 @@ namespace LiMan.UI.Data
|
||||
|
||||
#region Private Methods
|
||||
|
||||
|
||||
private void ReportPageUpd()
|
||||
{
|
||||
if (EA_PageUpdated != null)
|
||||
@@ -188,13 +195,6 @@ namespace LiMan.UI.Data
|
||||
EA_PageUpdated?.Invoke();
|
||||
}
|
||||
}
|
||||
private void ReportUserUpd()
|
||||
{
|
||||
if (EA_UserNameUpd != null)
|
||||
{
|
||||
EA_UserNameUpd?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private void ReportSearch()
|
||||
{
|
||||
@@ -204,6 +204,57 @@ namespace LiMan.UI.Data
|
||||
}
|
||||
}
|
||||
|
||||
private void ReportUserUpd()
|
||||
{
|
||||
if (EA_UserNameUpd != null)
|
||||
{
|
||||
EA_UserNameUpd?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Num record x la pagina corrente
|
||||
/// </summary>
|
||||
public async Task<int> NumRowGridGet(string gridName)
|
||||
{
|
||||
var answ = await localStore.GetItemAsync<int>($"{gridName}_nRow");
|
||||
answ = answ > 0 ? answ : 10;
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposta num record x la pagina corrente
|
||||
/// </summary>
|
||||
public async Task NumRowGridSet(string gridName, int newVal)
|
||||
{
|
||||
await localStore.SetItemAsync($"{gridName}_nRow", newVal);
|
||||
}
|
||||
|
||||
protected ILocalStorageService localStore { get; set; } = null!;
|
||||
/// <summary>
|
||||
/// Preferenza utente salvata in local storage
|
||||
/// </summary>
|
||||
public async ValueTask<T?> UserPrefGet<T>(string userPref)
|
||||
{
|
||||
var sData = await localStore.GetItemAsync<string>(userPref);
|
||||
if (string.IsNullOrEmpty(sData))
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (T)Convert.ChangeType(sData, typeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposta pref utente
|
||||
/// </summary>
|
||||
public async Task UserPrefSet(string userPref, string newVal)
|
||||
{
|
||||
await localStore.SetItemAsync(userPref, newVal);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.1.2409.1716</Version>
|
||||
<Version>1.1.2409.1807</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
@@ -41,16 +41,25 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2406.111" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2406.111" />
|
||||
<PackageReference Include="EgwProxy.MP.Core" Version="1.0.2406.108" />
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
|
||||
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2409.1215" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2409.1215" />
|
||||
<PackageReference Include="EgwProxy.MP.Core" Version="1.0.2409.1212" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.28" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.21" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.28">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.36.0" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="6.36.0" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Protocols" Version="6.36.0" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.36.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.11" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.36.0" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ namespace LiMan.UI
|
||||
.ConfigureLogging(logging =>
|
||||
{
|
||||
logging.ClearProviders();
|
||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
||||
logging.SetMinimumLevel(LogLevel.Debug);
|
||||
})
|
||||
.UseNLog();
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace LiMan.UI
|
||||
// inclusione NLog:
|
||||
// https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5
|
||||
// https://codewithmukesh.com/blog/logging-with-nlog-in-aspnet-core/
|
||||
var logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
|
||||
var logger = NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
|
||||
try
|
||||
{
|
||||
logger.Info("LiMan.UI Application Starting Up");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2409.1716</h4>
|
||||
<h4>Versione: 1.1.2409.1807</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2409.1716
|
||||
1.1.2409.1807
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2409.1716</version>
|
||||
<version>1.1.2409.1807</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>
|
||||
|
||||
@@ -21,6 +21,8 @@ using Microsoft.AspNetCore.Http;
|
||||
using System.IO;
|
||||
using Liman.CadCam.Services;
|
||||
using StackExchange.Redis;
|
||||
using Blazored.LocalStorage;
|
||||
using Blazored.SessionStorage;
|
||||
|
||||
namespace LiMan.UI
|
||||
{
|
||||
@@ -185,6 +187,8 @@ namespace LiMan.UI
|
||||
services.AddScoped<MessageService>();
|
||||
services.AddSingleton<LiManDataService>();
|
||||
services.AddSingleton<CadCamService>();
|
||||
services.AddBlazoredLocalStorage();
|
||||
services.AddBlazoredSessionStorage();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
Reference in New Issue
Block a user