From bc3aa86d8f84f9ffad6b78f5276edbf92c5b1a1d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 8 Oct 2021 08:17:29 +0200 Subject: [PATCH] ok display prima apgina elenco applicazioni --- LiMan.DL/DatabaseModels/LicManContext.cs | 30 +++++--------- LiMan.UI/Data/LiManDataService.cs | 3 +- LiMan.UI/NLog.config | 46 +++++++++++++++++++++ LiMan.UI/Pages/Applicazioni.razor | 4 +- LiMan.UI/Pages/_Host.cshtml | 6 +-- LiMan.UI/Resources/ChangeLog-original.html | 27 ++++++++++++ LiMan.UI/Resources/ChangeLog.html | 27 ++++++++++++ LiMan.UI/Resources/VersNum.txt | 1 + LiMan.UI/Resources/logoSteamware.png | Bin 0 -> 3402 bytes LiMan.UI/Resources/manifest-original.xml | 7 ++++ LiMan.UI/Resources/manifest.xml | 7 ++++ LiMan.UI/appsettings.json | 21 ++++++---- LiMan.UI/post-build.ps1 | 32 ++++++++++++++ MajMin.vers | 1 + 14 files changed, 178 insertions(+), 34 deletions(-) create mode 100644 LiMan.UI/NLog.config create mode 100644 LiMan.UI/Resources/ChangeLog-original.html create mode 100644 LiMan.UI/Resources/ChangeLog.html create mode 100644 LiMan.UI/Resources/VersNum.txt create mode 100644 LiMan.UI/Resources/logoSteamware.png create mode 100644 LiMan.UI/Resources/manifest-original.xml create mode 100644 LiMan.UI/Resources/manifest.xml create mode 100644 LiMan.UI/post-build.ps1 create mode 100644 MajMin.vers diff --git a/LiMan.DL/DatabaseModels/LicManContext.cs b/LiMan.DL/DatabaseModels/LicManContext.cs index 4254283..6951af0 100644 --- a/LiMan.DL/DatabaseModels/LicManContext.cs +++ b/LiMan.DL/DatabaseModels/LicManContext.cs @@ -20,6 +20,7 @@ namespace LiMan.DL.DatabaseModels #region Public Constructors + [Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")] public LicManContext() { } @@ -70,28 +71,17 @@ namespace LiMan.DL.DatabaseModels protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - // default - string connString = "Server=SQLSTEAM;Database=SteamWare_Auth;Trusted_Connection=True;"; - - // tento setup da config - try - { - string srv = _configuration["DbConfig:srv"]; - string db = _configuration["DbConfig:db"]; - string usr = _configuration["DbConfig:usr"]; - string pwd = _configuration["DbConfig:pwd"]; - - //DbConfig.InitDb(server, nKey, sKey); - //DbConfig.CheckUser(nKey, sKey); - - // uso conn string calcolata - connString = $"Server={srv};Database={db};User ID={usr}Password={pwd};"; - } - catch - { } if (!optionsBuilder.IsConfigured) { - optionsBuilder.UseSqlServer(connString); + string connString = _configuration.GetConnectionString("LiMan.DB"); + if (!string.IsNullOrEmpty(connString)) + { + optionsBuilder.UseSqlServer(connString); + } + else + { + optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=SteamWare_Auth;Trusted_Connection=True;"); + } } } diff --git a/LiMan.UI/Data/LiManDataService.cs b/LiMan.UI/Data/LiManDataService.cs index 959fbc6..9eee509 100644 --- a/LiMan.UI/Data/LiManDataService.cs +++ b/LiMan.UI/Data/LiManDataService.cs @@ -59,7 +59,7 @@ namespace LiMan.UI.Data this.memoryCache = memoryCache; this.distributedCache = distributedCache; // conf DB - string connStr = _configuration.GetConnectionString("GWMS.Data"); + string connStr = _configuration.GetConnectionString("LiMan.DB"); if (string.IsNullOrEmpty(connStr)) { _logger.LogError("ConnString empty!"); @@ -67,6 +67,7 @@ namespace LiMan.UI.Data else { dbController = new LiMan.DL.Controllers.LicManController(configuration); + _logger.LogInformation("DbController OK"); } } diff --git a/LiMan.UI/NLog.config b/LiMan.UI/NLog.config new file mode 100644 index 0000000..bd41408 --- /dev/null +++ b/LiMan.UI/NLog.config @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LiMan.UI/Pages/Applicazioni.razor b/LiMan.UI/Pages/Applicazioni.razor index cbe8621..ed88291 100644 --- a/LiMan.UI/Pages/Applicazioni.razor +++ b/LiMan.UI/Pages/Applicazioni.razor @@ -107,7 +107,7 @@ *@ -
+
@if (currRecord != null) { @**@ @@ -164,7 +164,7 @@
}
- \ No newline at end of file diff --git a/LiMan.UI/Pages/_Host.cshtml b/LiMan.UI/Pages/_Host.cshtml index 17f63fb..25ea868 100644 --- a/LiMan.UI/Pages/_Host.cshtml +++ b/LiMan.UI/Pages/_Host.cshtml @@ -17,7 +17,7 @@ LiMan.UI - + @@ -37,8 +37,8 @@ - - + + \ No newline at end of file diff --git a/LiMan.UI/Resources/ChangeLog-original.html b/LiMan.UI/Resources/ChangeLog-original.html new file mode 100644 index 0000000..0a14842 --- /dev/null +++ b/LiMan.UI/Resources/ChangeLog-original.html @@ -0,0 +1,27 @@ + + License Manager +

Versione: {{CURRENT-REL}}

+
+ Note di rilascio: + +
+
+ +
+
+ © Steamware 2006-2021 +
+
+ \ No newline at end of file diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html new file mode 100644 index 0000000..eaaf6b5 --- /dev/null +++ b/LiMan.UI/Resources/ChangeLog.html @@ -0,0 +1,27 @@ + + Modulo License Manager +

Versione: 6.14.2109.3016

+
+ Note di rilascio: + +
+
+ +
+
+ © Steamware 2006-2021 +
+
+ \ No newline at end of file diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt new file mode 100644 index 0000000..15ece1f --- /dev/null +++ b/LiMan.UI/Resources/VersNum.txt @@ -0,0 +1 @@ +6.14.2109.3016 diff --git a/LiMan.UI/Resources/logoSteamware.png b/LiMan.UI/Resources/logoSteamware.png new file mode 100644 index 0000000000000000000000000000000000000000..0958b50a1ee7f6a934e26cf55e2335d4cea6aa82 GIT binary patch literal 3402 zcmV-Q4Yl%#P)Kpl00004XF*Lt006O% z3;baP00009a7bBm000ia000ia0czHX2><{98FWQhbW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE;85dX+r=2497`CK~#8N?VEXYRMi>4lgUh$nd~9N?8#&%lgvKZ7a%JLgb=8< zJ+;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?jKY)hOrTP`{d#zg+|wV)!5S~0l9 zIgg^ZhvNX(^AN{RX}?Vop=tmRRS#qp)Pt0hoWGOy?bHu*jtfFXJ~oT>LlE)VKHzh0 zq;D0UnmAVth`T7al2WV5Y;mw8qPK@|APxkMD<|&M@ z8LwrnsjSY&Q}qGLRzhhzV=Jf&PqSE@@2f&pT~VQB?Yq%CB@E9wH~&j|;>9CSBvE}{Dwz^d_n(7;c zr?rXe;u^djhg0Nr&vNd?^jWggGpwxLF6LF0S2l$fN6?8vrp9kk&HU@PK gb@ksMRAFKN1+dqwbM3SFTL1t607*qoM6N<$g3&)|djJ3c literal 0 HcmV?d00001 diff --git a/LiMan.UI/Resources/manifest-original.xml b/LiMan.UI/Resources/manifest-original.xml new file mode 100644 index 0000000..f95e076 --- /dev/null +++ b/LiMan.UI/Resources/manifest-original.xml @@ -0,0 +1,7 @@ + + + 1.0.0.0 + https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip + https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html + false + diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml new file mode 100644 index 0000000..1fdfb11 --- /dev/null +++ b/LiMan.UI/Resources/manifest.xml @@ -0,0 +1,7 @@ + + + 6.14.2109.3016 + https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip + https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html + false + diff --git a/LiMan.UI/appsettings.json b/LiMan.UI/appsettings.json index d9d9a9b..8eadd32 100644 --- a/LiMan.UI/appsettings.json +++ b/LiMan.UI/appsettings.json @@ -1,10 +1,15 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "DefaultConnection": "Server=SQL2016DEV;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI;", + "LiMan.DB": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI;", + "Redis": "localhost:6379" } - }, - "AllowedHosts": "*" -} +} \ No newline at end of file diff --git a/LiMan.UI/post-build.ps1 b/LiMan.UI/post-build.ps1 new file mode 100644 index 0000000..b74f583 --- /dev/null +++ b/LiMan.UI/post-build.ps1 @@ -0,0 +1,32 @@ +param([string]$ProjectDir, [string]$ProjectPath); + +$FileMajMin = "..\MajMin.vers" +$FileVers = "Resources\VersNum.txt" +$FileManIn = "Resources\manifest-original.xml" +$FileManOut = "Resources\manifest.xml" +$FileCLogIn = "Resources\ChangeLog-original.html" +$FileCLogOut = "Resources\ChangeLog.html" +$MajMin = Get-Content $FileMajMin # "6.14." +$currentDate = get-date -format yyMM; +$currentTime = get-date -format ddHH; +$find = "(.|\n)*?"; +$currRelNum = $MajMin + $currentDate +"." + $currentTime +$replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; +$csproj = Get-Content $ProjectPath +$csprojUpdated = $csproj -replace $find, $replace + +Set-Content -Path $ProjectPath -Value $csprojUpdated +Set-Content -Path $FileVers -Value $currRelNum + +# replace x manifest +$manData = Get-Content $FileManIn +$manData = $manData -replace "1.0.0.0", $currRelNum +$manData = $manData -replace "{{DIRNAME}}", "LiMan" +$manData = $manData -replace "{{BRANCHNAME}}", "stable/LAST" +$manData = $manData -replace "{{PACKNAME}}", "LiMan.UI" +Set-Content -Path $FileManOut -Value $manData + +# replace x ChangeLog +$clogData = Get-Content $FileCLogIn +$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum +Set-Content -Path $FileCLogOut -Value $clogData diff --git a/MajMin.vers b/MajMin.vers new file mode 100644 index 0000000..c4e3f49 --- /dev/null +++ b/MajMin.vers @@ -0,0 +1 @@ +6.14. \ No newline at end of file