Update conf parametrica ServerConf

This commit is contained in:
Samuele Locatelli
2024-03-04 09:19:18 +01:00
parent d43a537f19
commit 77b32b72fc
12 changed files with 42 additions and 29 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ namespace MP_TAB3.Components
// abilitazione disegni...
TabDServ.ConfigGetVal("enableDisegno", ref enableDisegno);
// se configurata uso cartella virtuale... altrimenti cartella processo
var sImgBasePath = config.GetValue<string>("OptConf:ImgBasePath");
var sImgBasePath = config.GetValue<string>("ServerConf:ImgBasePath") ?? (config.GetValue<string>("OptConf:ImgBasePath") ?? "");
if (!string.IsNullOrEmpty(sImgBasePath))
{
imgBasePath = sImgBasePath;
+1 -1
View File
@@ -59,7 +59,7 @@ namespace MP_TAB3.Components
{
await FixQtyUdc();
var currUrl = NavMan.Uri;
string baseUrl = config["OptConf:BaseUrl"];
string baseUrl = config.GetValue<string>("ServerConf:BaseUrl") ?? (config.GetValue<string>("OptConf:BaseUrl") ?? "");
string UrlTabJumpMag = SMServ.GetConf("UrlTabJumpMag");
if (string.IsNullOrEmpty(UrlTabJumpMag))
{
+5 -3
View File
@@ -68,8 +68,9 @@ namespace MP_TAB3.Components
protected bool ListArtDisabled { get => string.IsNullOrEmpty(SearchVal) || SearchVal.Length < SearchMinChar; }
protected Dictionary<string, string>? ListArticoli { get; set; } = null;
protected Dictionary<string, string> ListArticoliAll { get; set; } = new Dictionary<string, string>();
protected Dictionary<string, string> ListMacchineAll {
get => MServ.DictMacchine;
protected Dictionary<string, string> ListMacchineAll
{
get => MServ.DictMacchine;
set => MServ.DictMacchine = value;
}
@@ -148,7 +149,8 @@ namespace MP_TAB3.Components
protected override async Task OnInitializedAsync()
{
BaseAddr = config.GetValue<string>("OptConf:BaseAddr") ?? "";
// Cerco in ServerConf e se non trovato in OptConf...
BaseAddr = config.GetValue<string>("ServerConf:BaseAddr") ?? (config.GetValue<string>("OptConf:BaseAddr") ?? "");
await ReloadAllData();
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2403.109</Version>
<Version>6.16.2403.409</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -64,7 +64,7 @@ namespace MP_TAB3.Pages
protected override async Task OnInitializedAsync()
{
BaseAddr = config.GetValue<string>("OptConf:BaseAddr") ?? "";
BaseAddr = config.GetValue<string>("ServerConf:BaseAddr") ?? (config.GetValue<string>("OptConf:BaseAddr") ?? "");
await ReloadData();
}
+4 -2
View File
@@ -7,6 +7,7 @@ using Microsoft.Extensions.FileProviders;
using MP.Data;
using MP.Data.Services;
using StackExchange.Redis;
using static Org.BouncyCastle.Math.EC.ECCurve;
var builder = WebApplication.CreateBuilder(args);
@@ -48,7 +49,8 @@ builder.Services.AddHttpContextAccessor();
var app = builder.Build();
// aggiunt base URL x routing corretto
app.UsePathBase(configuration["OptConf:BaseUrl"]);
var pathBase= configuration.GetValue<string>("ServerConf:BaseUrl") ?? (configuration.GetValue<string>("OptConf:BaseUrl") ?? "");
app.UsePathBase(pathBase);
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
@@ -63,7 +65,7 @@ app.UseHttpsRedirection();
app.UseStaticFiles();
// gestione static files: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0
string BasePathDisegni = configuration.GetValue<string>("OptConf:BasePathDisegni");
string BasePathDisegni = configuration.GetValue<string>("ServerConf:BasePathDisegni") ?? configuration.GetValue<string>("OptConf:BasePathDisegni")?? "";
if (!string.IsNullOrEmpty(BasePathDisegni))
{
// verifico esista folder disegni
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2403.109</h4>
<h4>Versione: 6.16.2403.409</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2403.109
6.16.2403.409
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2403.109</version>
<version>6.16.2403.409</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+9 -9
View File
@@ -15,14 +15,14 @@
"MP.Mag": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
},
"OptConf": {
"msRefresh": "1100",
"BaseAddr": "https://localhost:7295/MP/TAB3/",
"BaseUrl": "/MP/TAB3",
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/",
"ImgStBasePath": "C:\\Steamware\\images\\ST",
"CodModulo": "MoonPro",
"samplerMaxCall": 15,
"BasePathDisegni": "C:\\Steamware\\disegni"
"msRefresh": "1500",
"CodModulo": "MP-TAB3"
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"ServerConf": {
"BaseAddr": "https://iis04.egalware.com/MP/TAB3/",
"BasePathDisegni": "C:\\Steamware\\disegni",
"BaseUrl": "/MP/TAB3",
"ImgBasePath": "https://iis04.egalware.com/MP/images/macchine/small/"
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net"
}
+6 -6
View File
@@ -16,14 +16,14 @@
"MP.Mag": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
},
"OptConf": {
"msRefresh": "1500",
"msRefresh": "1100",
"CodModulo": "MP-TAB3"
},
"ServerConf": {
"BaseAddr": "https://localhost:7295/MP/TAB3/",
"BasePathDisegni": "\\\\iis01\\W$\\Files\\Disegni",
"BaseUrl": "/MP/TAB3",
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/",
"ImgStBasePath": "C:\\Steamware\\images\\ST",
"CodModulo": "MoonPro",
"samplerMaxCall": 15,
"BasePathDisegni": "\\\\iis01\\W$\\Files\\Disegni"
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/"
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"MailKitMailSettings": {
+11 -2
View File
@@ -16,7 +16,16 @@ namespace MP.Data.Services
// setup canali pub/sub
dataPipe = new MessagePipe(redisConn, Constants.TAB_ACT_MSE_DATA_KEY, false);
blinkPipe = new MessagePipe(redisConn, Constants.TAB_ACT_BLINK_KEY, false);
blinkPipe = new MessagePipe(redisConn, Constants.TAB_ACT_BLINK_KEY, false);
//if (!string.IsNullOrEmpty(configuration.GetValue<string>("OptConf:msRefresh")))
//{
// fastRefreshMs = configuration.GetValue<int>("OptConf:msRefresh");
// if (fastRefreshMs <= 0)
// {
// fastRefreshMs = 1000;
// }
//}
// avvio timers...
startTimers();
@@ -26,7 +35,7 @@ namespace MP.Data.Services
#region Public Properties
public MessagePipe blinkPipe { get; set; } = null!;
public MessagePipe blinkPipe { get; set; } = null!;
public MessagePipe dataPipe { get; set; } = null!;