From 999274f64ce1c56f68fdf4aa8b9604b92eaa504f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 28 Sep 2023 18:48:36 +0200 Subject: [PATCH] Correzione baseaddr x prod (da vedere wasm con hostingenv...) --- .../MP-TAB.Client/Components/TcHistoryFilter.razor | 6 +++++- MP-TAB/MP-TAB/appsettings.Production.json | 8 ++++++++ MP-TAB/MP-TAB/appsettings.Staging.json | 13 +++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 MP-TAB/MP-TAB/appsettings.Production.json create mode 100644 MP-TAB/MP-TAB/appsettings.Staging.json diff --git a/MP-TAB/MP-TAB.Client/Components/TcHistoryFilter.razor b/MP-TAB/MP-TAB.Client/Components/TcHistoryFilter.razor index ea9fd4db..94a7a738 100644 --- a/MP-TAB/MP-TAB.Client/Components/TcHistoryFilter.razor +++ b/MP-TAB/MP-TAB.Client/Components/TcHistoryFilter.razor @@ -67,6 +67,9 @@ [Parameter] public EventCallback E_SearchUpd { get; set; } + [Inject] + protected IConfiguration config { get; set; } = null!; + [Parameter] public int MatrOpr { get; set; } = 102; @@ -75,10 +78,11 @@ protected override async Task OnInitializedAsync() { + BaseAddr = config.GetValue("OptConf:BaseAddr"); await ReloadAllData(); } - private string BaseAddr = "https://localhost:7057/MP/TAB2/"; + private string BaseAddr = ""; protected async Task ReloadAllData() { diff --git a/MP-TAB/MP-TAB/appsettings.Production.json b/MP-TAB/MP-TAB/appsettings.Production.json new file mode 100644 index 00000000..0c208ae9 --- /dev/null +++ b/MP-TAB/MP-TAB/appsettings.Production.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/MP-TAB/MP-TAB/appsettings.Staging.json b/MP-TAB/MP-TAB/appsettings.Staging.json new file mode 100644 index 00000000..b7ba04db --- /dev/null +++ b/MP-TAB/MP-TAB/appsettings.Staging.json @@ -0,0 +1,13 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "OptConf": { + "BaseAddr": "https://iis01.egalware.com/MP/TAB2/", + "BaseUrl": "/MP/TAB2", + "ImgBasePath": "C:\\Steamware\\macchine" + } +}