Browse Source
Merge pull request #11222 from volodymyr-babak/hotfix/tb-http-client-edge-entity-alarm
TbHttpClient - ssl proxy fix. EdgeEventSourcing - EntityAlarm processing fix
pull/11240/head
Viacheslav Klimov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
3 deletions
-
application/src/main/java/org/thingsboard/server/service/edge/EdgeEventSourcingListener.java
-
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/rest/TbHttpClient.java
|
|
|
@ -30,6 +30,7 @@ import org.thingsboard.server.common.data.User; |
|
|
|
import org.thingsboard.server.common.data.alarm.Alarm; |
|
|
|
import org.thingsboard.server.common.data.alarm.AlarmApiCallResult; |
|
|
|
import org.thingsboard.server.common.data.alarm.AlarmComment; |
|
|
|
import org.thingsboard.server.common.data.alarm.EntityAlarm; |
|
|
|
import org.thingsboard.server.common.data.audit.ActionType; |
|
|
|
import org.thingsboard.server.common.data.edge.EdgeEventActionType; |
|
|
|
import org.thingsboard.server.common.data.edge.EdgeEventType; |
|
|
|
@ -194,7 +195,7 @@ public class EdgeEventSourcingListener { |
|
|
|
} |
|
|
|
break; |
|
|
|
case ALARM: |
|
|
|
if (entity instanceof AlarmApiCallResult || entity instanceof Alarm) { |
|
|
|
if (entity instanceof AlarmApiCallResult || entity instanceof Alarm || entity instanceof EntityAlarm) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
@ -118,8 +118,8 @@ public class TbHttpClient { |
|
|
|
o.username(proxyUser).password(u -> proxyPassword); |
|
|
|
} |
|
|
|
}); |
|
|
|
SslContext sslContext = SslContextBuilder.forClient().build(); |
|
|
|
httpClient.secure(t -> t.sslContext(sslContext)); |
|
|
|
SslContext sslContext = config.getCredentials().initSslContext(); |
|
|
|
httpClient = httpClient.secure(t -> t.sslContext(sslContext)); |
|
|
|
} |
|
|
|
} else if (!config.isUseSimpleClientHttpFactory()) { |
|
|
|
if (CredentialsType.CERT_PEM == config.getCredentials().getType()) { |
|
|
|
|