diff --git a/Test.UI/Components/Layout/NavMenu.razor b/Test.UI/Components/Layout/NavMenu.razor
index fae7297..e89fdb4 100644
--- a/Test.UI/Components/Layout/NavMenu.razor
+++ b/Test.UI/Components/Layout/NavMenu.razor
@@ -15,7 +15,7 @@
- Test Component
+ Test Compo + Serv
diff --git a/Test.UI/Components/Pages/TestComponent.razor.cs b/Test.UI/Components/Pages/TestComponent.razor.cs
index 433883a..e74cb50 100644
--- a/Test.UI/Components/Pages/TestComponent.razor.cs
+++ b/Test.UI/Components/Pages/TestComponent.razor.cs
@@ -43,6 +43,9 @@ namespace Test.UI.Components.Pages
[Inject]
protected IConfiguration Config { get; set; } = null!;
+ [Inject]
+ protected ImageCacheService ImgService { get; set; } = null!;
+
private string imgBasePath = "";
private string imgTag = "";
private void ConfInit()
@@ -69,7 +72,8 @@ namespace Test.UI.Components.Pages
// calcolo URL immagini... DTO da rivedere...
foreach (var item in rawList)
{
- item.ImageUrl = $"{imgBasePath}{imgTag}/{item.SVGFileName}";
+ item.ImageUrl = ImgService.ImageUrl(imgBasePath, false, item.SVGFileName);
+ //item.ImageUrl = $"{imgBasePath}{imgTag}/{item.SVGFileName}";
AvailTemplateList.Add(item);
}
}
diff --git a/Test.UI/Program.cs b/Test.UI/Program.cs
index 325a720..83cdfb8 100644
--- a/Test.UI/Program.cs
+++ b/Test.UI/Program.cs
@@ -1,13 +1,33 @@
+using EgwCoreLib.Lux.Data.Services;
+using Microsoft.Extensions.Configuration;
+using StackExchange.Redis;
+using System.Reflection;
using Test.UI.Client.Pages;
using Test.UI.Components;
var builder = WebApplication.CreateBuilder(args);
+
+var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version?.ToString();
+
+ConfigurationManager configuration = builder.Configuration;
+
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
+// costruzione connectionMultiplexer redis...
+string connStr = configuration.GetConnectionString("Redis") ?? "localhost";
+ConnectionMultiplexer redisConn = ConnectionMultiplexer.Connect(connStr);
+// registro connMultiplexer REDIS
+builder.Services.AddSingleton
(redisConn);
+// registro wrapper servizi REDIS
+builder.Services.AddSingleton();
+builder.Services.AddSingleton();
+builder.Services.AddSingleton();
+
+
var app = builder.Build();
// Configure the HTTP request pipeline.
diff --git a/Test.UI/Test.UI.csproj b/Test.UI/Test.UI.csproj
index f9dbb7d..8c5292c 100644
--- a/Test.UI/Test.UI.csproj
+++ b/Test.UI/Test.UI.csproj
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/Test.UI/appsettings.json b/Test.UI/appsettings.json
index 5563da5..c419fdb 100644
--- a/Test.UI/appsettings.json
+++ b/Test.UI/appsettings.json
@@ -6,10 +6,14 @@
}
},
"AllowedHosts": "*",
+ "ConnectionStrings": {
+ "Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true"
+ },
"ServerConf": {
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
- "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/",
+ "SvgChannel": "svg:img",
+ "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window",
"ImageLiveTag": "svg",
"ImageFileTag": "svgfile"
}