Alarm State improvement
This commit is contained in:
parent
953054fadc
commit
46f742441f
@ -255,8 +255,10 @@ class AlarmState {
|
|||||||
if (StringUtils.isNotEmpty(alarmDetailsStr)) {
|
if (StringUtils.isNotEmpty(alarmDetailsStr)) {
|
||||||
for (var keyFilter : ruleState.getAlarmRule().getCondition().getCondition()) {
|
for (var keyFilter : ruleState.getAlarmRule().getCondition().getCondition()) {
|
||||||
EntityKeyValue entityKeyValue = dataSnapshot.getValue(keyFilter.getKey());
|
EntityKeyValue entityKeyValue = dataSnapshot.getValue(keyFilter.getKey());
|
||||||
|
if (entityKeyValue != null) {
|
||||||
alarmDetailsStr = alarmDetailsStr.replaceAll(String.format("\\$\\{%s}", keyFilter.getKey().getKey()), getValueAsString(entityKeyValue));
|
alarmDetailsStr = alarmDetailsStr.replaceAll(String.format("\\$\\{%s}", keyFilter.getKey().getKey()), getValueAsString(entityKeyValue));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ObjectNode newDetails = JacksonUtil.newObjectNode();
|
ObjectNode newDetails = JacksonUtil.newObjectNode();
|
||||||
newDetails.put("data", alarmDetailsStr);
|
newDetails.put("data", alarmDetailsStr);
|
||||||
alarmDetails = newDetails;
|
alarmDetails = newDetails;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user