Merge branch 'release/UpdateDecoderAndUi_221024'
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<Version>1.2.2210.2414</Version>
|
||||
<Version>1.2.2210.2418</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>MAPO-MONO</i>
|
||||
<h4>Version: 1.2.2210.2414</h4>
|
||||
<h4>Version: 1.2.2210.2418</h4>
|
||||
<br /> Release Note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.2210.2414
|
||||
1.2.2210.2418
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.2.2210.2414</version>
|
||||
<version>1.2.2210.2418</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/MP.Mon.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace MP.MONO.Core
|
||||
|
||||
// settings utente
|
||||
public static readonly string ALARMS_SETT_BBIT_KEY = $"{BASE_HASH}:Settings:AlarmsBankBit";
|
||||
public static readonly string ALARMS_SETT_MUTED_KEY = $"{BASE_HASH}:Settings:AlarmsMuted";
|
||||
public static readonly string ALARMS_SETT_RLIST_KEY = $"{BASE_HASH}:Settings:AlarmsRawList";
|
||||
|
||||
// REDIS KEY Dati correnti
|
||||
@@ -85,6 +86,7 @@ namespace MP.MONO.Core
|
||||
|
||||
//REDIS caching keys
|
||||
public static readonly string ALARM_REC = $"{BASE_HASH}:Current:AlarmsRecVal";
|
||||
public static readonly string ALARM_LOG = $"{BASE_HASH}:Current:AlarmsLogVal";
|
||||
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using MP.MONO.Core;
|
||||
using MP.MONO.Data;
|
||||
using MP.MONO.Data.Controllers;
|
||||
using MP.MONO.Data.DbModels;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
@@ -154,6 +155,84 @@ namespace MP.MONO.DECODER
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// restituisce elenco allarmi muted, eventualmente da cache redis ( 5 sec)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private static List<string> alarmMutedList
|
||||
{
|
||||
get
|
||||
{
|
||||
List<string> mutedAlarm = new List<string>();
|
||||
string rawData = "";
|
||||
// cerco in redis...
|
||||
if (redisDb != null)
|
||||
{
|
||||
rawData = redisDb.StringGet(Constants.ALARMS_SETT_MUTED_KEY);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
var rawAlarm = JsonConvert.DeserializeObject<List<string>>(rawData);
|
||||
if (rawAlarm != null)
|
||||
{
|
||||
mutedAlarm = rawAlarm;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti da conf/DB... gestione allarmi muted
|
||||
List<AlarmListModel>? alarmListSetup = new List<AlarmListModel>();
|
||||
rawData = redisDb.StringGet(Constants.ALARMS_SETT_RLIST_KEY);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
alarmListSetup = JsonConvert.DeserializeObject<List<AlarmListModel>>(rawData);
|
||||
}
|
||||
if (alarmListSetup == null)
|
||||
{
|
||||
alarmListSetup = dbController.AlarmListGetAll();
|
||||
}
|
||||
// calcolo come lista string...
|
||||
if (alarmListSetup != null && alarmListSetup.Count > 0)
|
||||
{
|
||||
mutedAlarm = alarmListSetup.Where(x => x.Muted).Select(x => x.FullValue).ToList();
|
||||
}
|
||||
// salvo cache in redis x 1 minuto...
|
||||
rawData = JsonConvert.SerializeObject(mutedAlarm);
|
||||
redisDb.StringSet(Constants.ALARMS_SETT_MUTED_KEY, rawData, TimeSpan.FromSeconds(60));
|
||||
}
|
||||
}
|
||||
return mutedAlarm;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua cleanup preliminare allarmi data condizione regext pre/post
|
||||
/// </summary>
|
||||
/// <param name="AlarmCleanPre"></param>
|
||||
/// <param name="AlarmCleanPost"></param>
|
||||
/// <param name="alarmListRaw"></param>
|
||||
/// <returns></returns>
|
||||
public static List<string> cleanAlarms(string AlarmCleanPre, string AlarmCleanPost, List<string> alarmListRaw)
|
||||
{
|
||||
List<string> alarmList = new List<string>();
|
||||
// effettuo cleanup degli allarmi con procedura ricerca regexp
|
||||
foreach (var item in alarmListRaw)
|
||||
{
|
||||
string currData = item;
|
||||
// se ho valori trim pre/post li applica...
|
||||
if (!string.IsNullOrEmpty(AlarmCleanPre))
|
||||
{
|
||||
currData = item.Replace(AlarmCleanPre, "");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(AlarmCleanPost))
|
||||
{
|
||||
currData = currData.Replace(AlarmCleanPost, "");
|
||||
}
|
||||
// aggiungo
|
||||
alarmList.Add(currData);
|
||||
}
|
||||
// Restituisco
|
||||
return alarmList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Funzione chiamata x verifica allarmi:
|
||||
/// - fornisce elenco allarmi correnti aggiornati
|
||||
@@ -184,6 +263,16 @@ namespace MP.MONO.DECODER
|
||||
Log.Debug($"Ricezione ZERO allarmi | {alarmListReceived.Count}");
|
||||
}
|
||||
|
||||
// elimino muted da allarmi
|
||||
List<string> listMuted = new List<string>(alarmMutedList);
|
||||
if (listMuted.Count > 0)
|
||||
{
|
||||
foreach (var item in listMuted)
|
||||
{
|
||||
alarmListReceivedOk.Remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
// salvo set allarmi ricevuti...
|
||||
alarmsLastRec = alarmListReceivedOk;
|
||||
Log.Debug($"Salvataggio LastReceived | count {alarmListReceivedOk.Count}");
|
||||
@@ -211,18 +300,7 @@ namespace MP.MONO.DECODER
|
||||
// loggo controllo
|
||||
Log.Debug($"Esito controllo | {alarmListReceivedOk.Count} ricevuti | {alarmListAdded.Count} aggiunti | {alarmListCeased.Count} cessati");
|
||||
#if false
|
||||
// gestione allarmi muted
|
||||
List<AlarmListModel>? mutedAlarmsList = new List<AlarmListModel>();
|
||||
string rawData = redisDb.StringGet(Constants.ALARMS_SETT_RLIST_KEY);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
mutedAlarmsList = JsonConvert.DeserializeObject<List<AlarmListModel>>(rawData);
|
||||
}
|
||||
if (mutedAlarmsList == null)
|
||||
{
|
||||
mutedAlarmsList = dbController.AlarmListGetAll();
|
||||
}
|
||||
|
||||
|
||||
// rileggo da REDIS la conf attuale allarmi già attivi da area ALARM_CURR_KEY
|
||||
|
||||
// FIXME TODO !!! usare una lista thread safe?!?!?
|
||||
@@ -387,7 +465,7 @@ namespace MP.MONO.DECODER
|
||||
|
||||
private static bool useRedis = true;
|
||||
|
||||
private MpDbController dbController = null!;
|
||||
private static MpDbController dbController = null!;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<Version>1.2.2210.2414</Version>
|
||||
<Version>1.2.2210.2418</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+11
-186
@@ -252,6 +252,7 @@ async Task<bool> checkCeasedAlarm(string alarmFullCode)
|
||||
return answ;
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Verifica x TUTTI gli allarmi SE siano cessati topo 4 * periodo di controllo... zero ora e zero dopo...
|
||||
/// </summary>
|
||||
@@ -287,7 +288,8 @@ async Task<bool> checkCloseAllAlarm()
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Recupero da redis le conf (es modi,stati,allarmi)
|
||||
@@ -609,20 +611,22 @@ async void AlarmsValPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
}
|
||||
else if (alarmMode == AlarmReportingMode.RawListBlink)
|
||||
{
|
||||
bool needsWrite = false;
|
||||
try
|
||||
{
|
||||
// decodifico allarmi ricevuti
|
||||
var alarmListRaw = JsonConvert.DeserializeObject<List<string>>(currArgs.newMessage);
|
||||
var alarmListRcvd = alarmListRaw != null ? alarmListRaw : new List<string>();
|
||||
// bonifico allarmi
|
||||
var alarmiListClean = AlarmsBlinkManager.cleanAlarms(AlarmCleanPre, AlarmCleanPost, alarmListRcvd);
|
||||
|
||||
// allarmi correnti
|
||||
List<string> alarmListCurrent = AlarmsBlinkManager.alarmsActAck;
|
||||
|
||||
|
||||
// init classi helper
|
||||
List<string> addedAlarms = new List<string>();
|
||||
List<string> ceasedAlarms = new List<string>();
|
||||
// chiamo procedura in blocco...
|
||||
bool fatto = AlarmsBlinkManager.processData(alarmListRaw, ref alarmListCurrent, ref addedAlarms, ref ceasedAlarms);
|
||||
bool fatto = AlarmsBlinkManager.processData(alarmiListClean, ref alarmListCurrent, ref addedAlarms, ref ceasedAlarms);
|
||||
|
||||
// salvo ed invio subito i current...
|
||||
string serAlarms = JsonConvert.SerializeObject(alarmListCurrent);
|
||||
@@ -631,7 +635,7 @@ async void AlarmsValPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
// se cambiato --> ultimo ricevuto != current...
|
||||
string lastLogList = AlarmsBlinkManager.alarmsLogSaved;
|
||||
// calcolo nuova stringa...
|
||||
string newLogString = string.Join(", ", alarmListRaw);
|
||||
string newLogString = string.Join(", ", alarmiListClean);
|
||||
bool logChanged = !lastLogList.Equals(newLogString);
|
||||
AlarmsBlinkManager.alarmsLogSaved = newLogString;
|
||||
|
||||
@@ -644,8 +648,8 @@ async void AlarmsValPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
DtRif = adesso,
|
||||
MemAddress = "ND",
|
||||
Index = 0,
|
||||
Status = (uint)alarmListRaw.Count,
|
||||
ValDecoded = alarmListRaw.Count > 0 ? string.Join(", ", alarmListRaw) : "All OK"
|
||||
Status = (uint)alarmiListClean.Count,
|
||||
ValDecoded = alarmiListClean.Count > 0 ? string.Join(", ", alarmiListClean) : "All OK"
|
||||
};
|
||||
alarmLogList.Add(newAlarmLog);
|
||||
_ = dbController.AlarmLogInsertMany(alarmLogList).Result;
|
||||
@@ -690,185 +694,6 @@ async void AlarmsValPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
// Loggo quanto fatto
|
||||
Log.Debug($"Chiamato controllo differito per {ceasedAlarms.Count} allarmi cessati");
|
||||
}
|
||||
#if false
|
||||
|
||||
// effettuo selezione dei SOLI allarmi distinct (in caso di cambio posizione...)
|
||||
List<string> alarmList = new List<string>();
|
||||
if (alarmListRaw != null && alarmListRaw.Count > 0)
|
||||
{
|
||||
alarmList = alarmListRaw
|
||||
.GroupBy(x => x)
|
||||
.Select(grp => grp.First())
|
||||
.OrderBy(x => x)
|
||||
.ToList();
|
||||
}
|
||||
Log.Info($"Ricezione update allarmi | {alarmListRaw.Count} --> {alarmList.Count}");
|
||||
|
||||
// salvo set allarmi correnti...
|
||||
setAlarms("LastReceived", alarmList);
|
||||
Log.Debug($"Salvataggio LastReceived | count {alarmList.Count}");
|
||||
|
||||
// gestione allarmi muted
|
||||
List<AlarmListModel>? mutedAlarmsList = new List<AlarmListModel>();
|
||||
string rawData = redisDb.StringGet(Constants.ALARMS_SETT_RLIST_KEY);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
mutedAlarmsList = JsonConvert.DeserializeObject<List<AlarmListModel>>(rawData);
|
||||
}
|
||||
if (mutedAlarmsList == null)
|
||||
{
|
||||
mutedAlarmsList = dbController.AlarmListGetAll();
|
||||
}
|
||||
|
||||
// rileggo da REDIS la conf attuale allarmi già attivi da area ALARM_CURR_KEY
|
||||
|
||||
// FIXME TODO !!! usare una lista thread safe?!?!?
|
||||
List<string> lastAlarms = alarmsActAck;
|
||||
List<string> startedAlarms = new List<string>();
|
||||
List<string> ceasedAlarms = new List<string>();
|
||||
string serAlarms = "";
|
||||
|
||||
// ciclo x ogni allarme ricevuto x vedere se sia INIZIATO o vada filtrato x muted
|
||||
if (alarmList != null)
|
||||
{
|
||||
// ciclo x ogni allarme attivo x verificare se si sia CHIUSO
|
||||
foreach (var newAlarm in alarmList)
|
||||
{
|
||||
var currNewAlarm = newAlarm;
|
||||
// se ho valori trim pre/post li applica...
|
||||
if (!string.IsNullOrEmpty(AlarmCleanPre))
|
||||
{
|
||||
currNewAlarm = currNewAlarm.Replace(AlarmCleanPre, "");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(AlarmCleanPost))
|
||||
{
|
||||
currNewAlarm = currNewAlarm.Replace(AlarmCleanPost, "");
|
||||
}
|
||||
// se AlarmIgnoreEmpty=true + vuoto --> salto
|
||||
if (AlarmIgnoreEmpty && string.IsNullOrWhiteSpace(currNewAlarm))
|
||||
{
|
||||
alarmList.Remove(currNewAlarm);
|
||||
alarmList.Remove(newAlarm);
|
||||
}
|
||||
else
|
||||
{
|
||||
// in primis... se è muted --> lo escludo...
|
||||
bool isMuted = false;
|
||||
var maybeMuted = mutedAlarmsList.Where(x => x.FullValue == currNewAlarm).FirstOrDefault();
|
||||
if (maybeMuted != null)
|
||||
{
|
||||
isMuted = maybeMuted.Muted;
|
||||
}
|
||||
// cerco l'allarme nell'elenco degli allarmi dal DB
|
||||
AlarmListModel? foundAlarm = getAlarmModel(currNewAlarm);
|
||||
|
||||
if (!isMuted)
|
||||
{
|
||||
if (!lastAlarms.Contains(currNewAlarm))
|
||||
{
|
||||
if (foundAlarm != null)
|
||||
{
|
||||
// segno come iniziato...
|
||||
AlarmRecModel newAlarmRec = new AlarmRecModel()
|
||||
{
|
||||
MachineId = MachineId,
|
||||
DtStart = adesso,
|
||||
DtEnd = adesso.AddMinutes(-1),
|
||||
AlarmId = foundAlarm.AlarmId
|
||||
};
|
||||
alarmRecList.Add(newAlarmRec);
|
||||
startedAlarms.Add(currNewAlarm);
|
||||
lastAlarms.Add(currNewAlarm);
|
||||
needsWrite = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// rimuovo da alarmList perché muted...
|
||||
alarmList.Remove(currNewAlarm);
|
||||
alarmList.Remove(newAlarm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// salvo
|
||||
serAlarms = JsonConvert.SerializeObject(lastAlarms);
|
||||
// invio sulla message pipeline corretta TUTTI gli allarmi serializzati
|
||||
alarmsSendPipe.saveAndSendMessage(Constants.ALARM_CURR_KEY, serAlarms);
|
||||
|
||||
// calcolo allarmi cessati...
|
||||
if (lastAlarms != null)
|
||||
{
|
||||
// ciclo x ogni allarme attivo x verificare se si sia CHIUSO
|
||||
foreach (var oldData in lastAlarms)
|
||||
{
|
||||
bool trovato = false;
|
||||
if (alarmList != null)
|
||||
{
|
||||
trovato = alarmList.Contains(oldData);
|
||||
}
|
||||
// se non c'è... segno cessato
|
||||
if (!trovato)
|
||||
{
|
||||
ceasedAlarms.Add(oldData);
|
||||
await Task.Run(async () =>
|
||||
{
|
||||
await checkCeasedAlarm(oldData);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.Debug($"Stato lastAlarms | count {lastAlarms.Count}");
|
||||
|
||||
// gli allarmi cessati avvio un task di verifica dopo periodo di blink
|
||||
if (needsWrite)
|
||||
{
|
||||
Log.Debug($"Preparazione AlarmLogRecord | count {lastAlarms.Count}");
|
||||
|
||||
// preparo dati x alarmLog
|
||||
AlarmLogModel newAlarmLog = new AlarmLogModel()
|
||||
{
|
||||
MachineId = MachineId,
|
||||
DtRif = adesso,
|
||||
MemAddress = "ND",
|
||||
Index = 0,
|
||||
// usare alarmList o lastAlarms
|
||||
Status = (uint)alarmList.Count,
|
||||
ValDecoded = alarmList.Count > 0 ? string.Join(", ", alarmList) : "All OK"
|
||||
};
|
||||
alarmLogList.Add(newAlarmLog);
|
||||
}
|
||||
|
||||
if (lastAlarms != null)
|
||||
{
|
||||
lastAlarms = lastAlarms.OrderBy(x => x).ToList();
|
||||
// serializzo l'elenco allarmi...
|
||||
serAlarms = JsonConvert.SerializeObject(lastAlarms);
|
||||
|
||||
// se vuoto metto controllo x chiusura
|
||||
if (lastAlarms.Count() == 0)
|
||||
{
|
||||
await Task.Run(async () =>
|
||||
{
|
||||
await checkCloseAllAlarm();
|
||||
});
|
||||
}
|
||||
|
||||
// invio sulla message pipeline corretta TUTTI gli allarmi serializzati
|
||||
alarmsSendPipe.saveAndSendMessage(Constants.ALARM_CURR_KEY, serAlarms);
|
||||
|
||||
Log.Debug($"Salvataggio/invio allarmi | serAlarms | count {lastAlarms.Count}");
|
||||
}
|
||||
|
||||
// salvo sul DB
|
||||
_ = dbController.AlarmRecInsertMany(alarmRecList).Result;
|
||||
_ = dbController.AlarmLogInsertMany(alarmLogList).Result;
|
||||
|
||||
Log.Debug($"Effettuato salvataggio su DB | alarmRecList {alarmRecList.Count} | alarmLogList {alarmLogList.Count}");
|
||||
#endif
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>MAPO-MONO</i>
|
||||
<h4>Version: 1.2.2210.2414</h4>
|
||||
<h4>Version: 1.2.2210.2418</h4>
|
||||
<br /> Release Note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.2210.2414
|
||||
1.2.2210.2418
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.2.2210.2414</version>
|
||||
<version>1.2.2210.2418</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/MP.Mon.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -41,6 +41,6 @@
|
||||
//"AlarmRegexp": "^{.*}",
|
||||
"BlinkCount": 3,
|
||||
"DbSampleInt": 60,
|
||||
"BlinkPeriodMSec": 3000
|
||||
"BlinkPeriodMSec": 1200
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,14 +123,14 @@ namespace MP.MONO.Data.Controllers
|
||||
/// <param name="skipRec"></param>
|
||||
/// <param name="numRec"></param>
|
||||
/// <returns></returns>
|
||||
public List<AlarmLogModel> AlarmLogGetFilt(int MachineId, int skipRec, int numRec)
|
||||
public async Task<List<AlarmLogModel>> AlarmLogGetFilt(int MachineId, int skipRec, int numRec)
|
||||
{
|
||||
List<AlarmLogModel> dbResult = new List<AlarmLogModel>();
|
||||
using (MapoMonoContext localDbCtx = new MapoMonoContext())
|
||||
{
|
||||
try
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
dbResult = await localDbCtx
|
||||
.DbSetAlarmLog
|
||||
.AsNoTracking()
|
||||
.Where(x => x.MachineId == MachineId)
|
||||
@@ -138,13 +138,14 @@ namespace MP.MONO.Data.Controllers
|
||||
.OrderByDescending(x => x.AlarmLogId)
|
||||
.Skip(skipRec)
|
||||
.Take(numRec)
|
||||
.ToList();
|
||||
.ToListAsync();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante AlarmLogGetFilt{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
//await Task.Delay(1);
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
@@ -332,14 +333,14 @@ namespace MP.MONO.Data.Controllers
|
||||
/// <param name="skipRec"></param>
|
||||
/// <param name="numRec"></param>
|
||||
/// <returns></returns>
|
||||
public List<AlarmRecModel> AlarmRecGetFilt(int MachineId, int skipRec, int numRec)
|
||||
public async Task<List<AlarmRecModel>> AlarmRecGetFilt(int MachineId, int skipRec, int numRec)
|
||||
{
|
||||
List<AlarmRecModel> dbResult = new List<AlarmRecModel>();
|
||||
using (MapoMonoContext localDbCtx = new MapoMonoContext())
|
||||
{
|
||||
try
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
dbResult = await localDbCtx
|
||||
.DbSetAlarmRec
|
||||
.AsNoTracking()
|
||||
.Where(x => x.MachineId == MachineId)
|
||||
@@ -348,7 +349,7 @@ namespace MP.MONO.Data.Controllers
|
||||
.OrderByDescending(x => x.DtStart)
|
||||
.Skip(skipRec)
|
||||
.Take(numRec)
|
||||
.ToList();
|
||||
.ToListAsync();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<Version>1.2.2210.2414</Version>
|
||||
<Version>1.2.2210.2418</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -378,7 +378,7 @@ void simAlarms()
|
||||
// riaggiungo 1:1 ed invio
|
||||
foreach (var item in NewActiveAlarm)
|
||||
{
|
||||
Thread.Sleep(rand.Next(200, 600));
|
||||
Thread.Sleep(rand.Next(100, 300));
|
||||
currAlarm.Add(item.Key, item.Value);
|
||||
sendActiveAlarm(currAlarm);
|
||||
}
|
||||
@@ -391,7 +391,7 @@ void simAlarms()
|
||||
// riaggiungo 1:1 ed invio
|
||||
foreach (var item in NewActiveAlarm)
|
||||
{
|
||||
Thread.Sleep(rand.Next(200, 600));
|
||||
Thread.Sleep(rand.Next(100, 300));
|
||||
currAlarm.Add(item.Key, item.Value);
|
||||
sendActiveAlarm(currAlarm);
|
||||
}
|
||||
@@ -405,7 +405,7 @@ void simAlarms()
|
||||
// riaggiungo 1:1 ed invio
|
||||
foreach (var item in NewActiveAlarm)
|
||||
{
|
||||
Thread.Sleep(rand.Next(400, 700));
|
||||
Thread.Sleep(rand.Next(100, 300));
|
||||
currAlarm.Add(item.Key, item.Value);
|
||||
sendActiveAlarm(currAlarm);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>MAPO-MONO</i>
|
||||
<h4>Version: 1.2.2210.2414</h4>
|
||||
<h4>Version: 1.2.2210.2418</h4>
|
||||
<br /> Release Note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.2210.2414
|
||||
1.2.2210.2418
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.2.2210.2414</version>
|
||||
<version>1.2.2210.2418</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/MP.Mon.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -7,16 +7,38 @@
|
||||
|
||||
@if (@ListRecords != null)
|
||||
{
|
||||
<div class="card-header px-0 py-1">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-2">
|
||||
<b>Current alarms</b>
|
||||
@if (ListRecords.Count == 0)
|
||||
{
|
||||
<span class="badge m-2 bg-success text-light"><b>@ListRecords.Count</b></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge m-2 bg-danger text-warning "><b>@ListRecords.Count</b></span>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-grid p-0">
|
||||
<NavLink class="btn btn-outline-dark btn-block fw-bold" href="AlarmsAnalysis">
|
||||
<i class="bi bi-bar-chart pe-2" aria-hidden="true"></i> Alarm Analysis
|
||||
</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
if (@ListRecords.Count == 0)
|
||||
{
|
||||
<div class="alert alert-success text-center display-4">All OK</div>
|
||||
<div class="alert alert-success text-center display-4 mb-0">All OK</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<ul class="list-group">
|
||||
@foreach (var item in ListRecords)
|
||||
{
|
||||
<li class="list-group-item alarms list-group-item-action text-warning bg-danger">
|
||||
<li class="list-group-item alarms list-group-item-action text-warning bg-danger px-2">
|
||||
<div class="textConsensed w-100 small" title="order">
|
||||
<div class="small">
|
||||
@item.Title
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.MONO.Core.DTO;
|
||||
using MP.MONO.Data;
|
||||
using MP.MONO.UI.Data;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MP.MONO.UI.Components
|
||||
@@ -49,6 +50,20 @@ namespace MP.MONO.UI.Components
|
||||
|
||||
private List<DisplayDataDTO>? ListRecords { get; set; } = new List<DisplayDataDTO>();
|
||||
|
||||
private selectGlobalToggle currFilter { get; set; } = new selectGlobalToggle();
|
||||
|
||||
private int numAlarm
|
||||
{
|
||||
get => currFilter.numAlarms;
|
||||
set
|
||||
{
|
||||
if (ListRecords != null)
|
||||
{
|
||||
currFilter.numAlarms = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
@@ -81,6 +96,7 @@ namespace MP.MONO.UI.Components
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
numAlarm = ListRecords.Count;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -7,9 +7,11 @@ using MP.MONO.Data.DbModels;
|
||||
using MP.MONO.Data.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using Org.BouncyCastle.Bcpg.OpenPgp;
|
||||
using StackExchange.Redis;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Reflection.PortableExecutable;
|
||||
using static MP.MONO.Core.Enums;
|
||||
|
||||
@@ -117,12 +119,34 @@ namespace MP.MONO.UI.Data
|
||||
/// <returns></returns>
|
||||
public async Task<List<AlarmLogModel>> AlarmLogGetFilt(int machineId, int skipRec, int numRec)
|
||||
{
|
||||
string source = "DB";
|
||||
List<AlarmLogModel> dbResult = new List<AlarmLogModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
string currKey = $"{Constants.ALARM_LOG}:{machineId}:{skipRec}:{numRec}";
|
||||
stopWatch.Start();
|
||||
var dbResult = dbController.AlarmLogGetFilt(machineId, skipRec, numRec);
|
||||
string rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<List<AlarmLogModel>>(rawData);
|
||||
if (tempResult == null)
|
||||
{
|
||||
dbResult = new List<AlarmLogModel>();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = await dbController.AlarmLogGetFilt(machineId, skipRec, numRec);
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
await redisDb.StringSetAsync(currKey, rawData, TimeSpan.FromMilliseconds(1000));
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Trace($"Effettuata lettura da DB AlarmLogGetFilt: {ts.TotalMilliseconds} ms");
|
||||
Log.Debug($"AlarmLogGetFilt | {source} in : {ts.TotalMilliseconds} ms");
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
/// <summary>
|
||||
@@ -190,9 +214,9 @@ namespace MP.MONO.UI.Data
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbController.AlarmRecGetFilt(MachineId, skipRec, numRec);
|
||||
dbResult = await dbController.AlarmRecGetFilt(MachineId, skipRec, numRec);
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
await redisDb.StringSetAsync(currKey, rawData, TimeSpan.FromMilliseconds(500));
|
||||
await redisDb.StringSetAsync(currKey, rawData, TimeSpan.FromMilliseconds(1000));
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
/// Bool: indica se sia richeista analisi per frequenza (vs durata)
|
||||
/// </summary>
|
||||
public bool setFreqDur { get; set; } = true;
|
||||
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -60,6 +61,7 @@
|
||||
if (dtMin != item.dtMin)
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,11 @@ namespace MP.MONO.UI.Data
|
||||
public string rightStringCSS { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// numero allarmi
|
||||
/// </summary>
|
||||
public int numAlarms { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -63,6 +68,9 @@ namespace MP.MONO.UI.Data
|
||||
if (rightStringCSS != item.rightStringCSS)
|
||||
return false;
|
||||
|
||||
if (numAlarms != item.numAlarms)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<Version>1.2.2210.2415</Version>
|
||||
<Version>1.2.2210.2418</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="debug" writeTo="consoleTarget" />
|
||||
<!--<logger name="*" minlevel="debug" writeTo="consoleTarget" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -10,38 +10,71 @@
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<h5 class="pt-1"><i class="bi bi-exclamation-triangle pe-2" aria-hidden="true"></i> <b>ALARMS</b></h5>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-9 float-end">
|
||||
<div class="d-flex flex-row-reverse">
|
||||
<div class="col-12 col-md-6 col-lg-3 d-flex justify-content-between w-100">
|
||||
<div class="col-4">
|
||||
<h5 class="pt-1"><i class="bi bi-exclamation-triangle pe-2" aria-hidden="true"></i> <b>ALARMS</b></h5>
|
||||
</div>
|
||||
<div class="px-2 col-4">
|
||||
<div class="input-group d-flex flex-row-reverse">
|
||||
<div class="input-group-text">
|
||||
<div class="form-check form-check-sm form-switch" title="Setup Alarms (mute/unmute)">
|
||||
<input class="form-check-input" type="checkbox" id="mySwitch" name="setupAlarms" value="@doSetup" unchecked @onclick="() => CheckAuth()">
|
||||
<label class="form-check-label" for="mySwitch">SETUP MODE</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex flex-row-reverse">
|
||||
<div class="p-0">
|
||||
@if (showParams)
|
||||
{
|
||||
<div class="input-group input-group-sm py-1 pt-0">
|
||||
<a class="py-1 text-dark" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight"><i class="fa-solid fa-bars"></i></a>
|
||||
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h3 class="offcanvas-title" id="paramsFilterExampleLabel"><b>FILTERS</b></h3>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<div>
|
||||
Filter by:
|
||||
</div>
|
||||
|
||||
@if (!maxRecordStatus)
|
||||
{
|
||||
<span class="input-group-text ">Num Records:</span>
|
||||
<input class="form-control form-control-sm" id="maxRecord" @bind-value="@MaxRecord" title="Max number of record to retrieve" disabled />
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="maxRecord" title="Max number of record to retrieve">Max record number</label>
|
||||
</div>
|
||||
<div class="input-group py-1 pt-0 px-2">
|
||||
<span class="input-group-text ">Num Records:</span>
|
||||
<input class="form-control form-control-sm" id="maxRecord" @bind-value="@MaxRecord" title="Max number of record to retrieve" disabled />
|
||||
</div>
|
||||
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="DtRefEnd" title="Show alarms from selected date back">Date:</label>
|
||||
</div>
|
||||
<div class="input-group py-1 pt-0 px-2">
|
||||
<label class="input-group-text" title="Analisys: dataset end">Date From:</label>
|
||||
<input @bind="@dtRif" id="DtRefEnd" class="form-control" type="datetime-local" title="Show alarms from selected date back" disabled>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="input-group-text">Num Records:</span>
|
||||
<input class="form-control form-control-sm" id="maxRecord" @bind-value="@MaxRecord" title="Max number of record to retrieve" enabled />
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="maxRecord" title="Max number of record to retrieve">Max record number</label>
|
||||
</div>
|
||||
<div class="input-group input-group-sm py-1 pt-0 px-2">
|
||||
<span class="input-group-text">Num Records:</span>
|
||||
<input class="form-control form-control-sm" id="maxRecord" @bind-value="@MaxRecord" title="Max number of record to retrieve" enabled />
|
||||
</div>
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="DtRefEnd" title="Show alarms from selected date back">Date:</label>
|
||||
</div>
|
||||
<div class="input-group input-group-sm py-1 pt-0 px-2">
|
||||
<label class="input-group-text" title="Analisys: dataset end">Date From:</label>
|
||||
<input @bind="@dtRif" id="DtRefEnd" class="form-control" type="datetime-local" title="Show alarms from selected date back" enabled>
|
||||
</div>
|
||||
}
|
||||
<label class="input-group-text" title="Analisys: dataset end">Date From:</label>
|
||||
<input @bind="@dtRif" id="DtRefEnd" class="form-control" type="datetime-local" title="Show alarms from selected date back">
|
||||
<button class="btn btn-default btn-block " @onclick="toggleShowParams" title="Hide Parameters"><i class="fa-solid fa-ellipsis-vertical"></i></button>
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="input-group input-group-sm pt-1">
|
||||
<button class="btn btn-default btn-block" @onclick="toggleShowParams" title="Show Parameters"><i class="fa-solid fa-ellipsis"></i></button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,35 +82,14 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="p-2">
|
||||
<h5>Current alarms</h5>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="form-check form-check-sm form-switch" title="Setup Alarms (mute/unmute)">
|
||||
<input class="form-check-input" type="checkbox" id="mySwitch" name="setupAlarms" value="@doSetup" unchecked @onclick="() => CheckAuth()">
|
||||
<label class="form-check-label" for="mySwitch">Setup</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="col-3 pe-0">
|
||||
<div class="card">
|
||||
<div class="card-body p-1 mb-0">
|
||||
<AlarmsOverview messageReceived="() => reloadFromMessage()"></AlarmsOverview>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="d-grid">
|
||||
<NavLink class="btn btn-info btn-block" href="AlarmsAnalysis">
|
||||
<i class="bi bi-bar-chart pe-2" aria-hidden="true"></i> Alarm Analysis
|
||||
</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="col-9 ps-1">
|
||||
@if (reqPassw)
|
||||
{
|
||||
<UserAuthCheck checkOk="() => ShowSetup()"></UserAuthCheck>
|
||||
@@ -144,7 +156,7 @@
|
||||
{
|
||||
@if (record.DtEnd < record.DtStart)
|
||||
{
|
||||
<tr class="bg-danger text-warning" >
|
||||
<tr class="bg-danger text-warning">
|
||||
<td class="text-warning text-wrap textConsensed">
|
||||
@record.DtStart.ToString("yyyy.MM.dd HH:mm:ss")
|
||||
</td>
|
||||
@@ -182,11 +194,9 @@
|
||||
</table>
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<div class="card-body">
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using MP.MONO.Data.DbModels;
|
||||
using MP.MONO.UI.Data;
|
||||
using NLog.Fluent;
|
||||
using NLog;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace MP.MONO.UI.Pages
|
||||
@@ -12,6 +12,8 @@ namespace MP.MONO.UI.Pages
|
||||
public string lastUpdate { get; set; } = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}";
|
||||
public bool liveUpdate { get; set; } = true;
|
||||
|
||||
|
||||
|
||||
public bool setLogRec
|
||||
{
|
||||
get => currFilter.isActive;
|
||||
@@ -24,8 +26,45 @@ namespace MP.MONO.UI.Pages
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
aTimer.Elapsed -= ElapsedTimer;
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
}
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
if (!isLoading && liveUpdate)
|
||||
{
|
||||
aTimer.Stop();
|
||||
// inizio misura esecuzione
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => ReloadData(true));
|
||||
});
|
||||
pUpd.Wait();
|
||||
// misuro tempo esecuzione
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
int deltaTime = RefreshPeriod - (int)ts.TotalMilliseconds;
|
||||
aTimer.Interval = deltaTime > 100 ? deltaTime : 100;
|
||||
aTimer.Start();
|
||||
Log.Debug("ElapsedTimer: Timer Restarted");
|
||||
}
|
||||
}
|
||||
private static System.Timers.Timer aTimer = null!;
|
||||
public void StartTimer()
|
||||
{
|
||||
aTimer = new System.Timers.Timer(RefreshPeriod);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
//aTimer.AutoReset = true;
|
||||
aTimer.Start();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -45,7 +84,7 @@ namespace MP.MONO.UI.Pages
|
||||
get => setLogRec ? "Status History mode" : "Single Rec mode";
|
||||
}
|
||||
|
||||
protected int RefreshPeriod { get; set; } = 2000;
|
||||
protected int RefreshPeriod { get; set; } = 3000;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
@@ -92,10 +131,10 @@ namespace MP.MONO.UI.Pages
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData(true);
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
protected async Task ReloadData(bool setChanged)
|
||||
@@ -147,6 +186,7 @@ namespace MP.MONO.UI.Pages
|
||||
protected async Task reloadFromMessage()
|
||||
{
|
||||
isLoading = true;
|
||||
aTimer.Stop();
|
||||
// verifico veto
|
||||
DateTime adesso = DateTime.Now;
|
||||
|
||||
@@ -158,8 +198,11 @@ namespace MP.MONO.UI.Pages
|
||||
StateHasChanged();
|
||||
});
|
||||
|
||||
|
||||
|
||||
await Task.Delay(1);
|
||||
isLoading = false;
|
||||
aTimer.Start();
|
||||
}
|
||||
|
||||
protected async Task ShowSetup()
|
||||
@@ -213,6 +256,11 @@ namespace MP.MONO.UI.Pages
|
||||
private int _numRecord { get; set; } = 10;
|
||||
private selectGlobalToggle currFilter { get; set; } = new selectGlobalToggle();
|
||||
|
||||
private int numAlarm
|
||||
{
|
||||
get => currFilter.numAlarms;
|
||||
}
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => _currPage;
|
||||
@@ -313,7 +361,7 @@ namespace MP.MONO.UI.Pages
|
||||
|
||||
newParams.rightString = "SINGLE REC";
|
||||
newParams.leftString = "STATUS HISTORY";
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
await ReloadData(true);
|
||||
currFilter = newParams;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>MAPO-MONO</i>
|
||||
<h4>Version: 1.2.2210.2415</h4>
|
||||
<h4>Version: 1.2.2210.2418</h4>
|
||||
<br /> Release Note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.2210.2415
|
||||
1.2.2210.2418
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.2.2210.2415</version>
|
||||
<version>1.2.2210.2418</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user