diff --git a/MP-MON.sln b/MP-MON.sln
index 4e8c2f87..35405781 100644
--- a/MP-MON.sln
+++ b/MP-MON.sln
@@ -7,6 +7,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Mon", "MP.Mon\MP.Mon.csproj", "{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Server", "MP.WASM.Mon\Server\MP.WASM.Mon.Server.csproj", "{4A98B7F4-4EC6-4284-9D6C-63203DB981B1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Client", "MP.WASM.Mon\Client\MP.WASM.Mon.Client.csproj", "{9BF7BDE7-016A-458C-8791-494FD4204301}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.WASM.Mon.Shared", "MP.WASM.Mon\Shared\MP.WASM.Mon.Shared.csproj", "{A3B1190C-6F98-434B-8B31-27522C78918A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +27,18 @@ Global
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4A98B7F4-4EC6-4284-9D6C-63203DB981B1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9BF7BDE7-016A-458C-8791-494FD4204301}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BF7BDE7-016A-458C-8791-494FD4204301}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9BF7BDE7-016A-458C-8791-494FD4204301}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9BF7BDE7-016A-458C-8791-494FD4204301}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A3B1190C-6F98-434B-8B31-27522C78918A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A3B1190C-6F98-434B-8B31-27522C78918A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A3B1190C-6F98-434B-8B31-27522C78918A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A3B1190C-6F98-434B-8B31-27522C78918A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MP.Mon/Components/CmpFooter.razor.cs b/MP.Mon/Components/CmpFooter.razor.cs
index 71252e09..cd49cc68 100644
--- a/MP.Mon/Components/CmpFooter.razor.cs
+++ b/MP.Mon/Components/CmpFooter.razor.cs
@@ -1,3 +1,5 @@
+using NLog;
+
namespace MP.Mon.Components
{
public partial class CmpFooter
@@ -6,6 +8,7 @@ namespace MP.Mon.Components
public void Dispose()
{
+ //aTimer.Elapsed -= ElapsedTimer;
aTimer.Stop();
aTimer.Dispose();
}
@@ -13,12 +16,12 @@ namespace MP.Mon.Components
public void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
{
var pUpd = Task.Run(async () =>
- {
- //await ReloadData();
- await Task.Delay(1);
- await InvokeAsync(StateHasChanged);
- });
+ {
+ await Task.Delay(1);
+ await InvokeAsync(StateHasChanged);
+ });
pUpd.Wait();
+ Log.Trace($"Elapsed Timer Footer");
}
public void StartTimer()
@@ -35,12 +38,11 @@ namespace MP.Mon.Components
#region Protected Methods
- protected override async Task OnInitializedAsync()
+ protected override void OnInitialized()
{
var currAssembly = typeof(Program).Assembly.GetName();
version = currAssembly.Version != null ? currAssembly.Version : new Version();
StartTimer();
- await Task.Delay(1);
}
#endregion Protected Methods
@@ -48,6 +50,7 @@ namespace MP.Mon.Components
#region Private Fields
private static System.Timers.Timer aTimer = null!;
+ private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private Version version = null!;
#endregion Private Fields
diff --git a/MP.Mon/Components/DetailMSE.razor.cs b/MP.Mon/Components/DetailMSE.razor.cs
index b67e53cb..628920ea 100644
--- a/MP.Mon/Components/DetailMSE.razor.cs
+++ b/MP.Mon/Components/DetailMSE.razor.cs
@@ -12,6 +12,11 @@ namespace MP.Mon.Components
[Parameter]
public MappaStatoExpl? CurrRecord { get; set; } = null;
+ ///
+ /// Valore precedente x calcolo variazione
+ ///
+ private MappaStatoExpl? OldRecord { get; set; } = null;
+
[Parameter]
public List? currTagConf { get; set; } = null;
@@ -33,6 +38,7 @@ namespace MP.Mon.Components
public void Dispose()
{
+ //aTimer.Elapsed -= ElapsedTimer;
aTimer.Stop();
aTimer.Dispose();
}
@@ -41,9 +47,36 @@ namespace MP.Mon.Components
{
var pUpd = Task.Run(async () =>
{
- Log.Trace($"Elapsed Timer {CurrRecord?.CodMacchina}");
await Task.Delay(1);
- await InvokeAsync(StateHasChanged);
+ // verifica variazione x blink...
+ bool needUpdate = false;
+ if (CurrRecord == null)
+ {
+ needUpdate = true;
+ }
+ else
+ {
+ if (OldRecord == null)
+ {
+ needUpdate = true;
+ }
+ else
+ {
+ if (!CurrRecord.Semaforo.Equals(OldRecord.Semaforo) || CurrRecord.Semaforo != "sVe")
+ {
+ needUpdate = true;
+ }
+ }
+ }
+ if (needUpdate)
+ {
+ if (false)
+ {
+ Log.Trace($"Elapsed Timer {CurrRecord?.CodMacchina}");
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+ OldRecord = CurrRecord;
});
pUpd.Wait();
}
diff --git a/MP.Mon/MP.Mon.csproj b/MP.Mon/MP.Mon.csproj
index a97f1c6d..9ad08423 100644
--- a/MP.Mon/MP.Mon.csproj
+++ b/MP.Mon/MP.Mon.csproj
@@ -4,7 +4,7 @@
net6.0
enable
enable
- 6.15.2207.810
+ 6.15.2207.817
diff --git a/MP.Mon/Pages/Index.razor.cs b/MP.Mon/Pages/Index.razor.cs
index d028d1b9..e504cf38 100644
--- a/MP.Mon/Pages/Index.razor.cs
+++ b/MP.Mon/Pages/Index.razor.cs
@@ -53,8 +53,10 @@ namespace MP.Mon.Pages
public void Dispose()
{
+ //fastTimer.Elapsed -= ElapsedFastTimer;
fastTimer.Stop();
fastTimer.Dispose();
+ //slowTimer.Elapsed -= ElapsedSlowTimer;
slowTimer.Stop();
slowTimer.Dispose();
}
@@ -190,21 +192,18 @@ namespace MP.Mon.Pages
private async Task ReloadData()
{
+#if DEBUG
// hack: legge 4 volte i dati x stressare sistema
- bool stressTest = false;
- if (stressTest)
+ var singleData = await MMDataService.MseGetAll();
+ ListMSE = new List();
+ for (int i = 0; i < 4; i++)
{
- var singleData = await MMDataService.MseGetAll();
- ListMSE = singleData.ToList();
- for (int i = 0; i < 3; i++)
- {
- ListMSE.AddRange(singleData);
- }
+ ListMSE.AddRange(singleData);
}
- else
- {
+#else
ListMSE = await MMDataService.MseGetAll();
- }
+#endif
+
}
private async Task setupConf()
diff --git a/MP.Mon/Pages/_Layout.cshtml b/MP.Mon/Pages/_Layout.cshtml
index 49d12f15..7756fe1f 100644
--- a/MP.Mon/Pages/_Layout.cshtml
+++ b/MP.Mon/Pages/_Layout.cshtml
@@ -55,9 +55,5 @@
-
-
-
-