Merge branch 'Release/AddPdfViewerAndMonFilter01'

This commit is contained in:
Samuele Locatelli
2024-02-23 12:25:26 +01:00
21 changed files with 260 additions and 56 deletions
+27 -27
View File
@@ -267,7 +267,7 @@ LAND:IIS01:deploy:
needs: ["LAND:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
PROG:IIS01:deploy:
stage: deploy
@@ -286,7 +286,7 @@ PROG:IIS01:deploy:
needs: ["PROG:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
STAT:IIS01:deploy:
stage: deploy
@@ -305,7 +305,7 @@ STAT:IIS01:deploy:
needs: ["STAT:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
MON:IIS01:deploy:
stage: deploy
@@ -324,7 +324,7 @@ MON:IIS01:deploy:
needs: ["MON:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
SPEC:IIS01:deploy:
stage: deploy
@@ -343,7 +343,7 @@ SPEC:IIS01:deploy:
needs: ["SPEC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
INVE:IIS01:deploy:
stage: deploy
@@ -362,7 +362,7 @@ INVE:IIS01:deploy:
needs: ["INVE:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CONF:IIS01:deploy:
stage: deploy
@@ -381,7 +381,7 @@ CONF:IIS01:deploy:
needs: ["CONF:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
IOC:IIS01:deploy:
stage: deploy
@@ -400,7 +400,7 @@ IOC:IIS01:deploy:
needs: ["IOC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
TAB3:IIS01:deploy:
stage: deploy
@@ -419,7 +419,7 @@ TAB3:IIS01:deploy:
needs: ["TAB3:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# ----- Start DEPLOY master (IIS02/IIS04) -----
LAND:IIS02:deploy:
@@ -437,8 +437,8 @@ LAND:IIS02:deploy:
needs: ["LAND:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
PROG:IIS02:deploy:
stage: deploy
@@ -455,8 +455,8 @@ PROG:IIS02:deploy:
needs: ["PROG:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
STAT:IIS02:deploy:
stage: deploy
@@ -473,8 +473,8 @@ STAT:IIS02:deploy:
needs: ["STAT:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
MON:IIS02:deploy:
stage: deploy
@@ -491,8 +491,8 @@ MON:IIS02:deploy:
needs: ["MON:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
SPEC:IIS02:deploy:
stage: deploy
@@ -509,8 +509,8 @@ SPEC:IIS02:deploy:
needs: ["SPEC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
INVE:IIS02:deploy:
stage: deploy
@@ -527,8 +527,8 @@ INVE:IIS02:deploy:
needs: ["INVE:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CONF:IIS02:deploy:
stage: deploy
@@ -545,8 +545,8 @@ CONF:IIS02:deploy:
needs: ["CONF:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
IOC:IIS02:deploy:
stage: deploy
@@ -563,8 +563,8 @@ IOC:IIS02:deploy:
needs: ["IOC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
TAB3:IIS02:deploy:
stage: deploy
@@ -581,8 +581,8 @@ TAB3:IIS02:deploy:
needs: ["IOC:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# ----- Start INSTALLER (develop/master) -----
LAND:installer:
+17 -1
View File
@@ -236,7 +236,8 @@ else
</div>
<div class="col-2">
<div class="px-1 w-100">
<a target="_blank" href="@($"disegni/{RecMSE.CodArticolo}.pdf")" class="btn btn-sm btn-secondary w-100"><i class="fa-regular fa-file-pdf"></i></a>
@* <a target="_blank" href="@($"disegni/{RecMSE.CodArticolo}.pdf")" class="btn btn-sm btn-secondary w-100"><i class="fa-regular fa-file-pdf"></i></a> *@
<button class="btn btn-sm btn-info w-100" @onclick="ToggleDraw"><i class="fa-regular fa-file-pdf"></i></button>
</div>
</div>
</div>
@@ -245,3 +246,18 @@ else
}
}
@if (showDraw && RecMSE != null)
{
<PdfDisplay Width="100%" PdfUrl="@($"disegni/{RecMSE.CodArticolo}.pdf")" HeightList="@heightList"></PdfDisplay>
@* if (isMobile)
{
<h3>Mobile</h3>
<iframe src="@($"disegni/{RecMSE.CodArticolo}.pdf")" width="100%" height="50%" />
}
else
{
<h3>Desktop</h3>
<object type="application/pdf" data="@($"disegni/{RecMSE.CodArticolo}.pdf")" width="100%" height="60%" />
} *@
}
+25 -7
View File
@@ -5,6 +5,7 @@ using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
using System;
namespace MP_TAB3.Components
{
@@ -83,15 +84,10 @@ namespace MP_TAB3.Components
#region Protected Fields
protected string baseCss = "sem";
protected int currMaxVal = 1000;
protected List<CircleGaugeMulti.CircSegm> innerCircleVals = new List<CircleGaugeMulti.CircSegm>();
protected int kaFactor = 60 / 2;
protected int maxVal = 1000;
protected List<CircleGaugeMulti.CircSegm> outerCircleVals = new List<CircleGaugeMulti.CircSegm>();
#endregion Protected Fields
@@ -144,13 +140,14 @@ namespace MP_TAB3.Components
#region Protected Methods
protected override async Task OnAfterRenderAsync(bool firstRender)
{//await Task.Delay(500);
{
if (firstRender)
{
//await getWDim();
StateHasChanged();
await InvokeAsync(StateHasChanged);
}
isLoading = RecMSE == null;
isMobile = await JSRuntime.InvokeAsync<bool>("isDevice");
await Task.Delay(1);
//return base.OnAfterRenderAsync(firstRender);
}
@@ -234,6 +231,14 @@ namespace MP_TAB3.Components
NavMan.NavigateTo($"machine-detail");
}
/// <summary>
/// Toggle visibilità button
/// </summary>
protected void ToggleDraw()
{
showDraw = !showDraw;
}
#endregion Protected Methods
#region Private Fields
@@ -244,6 +249,19 @@ namespace MP_TAB3.Components
#endregion Private Fields
#region Private Properties
private Dictionary<string, string> heightList { get; set; } = new Dictionary<string, string>() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" } };
/// <summary>
/// Boolean Mobile vs Desktop
/// </summary>
private bool isMobile { get; set; }
private bool showDraw { get; set; } = false;
#endregion Private Properties
#region Private Methods
private string cssComStatus(string semaforo, DateTime? lastUpdateN)
+3 -3
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2402.2117</Version>
<Version>6.16.2402.2312</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
@@ -20,8 +20,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2312.1510" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2312.1510" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2402.2311" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2402.2311" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
</ItemGroup>
+18 -1
View File
@@ -36,13 +36,14 @@
<a class="dismiss">🗙</a>
</div>
<script src="lib/Utils.js"></script>
<script src="lib/WindowSize.js"></script>
<script src="lib/bootstrap/js/bootstrap.bundle.js"></script>
<script src="_framework/blazor.server.js" autostart="false"></script>
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
<script>
@* <script>
Blazor.start({
reconnectionOptions: {
maxRetries: 600,
@@ -66,6 +67,22 @@
}
});
});
</script> *@
<script>
Blazor.start({
reconnectionOptions: {
maxRetries: 600,
retryIntervalMilliseconds: 1000
},
reconnectionHandler: {
onConnectionDown: (options, error) => console.error(error),
onConnectionUp: () => console.log("Client reconnected!")
}
}).then(() => {
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
document.location.reload();
}
});
</script>
</body>
+1 -2
View File
@@ -59,9 +59,8 @@ 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");
// gestione cartella x PDF
app.UseStaticFiles(new StaticFileOptions
{
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2402.2117</h4>
<h4>Versione: 6.16.2402.2312</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2402.2117
6.16.2402.2312
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2402.2117</version>
<version>6.16.2402.2312</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>
+1 -1
View File
@@ -7,6 +7,6 @@
}
},
"OptConf": {
"BasePathDisegni": "c:\\inetpub\\wwwroot\\MP\\disegni"
"BasePathDisegni": "C:\\Steamware\\disegni"
}
}
+1 -1
View File
@@ -24,7 +24,7 @@
"ImgStBasePath": "C:\\Steamware\\images\\ST",
"CodModulo": "MoonPro",
"samplerMaxCall": 15,
"BasePathDisegni": "\\\\iis01\\c$\\inetpub\\wwwroot\\MP"
"BasePathDisegni": "\\\\iis01\\W$\\Files\\Disegni"
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"MailKitMailSettings": {
+3
View File
@@ -0,0 +1,3 @@
function isDevice() {
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(navigator.userAgent);
}
+1
View File
@@ -19,6 +19,7 @@
public static string redisMacchine = "MP:MON:Cache:Macchine";
public static string redisMseKey = "MP:MON:Cache:MSE";
public static string redisMseKeySingle = "MP:MON:Cache:MseSingle";
+44
View File
@@ -1,6 +1,7 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MP.Data.DatabaseModels;
using NLog;
using System;
using System.Collections.Generic;
@@ -84,6 +85,49 @@ namespace MP.Data.Controllers
return dbResult;
}
/// <summary>
/// Elenco da tabella Macchine
/// </summary>
/// <param name="codGruppo"></param>
/// <returns></returns>
public List<Macchine> MacchineGetFilt(string codGruppo)
{
List<Macchine> dbResult = new List<Macchine>();
try
{
using (var dbCtx = new MoonProContext(_configuration))
{
if (codGruppo == "*")
{
dbResult = dbCtx
.DbSetMacchine
.AsNoTracking()
.OrderBy(x => x.IdxMacchina)
.ToList();
}
else
{
dbResult = dbCtx
.DbSetGrp2Macc
.Where(g => g.CodGruppo == codGruppo)
.Join(dbCtx.DbSetMacchine,
g => g.IdxMacchina,
m => m.IdxMacchina,
(g, m) => m
)
.AsNoTracking()
.OrderBy(x => x.IdxMacchina)
.ToList();
}
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in MacchineGetFilt{Environment.NewLine}{exc}");
}
return dbResult;
}
/// <summary>
/// Elenco da tabella MappaStatoExpl
/// </summary>
+76 -3
View File
@@ -51,6 +51,10 @@ namespace MP.Data.Services
maxAge = _configuration.GetValue<int>("OptConf:msRefresh");
}
// sistemo i timespan
LongCache = TimeSpan.FromSeconds(300);
FastCache = TimeSpan.FromMilliseconds(maxAge);
// setup conf IOB da dizionario
tryLoadIobTags();
}
@@ -110,9 +114,66 @@ namespace MP.Data.Services
return outVal;
}
public Task<List<Macchine>> MacchineGetAll()
public async Task<List<Macchine>> MacchineGetAll()
{
return Task.FromResult(dbController.MacchineGetAll());
Stopwatch sw = new Stopwatch();
string source = "DB";
sw.Start();
List<Macchine>? result = new List<Macchine>();
// cerco in redis...
string currKey = $"{Constants.redisMacchine}:ALL";
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
{
result = JsonConvert.DeserializeObject<List<Macchine>>($"{rawData}");
source = "REDIS";
}
else
{
result = await Task.FromResult(dbController.MacchineGetAll());
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, LongCache);
}
if (result == null)
{
result = new List<Macchine>();
}
sw.Stop();
Log.Debug($"MacchineGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms");
return result;
//return Task.FromResult(dbController.MacchineGetAll());
}
public async Task<List<Macchine>> MacchineGetByGruppo(string CodGruppo)
{
Stopwatch sw = new Stopwatch();
string source = "DB";
sw.Start();
List<Macchine>? result = new List<Macchine>();
// cerco in redis...
string currKey = $"{Constants.redisMacchine}:{CodGruppo}";
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
{
result = JsonConvert.DeserializeObject<List<Macchine>>($"{rawData}");
source = "REDIS";
}
else
{
result = await Task.FromResult(dbController.MacchineGetFilt(CodGruppo));
//result = dbController.MacchineGetFilt(CodGruppo);
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, LongCache);
}
if (result == null)
{
result = new List<Macchine>();
}
sw.Stop();
Log.Debug($"MacchineGetByGruppo | {source} | {sw.Elapsed.TotalMilliseconds}ms");
return result;
}
/// <summary>
@@ -205,7 +266,7 @@ namespace MP.Data.Services
result = await Task.FromResult(dbController.MseGetAll(maxAge));
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(Constants.redisMseKey, rawData, TimeSpan.FromMilliseconds(maxAge));
await redisDb.StringSetAsync(Constants.redisMseKey, rawData, FastCache);
}
if (result == null)
{
@@ -236,7 +297,19 @@ namespace MP.Data.Services
#region Private Fields
private static IConfiguration _configuration = null!;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Cache breve durata
/// </summary>
private TimeSpan FastCache = TimeSpan.FromSeconds(5);
/// <summary>
/// Cache lunga durata
/// </summary>
private TimeSpan LongCache = TimeSpan.FromSeconds(60);
private int maxAge = 2000;
#endregion Private Fields
+1
View File
@@ -2419,6 +2419,7 @@ namespace MP.Data.Services
answ = dbTabController.RicalcMse(idxMacchina, maxAgeSec);
await FlushOdlCache();
await FlushCache(Constants.redisMseKey);
await FlushCache(Constants.redisMacchine);
return answ;
}
+4 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>6.16.2402.1919</Version>
<Version>6.16.2402.2312</Version>
</PropertyGroup>
<ItemGroup>
@@ -33,8 +33,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2402.2311" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2402.2311" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="StackExchange.Redis" Version="2.6.90" />
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
+32 -3
View File
@@ -5,6 +5,8 @@ using MP.Data.DatabaseModels;
using MP.Data.Services;
using Newtonsoft.Json;
using NLog;
using System;
using EgwCoreLib.Razor;
namespace MP.Mon.Pages
{
@@ -25,8 +27,8 @@ namespace MP.Mon.Pages
// dispongo i vari timers...
disposeTimers();
await Task.Delay(10);
// reload pagina
NavManager.NavigateTo(NavManager.Uri);
// reload pagina intera
NavManager.NavigateTo(NavManager.Uri, true);
}
public void StartTimer()
@@ -154,6 +156,8 @@ namespace MP.Mon.Pages
return answ;
}
private string CodGruppo = "";
protected override async Task OnInitializedAsync()
{
await setupConf();
@@ -175,6 +179,7 @@ namespace MP.Mon.Pages
private List<ConfigModel>? CurrConfig = null;
private bool doBlink = false;
private List<MappaStatoExpl>? listMSE = null;
private List<Macchine> listMacchine = new List<Macchine>();
private Random rnd = new Random();
#endregion Private Fields
@@ -218,9 +223,24 @@ namespace MP.Mon.Pages
{
try
{
var dataList = JsonConvert.DeserializeObject<List<MappaStatoExpl>>(currArgs.newMessage);
List<MappaStatoExpl>? dataList = JsonConvert.DeserializeObject<List<MappaStatoExpl>>(currArgs.newMessage);
if (dataList != null)
{
// se ho filtro macchine --> tengo solo quelle che mi tornano...
if (listMacchine != null && listMacchine.Count > 0)
{
List<MappaStatoExpl> listaFilt = new List<MappaStatoExpl>();
foreach (var item in listMacchine)
{
var rigaFilt = dataList.FirstOrDefault(x => x.IdxMacchina == item.IdxMacchina);
if (rigaFilt != null)
{
listaFilt.Add(rigaFilt);
}
}
dataList = listaFilt;
}
#if DEBUG
// hack: legge 3 volte i dati x stressare sistema
var singleData = dataList;
@@ -272,8 +292,17 @@ namespace MP.Mon.Pages
Log.Info($"setupConf | Effettuato setup parametri | keepAlive: {keepAliveMin} | MaxCol: {maxCol} | doAnimate: {doAnimate} | slowRefreshSec: {slowRefreshSec} | fastRefreshMs: {fastRefreshMs}");
}
// verifico se ho richiesta filtro x codGruppo...
CodGruppo = NavMan.ExtractQueryStringByKey<string>("CodGruppo");
if (!string.IsNullOrEmpty(CodGruppo))
{
listMacchine = await MMDataService.MacchineGetByGruppo(CodGruppo);
}
}
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
#endregion Private Methods
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MON MAPO</i>
<h4>Versione: 6.16.2402.1919</h4>
<h4>Versione: 6.16.2402.2312</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2402.1919
6.16.2402.2312
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2402.1919</version>
<version>6.16.2402.2312</version>
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.Mon.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>