Update x conflitto allarmi SIM/ADAPTER
- fix alalrmi vuoti - fix abilitazione SIM se no allarmi da simulare - fix conf redis allarmi
This commit is contained in:
@@ -241,25 +241,6 @@ namespace MP.MONO.UI.Data
|
||||
return await Task.FromResult(redResult);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Conf allarmi corrente (area settings)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<AlarmListModel>> getAlarmRLSettings()
|
||||
{
|
||||
List<AlarmListModel>? redResult = new List<AlarmListModel>();
|
||||
string rawData = await redisDb.StringGetAsync(Constants.ALARMS_SETT_RLIST_KEY);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
redResult = JsonConvert.DeserializeObject<List<AlarmListModel>>(rawData);
|
||||
}
|
||||
if (redResult == null)
|
||||
{
|
||||
redResult = await getAlarmRLConfig();
|
||||
}
|
||||
return await Task.FromResult(redResult);
|
||||
}
|
||||
|
||||
public async Task<List<string>> getAlarms()
|
||||
{
|
||||
List<string>? dbResult = new List<string>();
|
||||
@@ -343,11 +324,6 @@ namespace MP.MONO.UI.Data
|
||||
{
|
||||
List<AlarmListModel> mutedList = new List<AlarmListModel>();
|
||||
string rawData = await redisDb.StringGetAsync(Constants.ALARMS_SETT_RLIST_KEY);
|
||||
//se non avessi trovato valori cerco quelli di setup...
|
||||
if (string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
rawData = await redisDb.StringGetAsync(Constants.ALARMS_CONF_RLIST_KEY);
|
||||
}
|
||||
// ora provo a deserializzare
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
@@ -356,7 +332,7 @@ namespace MP.MONO.UI.Data
|
||||
// altrimenti imposto vuoto
|
||||
if (mutedList == null)
|
||||
{
|
||||
mutedList = new List<AlarmListModel>();
|
||||
mutedList = dbController.AlarmListGetAll();
|
||||
}
|
||||
return await Task.FromResult(mutedList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user