-
+
@SelectedParam -
@(LevelVal.Count) rec
+
@if (LevelVal == null || LevelVal.Count == 0)
@@ -15,7 +42,7 @@
}
else
{
-
+
}
diff --git a/MP.MONO.UI/Components/ParamPlot.razor.cs b/MP.MONO.UI/Components/ParamPlot.razor.cs
index a631cef..7f63724 100644
--- a/MP.MONO.UI/Components/ParamPlot.razor.cs
+++ b/MP.MONO.UI/Components/ParamPlot.razor.cs
@@ -3,6 +3,7 @@ using MP.MONO.Core.DTO;
using MP.MONO.Data;
using Newtonsoft.Json;
+
namespace MP.MONO.UI.Components
{
public partial class ParamPlot
@@ -12,8 +13,14 @@ namespace MP.MONO.UI.Components
protected DateTime lastRec = DateTime.Now.AddMinutes(-1);
- protected int sampleSecMin = 2;
+ protected int sampleSecMin = 1;
+ //protected string cssSel(string ParamName)
+ //{
+ // string answ = ParamName == SelVal ? "fa-solid fa-chevron-right" : "";
+ // return answ;
+
+ //}
protected string _selParam { get; set; } = "";
@@ -64,7 +71,15 @@ namespace MP.MONO.UI.Components
await Task.Delay(1);
MMDataService.parametersPipe.EA_NewMessage += ParametersPipe_EA_NewMessage;
}
+ private int maxRecord = 10;
+ private bool showParam = false;
+ private void toggleParam()
+ {
+ showParam = !showParam;
+ }
+
+ //private int inputValue = 123;
private void ParametersPipe_EA_NewMessage(object? sender, EventArgs e)
{
DateTime adesso = DateTime.Now;
@@ -84,6 +99,10 @@ namespace MP.MONO.UI.Components
if (newData != null)
{
LevelVal.Add(new chartJsData.chartJsTSerie() { x = adesso, y = newData.ValueNum });
+ if (LevelVal.Count > maxRecord)
+ {
+ LevelVal.RemoveRange(0, LevelVal.Count - maxRecord);
+ }
}
}
}
diff --git a/MP.MONO.UI/appsettings.json b/MP.MONO.UI/appsettings.json
index 4180e8d..e40715e 100644
--- a/MP.MONO.UI/appsettings.json
+++ b/MP.MONO.UI/appsettings.json
@@ -18,6 +18,7 @@
"nKey": "MONO",
"sKey": "M3T@n0-CH4"
},
+ "maxRecord": 15,
"ExternalProviders": {
"MailKit": {
"SMTP": {