Merge branch 'develop' of https://gitlab.steamware.net/egalware/mapo-mono into develop
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-text">
|
||||
<span class="me-1 @leftStringCSS">@leftString</span>
|
||||
<div class="form-check form-check-sm form-switch py-1" title="Parameter View Mode (RealTime / LogData)">
|
||||
<input class="form-check-input" type="checkbox" id="mySwitch" name="setupAlarms" checked @onclick="() => toggle()">
|
||||
</div>
|
||||
<span class="@rightStringCSS">@rightString</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.MONO.UI.Data;
|
||||
|
||||
namespace MP.MONO.UI.Components
|
||||
{
|
||||
public partial class ToggleModes
|
||||
{
|
||||
[Parameter]
|
||||
public EventCallback<selectGlobalToggle> FilterChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public selectGlobalToggle SelFilter { get; set; } = new selectGlobalToggle();
|
||||
|
||||
protected bool isActive
|
||||
{
|
||||
get => SelFilter.isActive;
|
||||
set
|
||||
{
|
||||
if (SelFilter.isActive != value)
|
||||
{
|
||||
SelFilter.isActive = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string leftString
|
||||
{
|
||||
get => SelFilter.leftString;
|
||||
set
|
||||
{
|
||||
if (SelFilter.leftString != value)
|
||||
{
|
||||
SelFilter.leftString = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected string leftStringCSS
|
||||
{
|
||||
get => SelFilter.leftStringCSS;
|
||||
set
|
||||
{
|
||||
if (SelFilter.leftStringCSS != value)
|
||||
{
|
||||
SelFilter.leftStringCSS = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected string rightString
|
||||
{
|
||||
get => SelFilter.rightString;
|
||||
set
|
||||
{
|
||||
if (SelFilter.rightString != value)
|
||||
{
|
||||
SelFilter.rightString = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected string rightStringCSS
|
||||
{
|
||||
get => SelFilter.rightStringCSS;
|
||||
set
|
||||
{
|
||||
if (SelFilter.rightStringCSS != value)
|
||||
{
|
||||
SelFilter.rightStringCSS = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void toggle()
|
||||
{
|
||||
var currFilt = SelFilter;
|
||||
currFilt.isActive = !currFilt.isActive;
|
||||
SelFilter = currFilt;
|
||||
if (isActive)
|
||||
{
|
||||
rightStringCSS = "fw-bold";
|
||||
leftStringCSS = "text-secondary";
|
||||
}
|
||||
else
|
||||
{
|
||||
leftStringCSS = "fw-bold";
|
||||
rightStringCSS = "text-secondary";
|
||||
}
|
||||
}
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (isActive)
|
||||
{
|
||||
rightStringCSS = "fw-bold";
|
||||
leftStringCSS = "text-secondary";
|
||||
}
|
||||
else
|
||||
{
|
||||
leftStringCSS = "fw-bold";
|
||||
rightStringCSS = "text-secondary";
|
||||
}
|
||||
await FilterChanged.InvokeAsync(SelFilter);
|
||||
}
|
||||
|
||||
private void reportChange()
|
||||
{
|
||||
FilterChanged.InvokeAsync(SelFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
31e9cc1c2e8f30a1b4098cb157d712f11f3f2e60fb74169a354c3fa646d6d0e28518b4e3139f844b25824fbcc4340051fc507d22c1c2d2786d3786c777c31cc3
|
||||
467e4b24bc3fe9d237169aa274ae589b64f072fb1cd91f4d79aaee76c64afbfced7fb51536b62cf612dedfb304202a1e653778b7cc8c758f83bb058984460301
|
||||
@@ -0,0 +1,76 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace MP.MONO.UI.Data
|
||||
{
|
||||
public class selectGlobalToggle
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public selectGlobalToggle()
|
||||
{ }
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Bool: indica se il toggle è attivo
|
||||
/// </summary>
|
||||
public bool isActive { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// string: stringa da mostrare a sinistra (disattivo onInitialize)
|
||||
/// </summary>
|
||||
public string leftString { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// string: stringa da mostrare a destra (attivo onInitialize)
|
||||
/// </summary>
|
||||
public string rightString { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// string: stile stringa da mostrare a sinistra (disattivo onInitialize)
|
||||
/// </summary>
|
||||
public string leftStringCSS { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// string: stile stringa da mostrare a destra (attivo onInitialize)
|
||||
/// </summary>
|
||||
public string rightStringCSS { get; set; } = "";
|
||||
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is selectGlobalToggle item))
|
||||
return false;
|
||||
|
||||
if (isActive != item.isActive)
|
||||
return false;
|
||||
|
||||
if (leftString != item.leftString)
|
||||
return false;
|
||||
|
||||
if (rightString != item.rightString)
|
||||
return false;
|
||||
|
||||
if (leftStringCSS != item.leftStringCSS)
|
||||
return false;
|
||||
|
||||
if (rightStringCSS != item.rightStringCSS)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@
|
||||
<h5 class="py-1" cla>Alarm History</h5>
|
||||
</div>
|
||||
<div class="col-8 d-flex justify-content-between">
|
||||
<div class="input-group input-group-sm">
|
||||
@*<div class="input-group input-group-sm">
|
||||
<div class="input-group-text">
|
||||
<span class="me-1 @SRCSSmode">SINGLE REC</span>
|
||||
<div class="form-check form-check-sm form-switch py-1" title="Parameter View Mode (RealTime / LogData)">
|
||||
@@ -106,7 +106,8 @@
|
||||
</div>
|
||||
<span class="@SHCSSmode">STATUS HISTORY</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<ToggleModes FilterChanged="updateFilter"></ToggleModes>
|
||||
<div class="px-2 col-4 d-flex justify-content-end">
|
||||
@if (!liveUpdate)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MP.MONO.Data.DbModels;
|
||||
using MP.MONO.UI.Data;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace MP.MONO.UI.Pages
|
||||
@@ -17,7 +18,10 @@ namespace MP.MONO.UI.Pages
|
||||
#region Protected Properties
|
||||
|
||||
public bool liveUpdate { get; set; } = true;
|
||||
public bool setLogRec { get; set; } = true;
|
||||
public bool setLogRec
|
||||
{
|
||||
get => currFilter.isActive;
|
||||
}
|
||||
public string lastUpdate { get; set; } = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}";
|
||||
private bool maxRecordStatus { get; set; } = false;
|
||||
protected string currMode
|
||||
@@ -135,7 +139,7 @@ namespace MP.MONO.UI.Pages
|
||||
numRecord = newNum;
|
||||
}
|
||||
|
||||
|
||||
private selectGlobalToggle currFilter { get; set; } = new selectGlobalToggle();
|
||||
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
@@ -273,22 +277,6 @@ namespace MP.MONO.UI.Pages
|
||||
}
|
||||
await ReloadData(true);
|
||||
}
|
||||
protected async Task toggleRec()
|
||||
{
|
||||
setLogRec = !setLogRec;
|
||||
if (setLogRec)
|
||||
{
|
||||
SHCSSmode = "fw-bold";
|
||||
SRCSSmode = "text-secondary";
|
||||
}
|
||||
else
|
||||
{
|
||||
SRCSSmode = "fw-bold";
|
||||
SHCSSmode = "text-secondary";
|
||||
}
|
||||
await Task.Delay(1);
|
||||
await ReloadData(true);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -351,5 +339,15 @@ namespace MP.MONO.UI.Pages
|
||||
{
|
||||
showParams = !showParams;
|
||||
}
|
||||
private async Task updateFilter(selectGlobalToggle newParams)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await Task.Delay(1);
|
||||
|
||||
newParams.leftString = "SINGLE REC";
|
||||
newParams.rightString = "STATUS HISTORY";
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="col-9 d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<div class="input-group input-group-sm">
|
||||
@*<div class="input-group input-group-sm">
|
||||
<div class="input-group-text">
|
||||
<span class="me-1 @LVCSSmode">LOG VIEW</span>
|
||||
<div class="form-check form-check-sm form-switch py-1" title="Parameter View Mode (RealTime / LogData)">
|
||||
@@ -22,7 +22,8 @@
|
||||
</div>
|
||||
<span class="@RTCSSmode">REAL TIME</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<ToggleModes FilterChanged="updateFilter"></ToggleModes>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<div class="d-flex flex-row-reverse">
|
||||
|
||||
@@ -22,12 +22,16 @@ namespace MP.MONO.UI.Pages
|
||||
}
|
||||
|
||||
protected DataLogFilter SelFilter { get; set; } = new DataLogFilter();
|
||||
protected selectGlobalToggle currFilter { get; set; } = new selectGlobalToggle();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected bool isRT = true;
|
||||
protected bool isRT
|
||||
{
|
||||
get => currFilter.isActive;
|
||||
}
|
||||
protected double sampleSecMin = 1;
|
||||
protected string RTCSSmode = "fw-bold";
|
||||
protected string LVCSSmode = "text-secondary";
|
||||
@@ -121,25 +125,21 @@ namespace MP.MONO.UI.Pages
|
||||
selParams = new List<string>();
|
||||
}
|
||||
|
||||
protected void toggleRT()
|
||||
{
|
||||
isRT = !isRT;
|
||||
if (isRT)
|
||||
{
|
||||
RTCSSmode = "fw-bold";
|
||||
LVCSSmode = "text-secondary";
|
||||
}
|
||||
else
|
||||
{
|
||||
LVCSSmode = "fw-bold";
|
||||
RTCSSmode = "text-secondary";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
private void toggleShowParams()
|
||||
{
|
||||
showParam = !showParam;
|
||||
}
|
||||
private async Task updateFilter(selectGlobalToggle newParams)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await Task.Delay(1);
|
||||
|
||||
newParams.leftString = "Log View";
|
||||
newParams.rightString = "Real Time";
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,13 +23,14 @@
|
||||
<div class="col-9 d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-text">
|
||||
@*<div class="input-group-text">
|
||||
<span class="me-1 @LVCSSmode">LOG VIEW</span>
|
||||
<div class="form-check form-check-sm form-switch py-1" title="Parameter View Mode (RealTime / LogData)">
|
||||
<input class="form-check-input" type="checkbox" id="mySwitch" name="setupAlarms" value="@isRT" checked @onclick="() => toggleRT()">
|
||||
</div>
|
||||
<span class="@RTCSSmode">REAL TIME</span>
|
||||
</div>
|
||||
</div>*@
|
||||
<ToggleModes FilterChanged="updateFilter"></ToggleModes>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
|
||||
@@ -32,7 +32,10 @@ namespace MP.MONO.UI.Pages
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected bool isRT = true;
|
||||
protected bool isRT
|
||||
{
|
||||
get => currFilter.isActive;
|
||||
}
|
||||
protected double sampleSecMin = 1;
|
||||
protected string RTCSSmode= "fw-bold";
|
||||
protected string LVCSSmode= "text-secondary";
|
||||
@@ -80,7 +83,7 @@ namespace MP.MONO.UI.Pages
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private selectGlobalToggle currFilter { get; set; } = new selectGlobalToggle();
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
@@ -93,7 +96,7 @@ namespace MP.MONO.UI.Pages
|
||||
}
|
||||
}
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
{
|
||||
ListRecords = await MMDataService.getTools();
|
||||
}
|
||||
protected string lastTool
|
||||
@@ -137,22 +140,16 @@ namespace MP.MONO.UI.Pages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void toggleRT()
|
||||
private async Task updateFilter(selectGlobalToggle newParams)
|
||||
{
|
||||
isRT = !isRT;
|
||||
if (isRT)
|
||||
{
|
||||
RTCSSmode = "fw-bold";
|
||||
LVCSSmode = "text-secondary";
|
||||
}
|
||||
else
|
||||
{
|
||||
LVCSSmode = "fw-bold";
|
||||
RTCSSmode = "text-secondary";
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
await Task.Delay(1);
|
||||
|
||||
newParams.leftString = "Log View";
|
||||
newParams.rightString = "Real Time";
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
}
|
||||
#endregion Protected Methods
|
||||
private void toggleShowParams()
|
||||
{
|
||||
|
||||
@@ -2,55 +2,55 @@
|
||||
"AdapterType": "Ethernet 802.3",
|
||||
"AddressWidth": "64",
|
||||
"Architecture": "9",
|
||||
"BiosVersion": "ALASKA - 1072009",
|
||||
"BuildNumber": "19044",
|
||||
"Caption": "Microsoft Windows 10 Pro N",
|
||||
"ConfiguredClockSpeed": "3600",
|
||||
"BiosVersion": "_ASUS_ - 1072009",
|
||||
"BuildNumber": "19043",
|
||||
"Caption": "Microsoft Windows 10 Pro",
|
||||
"ConfiguredClockSpeed": "2400",
|
||||
"ConfiguredVoltage": "1200",
|
||||
"CpuVersion": "Modello 1, Stepping 0",
|
||||
"CurrentClockSpeed": "3501",
|
||||
"CurrentVoltage": "11",
|
||||
"CurrentClockSpeed": "2200",
|
||||
"CurrentVoltage": "12",
|
||||
"DataWidth": "64",
|
||||
"Description": "AMD64 Family 23 Model 113 Stepping 0",
|
||||
"DeviceLocator": "DIMM 1",
|
||||
"Description": "AMD64 Family 23 Model 17 Stepping 0",
|
||||
"DeviceLocator": "ChannelA-DIMM0",
|
||||
"ExtClock": "100",
|
||||
"Family": "107",
|
||||
"FormFactor": "8",
|
||||
"GUID": "{E76995C4-F180-406E-B9C3-E491C65A8FCF}",
|
||||
"L2CacheSize": "8192",
|
||||
"L3CacheSize": "65536",
|
||||
"FormFactor": "12",
|
||||
"GUID": "{7F313732-DBA3-46E5-9FA7-BEF235B0682E}",
|
||||
"L2CacheSize": "2048",
|
||||
"L3CacheSize": "4096",
|
||||
"Level": "23",
|
||||
"LoadPercentage": "31",
|
||||
"MACAddress": "0C:9D:92:B8:FD:E8",
|
||||
"Manufacturer": "American Megatrends International, LLC.",
|
||||
"LoadPercentage": "8",
|
||||
"MACAddress": "4C:ED:FB:D9:78:83",
|
||||
"Manufacturer": "American Megatrends Inc.",
|
||||
"MaxNumberOfProcesses": "4294967295",
|
||||
"MaxProcessMemorySize": "137438953344",
|
||||
"MaxVoltage": "1200",
|
||||
"MinVoltage": "1200",
|
||||
"Name": "ASUS XG-C100C 10G PCI-E Network Adapter",
|
||||
"NumberOfCores": "16",
|
||||
"NumberOfLogicalProcessors": "32",
|
||||
"Name": "Realtek PCIe GbE Family Controller",
|
||||
"NumberOfCores": "4",
|
||||
"NumberOfLogicalProcessors": "8",
|
||||
"OSArchitecture": "64 bit",
|
||||
"PartNumber": "CMK64GX4M2D3600C18",
|
||||
"PartNumber": "8ATF1G64HZ-2G3E1 ",
|
||||
"PhysicalAdapter": "True",
|
||||
"ProcessorId": "178BFBFF00870F10",
|
||||
"ProcessorId": "178BFBFF00810F10",
|
||||
"ProcessorType": "3",
|
||||
"ProductName": "ASUS XG-C100C 10G PCI-E Network Adapter",
|
||||
"ReleaseDate": "20210521000000.000000+000",
|
||||
"Revision": "28928",
|
||||
"ProductName": "Realtek PCIe GbE Family Controller",
|
||||
"ReleaseDate": "20190521000000.000000+000",
|
||||
"Revision": "4352",
|
||||
"Role": "CPU",
|
||||
"SerialNumber": "00332-00332-17209-AA940",
|
||||
"ServiceName": "aqnic650",
|
||||
"SMBIOSBIOSVersion": "F33",
|
||||
"SerialNumber": "00330-80951-85780-AA242",
|
||||
"ServiceName": "rt640x64",
|
||||
"SMBIOSBIOSVersion": "X505ZA.311",
|
||||
"SMBIOSMajorVersion": "3",
|
||||
"SMBIOSMemoryType": "26",
|
||||
"SMBIOSMinorVersion": "3",
|
||||
"SocketDesignation": "AM4",
|
||||
"SoftwareElementID": "F33",
|
||||
"SMBIOSMinorVersion": "1",
|
||||
"SocketDesignation": "FP5",
|
||||
"SoftwareElementID": "X505ZA.311",
|
||||
"SoftwareElementState": "3",
|
||||
"Speed": "3600",
|
||||
"Speed": "2400",
|
||||
"SystemBiosMajorVersion": "5",
|
||||
"SystemBiosMinorVersion": "17",
|
||||
"SystemName": "WRKST-R9-SAM",
|
||||
"Version": "10.0.19044"
|
||||
"SystemBiosMinorVersion": "13",
|
||||
"SystemName": "EGALW-NB-004",
|
||||
"Version": "10.0.19043"
|
||||
}
|
||||
Reference in New Issue
Block a user