diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcService.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcService.java index 09092d0621..c23fd98d8e 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcService.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcService.java @@ -38,7 +38,7 @@ import org.thingsboard.server.common.data.kv.BasicTsKvEntry; import org.thingsboard.server.common.data.kv.BooleanDataEntry; import org.thingsboard.server.common.data.kv.LongDataEntry; import org.thingsboard.server.common.data.msg.TbMsgType; -import org.thingsboard.server.common.data.notification.rule.trigger.EdgeConnectivityTrigger; +import org.thingsboard.server.common.data.notification.rule.trigger.EdgeConnectionTrigger; import org.thingsboard.server.common.msg.TbMsg; import org.thingsboard.server.common.msg.TbMsgDataType; import org.thingsboard.server.common.msg.TbMsgMetaData; @@ -467,7 +467,7 @@ public class EdgeGrpcService extends EdgeRpcServiceGrpc.EdgeRpcServiceImplBase i edgeState.put(DefaultDeviceStateService.ACTIVITY_STATE, false); edgeState.put(DefaultDeviceStateService.LAST_DISCONNECT_TIME, ts); } - ctx.getNotificationRuleProcessor().process(EdgeConnectivityTrigger.builder() + ctx.getNotificationRuleProcessor().process(EdgeConnectionTrigger.builder() .tenantId(tenantId) .customerId(edge.getCustomerId()) .edgeId(edgeId) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSession.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSession.java index a42a80c318..44bdfcdb1c 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSession.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSession.java @@ -35,7 +35,7 @@ import org.thingsboard.server.common.data.kv.AttributeKvEntry; import org.thingsboard.server.common.data.kv.BaseAttributeKvEntry; import org.thingsboard.server.common.data.kv.LongDataEntry; import org.thingsboard.server.common.data.kv.StringDataEntry; -import org.thingsboard.server.common.data.notification.rule.trigger.EdgeFailureTrigger; +import org.thingsboard.server.common.data.notification.rule.trigger.EdgeCommunicationFailureTrigger; import org.thingsboard.server.common.data.page.PageData; import org.thingsboard.server.common.data.page.PageLink; import org.thingsboard.server.common.data.page.SortOrder; @@ -466,22 +466,24 @@ public final class EdgeGrpcSession implements Closeable { if (isConnected() && sessionState.getPendingMsgsMap().values().size() > 0) { List copy = new ArrayList<>(sessionState.getPendingMsgsMap().values()); if (attempt > 1) { - String errorMsg = String.format("Failed to deliver the batch: {%s}", copy); + String error = "Failed to deliver the batch"; + String failureMsg = String.format("{%s}: {%s}", error, copy); if (attempt == 2) { // Send a failure notification only on the second attempt. // This ensures that failure alerts are sent just once to avoid redundant notifications. - ctx.getNotificationRuleProcessor().process(EdgeFailureTrigger.builder().tenantId(tenantId) - .edgeId(edge.getId()).customerId(edge.getCustomerId()).edgeName(edge.getName()).errorMsg(errorMsg).build()); + ctx.getNotificationRuleProcessor().process(EdgeCommunicationFailureTrigger.builder().tenantId(tenantId) + .edgeId(edge.getId()).customerId(edge.getCustomerId()).edgeName(edge.getName()).failureMsg(failureMsg).error(error).build()); } - log.warn("[{}][{}] {}, attempt: {}", this.tenantId, this.sessionId, errorMsg, attempt); + log.warn("[{}][{}] {}, attempt: {}", this.tenantId, this.sessionId, failureMsg, attempt); } log.trace("[{}][{}][{}] downlink msg(s) are going to be send.", this.tenantId, this.sessionId, copy.size()); for (DownlinkMsg downlinkMsg : copy) { if (this.clientMaxInboundMessageSize != 0 && downlinkMsg.getSerializedSize() > this.clientMaxInboundMessageSize) { - log.error("[{}][{}][{}] Downlink msg size [{}] exceeds client max inbound message size [{}]. Skipping this message. " + - "Please increase value of CLOUD_RPC_MAX_INBOUND_MESSAGE_SIZE env variable on the edge and restart it." + - "Message {}", this.tenantId, edge.getId(), this.sessionId, downlinkMsg.getSerializedSize(), - this.clientMaxInboundMessageSize, downlinkMsg); + String message = String.format("Downlink msg size [{%s}] exceeds client max inbound message size [{%s}]. " + + "Please increase value of CLOUD_RPC_MAX_INBOUND_MESSAGE_SIZE env variable on the edge and restart it.", downlinkMsg.getSerializedSize(), this.clientMaxInboundMessageSize); + log.error("[{}][{}][{}] {} Message {}", this.tenantId, edge.getId(), this.sessionId, message, downlinkMsg); + ctx.getNotificationRuleProcessor().process(EdgeCommunicationFailureTrigger.builder().tenantId(tenantId) + .edgeId(edge.getId()).customerId(edge.getCustomerId()).edgeName(edge.getName()).failureMsg(message).error(message).build()); sessionState.getPendingMsgsMap().remove(downlinkMsg.getDownlinkMsgId()); } else { sendDownlinkMsg(ResponseMsg.newBuilder() @@ -492,11 +494,12 @@ public final class EdgeGrpcSession implements Closeable { if (attempt < MAX_DOWNLINK_ATTEMPTS) { scheduleDownlinkMsgsPackSend(attempt + 1); } else { - String errorMsg = String.format("Failed to deliver messages: %s", copy); + String failureMsg = String.format("Failed to deliver messages: %s", copy); log.warn("[{}][{}] Failed to deliver the batch after {} attempts. Next messages are going to be discarded {}", this.tenantId, this.sessionId, MAX_DOWNLINK_ATTEMPTS, copy); - ctx.getNotificationRuleProcessor().process(EdgeFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) - .customerId(edge.getCustomerId()).edgeName(edge.getName()).errorMsg(errorMsg).build()); + ctx.getNotificationRuleProcessor().process(EdgeCommunicationFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) + .customerId(edge.getCustomerId()).edgeName(edge.getName()).failureMsg(failureMsg) + .error("Failed to deliver messages after " + MAX_DOWNLINK_ATTEMPTS + " attempts").build()); stopCurrentSendDownlinkMsgsTask(false); } } else { @@ -790,10 +793,10 @@ public final class EdgeGrpcSession implements Closeable { } } } catch (Exception e) { - String errorMsg = String.format("Can't process uplink msg [%s] from edge", uplinkMsg); + String failureMsg = String.format("Can't process uplink msg [%s] from edge", uplinkMsg); log.error("[{}][{}] Can't process uplink msg [{}]", this.tenantId, this.sessionId, uplinkMsg, e); - ctx.getNotificationRuleProcessor().process(EdgeFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) - .customerId(edge.getCustomerId()).edgeName(edge.getName()).errorMsg(errorMsg).build()); + ctx.getNotificationRuleProcessor().process(EdgeCommunicationFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) + .customerId(edge.getCustomerId()).edgeName(edge.getName()).failureMsg(failureMsg).error(e.getMessage()).build()); return Futures.immediateFailedFuture(e); } return Futures.allAsList(result); @@ -817,21 +820,22 @@ public final class EdgeGrpcSession implements Closeable { .setMaxInboundMessageSize(maxInboundMessageSize) .build(); } - String errorMsg = String.format("Failed to validate the edge! Provided request secret: %s", request.getEdgeSecret()); - ctx.getNotificationRuleProcessor().process(EdgeFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) - .customerId(edge.getCustomerId()).edgeName(edge.getName()).errorMsg(errorMsg).build()); + String error = "Failed to validate the edge!"; + String failureMsg = String.format("{%s} Provided request secret: %s", error, request.getEdgeSecret()); + ctx.getNotificationRuleProcessor().process(EdgeCommunicationFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) + .customerId(edge.getCustomerId()).edgeName(edge.getName()).failureMsg(failureMsg).error(error).build()); return ConnectResponseMsg.newBuilder() .setResponseCode(ConnectResponseCode.BAD_CREDENTIALS) - .setErrorMsg(errorMsg) + .setErrorMsg(failureMsg) .setConfiguration(EdgeConfiguration.getDefaultInstance()).build(); } catch (Exception e) { - String errorMsg = "Failed to process edge connection!"; - ctx.getNotificationRuleProcessor().process(EdgeFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) - .customerId(edge.getCustomerId()).edgeName(edge.getName()).errorMsg(errorMsg).build()); - log.error(errorMsg, e); + String failureMsg = "Failed to process edge connection!"; + ctx.getNotificationRuleProcessor().process(EdgeCommunicationFailureTrigger.builder().tenantId(tenantId).edgeId(edge.getId()) + .customerId(edge.getCustomerId()).edgeName(edge.getName()).failureMsg(failureMsg).error(e.getMessage()).build()); + log.error(failureMsg, e); return ConnectResponseMsg.newBuilder() .setResponseCode(ConnectResponseCode.SERVER_UNAVAILABLE) - .setErrorMsg(errorMsg) + .setErrorMsg(failureMsg) .setConfiguration(EdgeConfiguration.getDefaultInstance()).build(); } } diff --git a/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeFailureTriggerProcessor.java b/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeCommunicationFailureTriggerProcessor.java similarity index 65% rename from application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeFailureTriggerProcessor.java rename to application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeCommunicationFailureTriggerProcessor.java index afdfa6eb1f..dc54024eec 100644 --- a/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeFailureTriggerProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeCommunicationFailureTriggerProcessor.java @@ -18,18 +18,18 @@ package org.thingsboard.server.service.notification.rule.trigger; import lombok.RequiredArgsConstructor; import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; -import org.thingsboard.server.common.data.notification.info.EdgeFailureNotificationInfo; +import org.thingsboard.server.common.data.notification.info.EdgeCommunicationFailureNotificationInfo; import org.thingsboard.server.common.data.notification.info.RuleOriginatedNotificationInfo; -import org.thingsboard.server.common.data.notification.rule.trigger.EdgeFailureTrigger; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeFailureNotificationRuleTriggerConfig; +import org.thingsboard.server.common.data.notification.rule.trigger.EdgeCommunicationFailureTrigger; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeCommunicationFailureNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.NotificationRuleTriggerType; @Service @RequiredArgsConstructor -public class EdgeFailureTriggerProcessor implements NotificationRuleTriggerProcessor { +public class EdgeCommunicationFailureTriggerProcessor implements NotificationRuleTriggerProcessor { @Override - public boolean matchesFilter(EdgeFailureTrigger trigger, EdgeFailureNotificationRuleTriggerConfig triggerConfig) { + public boolean matchesFilter(EdgeCommunicationFailureTrigger trigger, EdgeCommunicationFailureNotificationRuleTriggerConfig triggerConfig) { if (CollectionUtils.isNotEmpty(triggerConfig.getEdges())) { return !triggerConfig.getEdges().contains(trigger.getEdgeId().getId()); } @@ -37,18 +37,26 @@ public class EdgeFailureTriggerProcessor implements NotificationRuleTriggerProce } @Override - public RuleOriginatedNotificationInfo constructNotificationInfo(EdgeFailureTrigger trigger) { - return EdgeFailureNotificationInfo.builder() + public RuleOriginatedNotificationInfo constructNotificationInfo(EdgeCommunicationFailureTrigger trigger) { + return EdgeCommunicationFailureNotificationInfo.builder() .tenantId(trigger.getTenantId()) .edgeId(trigger.getEdgeId()) .customerId(trigger.getCustomerId()) .edgeName(trigger.getEdgeName()) - .errorMsg(trigger.getErrorMsg()) + .failureMsg(truncateFailureMsg(trigger.getFailureMsg())) .build(); } @Override public NotificationRuleTriggerType getTriggerType() { - return NotificationRuleTriggerType.EDGE_FAILURE; + return NotificationRuleTriggerType.EDGE_COMMUNICATION_FAILURE; + } + + private String truncateFailureMsg(String input) { + int maxLength = 800; + if (input != null && input.length() > maxLength) { + return input.substring(0, maxLength); + } + return input; } } diff --git a/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeConnectivityTriggerProcessor.java b/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeConnectionTriggerProcessor.java similarity index 77% rename from application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeConnectivityTriggerProcessor.java rename to application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeConnectionTriggerProcessor.java index b5418f6abb..ed1ee74622 100644 --- a/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeConnectivityTriggerProcessor.java +++ b/application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/EdgeConnectionTriggerProcessor.java @@ -18,19 +18,19 @@ package org.thingsboard.server.service.notification.rule.trigger; import lombok.RequiredArgsConstructor; import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; -import org.thingsboard.server.common.data.notification.info.EdgeConnectivityNotificationInfo; +import org.thingsboard.server.common.data.notification.info.EdgeConnectionNotificationInfo; import org.thingsboard.server.common.data.notification.info.RuleOriginatedNotificationInfo; -import org.thingsboard.server.common.data.notification.rule.trigger.EdgeConnectivityTrigger; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectivityNotificationRuleTriggerConfig; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectivityNotificationRuleTriggerConfig.EdgeConnectivityEvent; +import org.thingsboard.server.common.data.notification.rule.trigger.EdgeConnectionTrigger; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectionNotificationRuleTriggerConfig; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectionNotificationRuleTriggerConfig.EdgeConnectivityEvent; import org.thingsboard.server.common.data.notification.rule.trigger.config.NotificationRuleTriggerType; @Service @RequiredArgsConstructor -public class EdgeConnectivityTriggerProcessor implements NotificationRuleTriggerProcessor { +public class EdgeConnectionTriggerProcessor implements NotificationRuleTriggerProcessor { @Override - public boolean matchesFilter(EdgeConnectivityTrigger trigger, EdgeConnectivityNotificationRuleTriggerConfig triggerConfig) { + public boolean matchesFilter(EdgeConnectionTrigger trigger, EdgeConnectionNotificationRuleTriggerConfig triggerConfig) { EdgeConnectivityEvent event = trigger.isConnected() ? EdgeConnectivityEvent.CONNECTED : EdgeConnectivityEvent.DISCONNECTED; if (CollectionUtils.isEmpty(triggerConfig.getNotifyOn()) || !triggerConfig.getNotifyOn().contains(event)) { return false; @@ -42,8 +42,8 @@ public class EdgeConnectivityTriggerProcessor implements NotificationRuleTrigger } @Override - public RuleOriginatedNotificationInfo constructNotificationInfo(EdgeConnectivityTrigger trigger) { - return EdgeConnectivityNotificationInfo.builder() + public RuleOriginatedNotificationInfo constructNotificationInfo(EdgeConnectionTrigger trigger) { + return EdgeConnectionNotificationInfo.builder() .eventType(trigger.isConnected() ? "connected" : "disconnected") .tenantId(trigger.getTenantId()) .customerId(trigger.getCustomerId()) @@ -54,7 +54,7 @@ public class EdgeConnectivityTriggerProcessor implements NotificationRuleTrigger @Override public NotificationRuleTriggerType getTriggerType() { - return NotificationRuleTriggerType.EDGE_CONNECTIVITY; + return NotificationRuleTriggerType.EDGE_CONNECTION; } } diff --git a/application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationRuleExportService.java b/application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationRuleExportService.java index 61897aaa55..40d7d7c2b5 100644 --- a/application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationRuleExportService.java +++ b/application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationRuleExportService.java @@ -29,8 +29,8 @@ import org.thingsboard.server.common.data.notification.rule.EscalatedNotificatio import org.thingsboard.server.common.data.notification.rule.NotificationRule; import org.thingsboard.server.common.data.notification.rule.NotificationRuleRecipientsConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.DeviceActivityNotificationRuleTriggerConfig; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectivityNotificationRuleTriggerConfig; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeFailureNotificationRuleTriggerConfig; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectionNotificationRuleTriggerConfig; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeCommunicationFailureNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.NotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.sync.ie.EntityExportData; @@ -75,13 +75,13 @@ public class NotificationRuleExportService getTemplateData() { @@ -47,7 +46,7 @@ public class EdgeFailureNotificationInfo implements RuleOriginatedNotificationIn "tenantId", tenantId.toString(), "edgeId", edgeId.toString(), "edgeName", edgeName, - "errorMsg", errorMsg + "failureMsg", failureMsg ); } diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectivityNotificationInfo.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectionNotificationInfo.java similarity index 95% rename from common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectivityNotificationInfo.java rename to common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectionNotificationInfo.java index 3dfe438ada..e7b6494fdb 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectivityNotificationInfo.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectionNotificationInfo.java @@ -32,7 +32,7 @@ import static org.thingsboard.server.common.data.util.CollectionsUtil.mapOf; @NoArgsConstructor @AllArgsConstructor @Builder -public class EdgeConnectivityNotificationInfo implements RuleOriginatedNotificationInfo { +public class EdgeConnectionNotificationInfo implements RuleOriginatedNotificationInfo { private String eventType; private TenantId tenantId; diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeFailureTrigger.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeCommunicationFailureTrigger.java similarity index 84% rename from common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeFailureTrigger.java rename to common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeCommunicationFailureTrigger.java index 98e1db0527..6400a5c67a 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeFailureTrigger.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeCommunicationFailureTrigger.java @@ -27,13 +27,14 @@ import java.util.concurrent.TimeUnit; @Data @Builder -public class EdgeFailureTrigger implements NotificationRuleTrigger { +public class EdgeCommunicationFailureTrigger implements NotificationRuleTrigger { private final TenantId tenantId; private final CustomerId customerId; private final EdgeId edgeId; private final String edgeName; - private final String errorMsg; + private final String failureMsg; + private final String error; @Override public boolean deduplicate() { @@ -42,17 +43,17 @@ public class EdgeFailureTrigger implements NotificationRuleTrigger { @Override public String getDeduplicationKey() { - return String.join(":", NotificationRuleTrigger.super.getDeduplicationKey(), edgeName, errorMsg); + return String.join(":", NotificationRuleTrigger.super.getDeduplicationKey(), edgeId.toString(), error); } @Override public long getDefaultDeduplicationDuration() { - return TimeUnit.HOURS.toMillis(2); + return TimeUnit.MINUTES.toMillis(30); } @Override public NotificationRuleTriggerType getType() { - return NotificationRuleTriggerType.EDGE_FAILURE; + return NotificationRuleTriggerType.EDGE_COMMUNICATION_FAILURE; } @Override diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeConnectivityTrigger.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeConnectionTrigger.java similarity index 89% rename from common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeConnectivityTrigger.java rename to common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeConnectionTrigger.java index dbbf1e3c74..fe5f6fa6b1 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeConnectivityTrigger.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/EdgeConnectionTrigger.java @@ -23,12 +23,11 @@ import org.thingsboard.server.common.data.id.EntityId; import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.notification.rule.trigger.config.NotificationRuleTriggerType; -import java.util.UUID; import java.util.concurrent.TimeUnit; @Data @Builder -public class EdgeConnectivityTrigger implements NotificationRuleTrigger { +public class EdgeConnectionTrigger implements NotificationRuleTrigger { private final TenantId tenantId; private final CustomerId customerId; @@ -48,12 +47,12 @@ public class EdgeConnectivityTrigger implements NotificationRuleTrigger { @Override public long getDefaultDeduplicationDuration() { - return TimeUnit.HOURS.toMillis(3); + return TimeUnit.MINUTES.toMillis(30); } @Override public NotificationRuleTriggerType getType() { - return NotificationRuleTriggerType.EDGE_CONNECTIVITY; + return NotificationRuleTriggerType.EDGE_CONNECTION; } @Override diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeFailureNotificationRuleTriggerConfig.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeCommunicationFailureNotificationRuleTriggerConfig.java similarity index 85% rename from common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeFailureNotificationRuleTriggerConfig.java rename to common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeCommunicationFailureNotificationRuleTriggerConfig.java index 7dda80b652..595b0fa7d5 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeFailureNotificationRuleTriggerConfig.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeCommunicationFailureNotificationRuleTriggerConfig.java @@ -27,13 +27,13 @@ import java.util.UUID; @NoArgsConstructor @AllArgsConstructor @Builder -public class EdgeFailureNotificationRuleTriggerConfig implements NotificationRuleTriggerConfig { +public class EdgeCommunicationFailureNotificationRuleTriggerConfig implements NotificationRuleTriggerConfig { private Set edges; // if empty - all edges @Override public NotificationRuleTriggerType getTriggerType() { - return NotificationRuleTriggerType.EDGE_FAILURE; + return NotificationRuleTriggerType.EDGE_COMMUNICATION_FAILURE; } } diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeConnectivityNotificationRuleTriggerConfig.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeConnectionNotificationRuleTriggerConfig.java similarity index 84% rename from common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeConnectivityNotificationRuleTriggerConfig.java rename to common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeConnectionNotificationRuleTriggerConfig.java index e79f9b0968..8c0905cc59 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeConnectivityNotificationRuleTriggerConfig.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/EdgeConnectionNotificationRuleTriggerConfig.java @@ -20,7 +20,6 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotEmpty; import java.util.Set; import java.util.UUID; @@ -28,14 +27,14 @@ import java.util.UUID; @NoArgsConstructor @AllArgsConstructor @Builder -public class EdgeConnectivityNotificationRuleTriggerConfig implements NotificationRuleTriggerConfig { +public class EdgeConnectionNotificationRuleTriggerConfig implements NotificationRuleTriggerConfig { private Set edges; // if empty - all edges private Set notifyOn; @Override public NotificationRuleTriggerType getTriggerType() { - return NotificationRuleTriggerType.EDGE_CONNECTIVITY; + return NotificationRuleTriggerType.EDGE_CONNECTION; } public enum EdgeConnectivityEvent { diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerConfig.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerConfig.java index ae2130a3f6..15a5e59255 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerConfig.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerConfig.java @@ -36,8 +36,8 @@ import java.io.Serializable; @Type(value = EntitiesLimitNotificationRuleTriggerConfig.class, name = "ENTITIES_LIMIT"), @Type(value = ApiUsageLimitNotificationRuleTriggerConfig.class, name = "API_USAGE_LIMIT"), @Type(value = RateLimitsNotificationRuleTriggerConfig.class, name = "RATE_LIMITS"), - @Type(value = EdgeConnectivityNotificationRuleTriggerConfig.class, name = "EDGE_CONNECTIVITY"), - @Type(value = EdgeFailureNotificationRuleTriggerConfig.class, name = "EDGE_FAILURE"), + @Type(value = EdgeConnectionNotificationRuleTriggerConfig.class, name = "EDGE_CONNECTION"), + @Type(value = EdgeCommunicationFailureNotificationRuleTriggerConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), }) public interface NotificationRuleTriggerConfig extends Serializable { diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerType.java b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerType.java index 93d26140f0..8469fac752 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerType.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/config/NotificationRuleTriggerType.java @@ -26,8 +26,8 @@ public enum NotificationRuleTriggerType { ALARM_ASSIGNMENT, DEVICE_ACTIVITY, RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT, - EDGE_CONNECTIVITY, - EDGE_FAILURE, + EDGE_CONNECTION, + EDGE_COMMUNICATION_FAILURE, NEW_PLATFORM_VERSION(false), ENTITIES_LIMIT(false), API_USAGE_LIMIT(false), diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/util/TemplateUtils.java b/common/data/src/main/java/org/thingsboard/server/common/data/util/TemplateUtils.java index 3bc2aac1f8..a6b1c11d42 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/util/TemplateUtils.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/util/TemplateUtils.java @@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils; import java.util.Map; import java.util.function.UnaryOperator; +import java.util.regex.Matcher; import java.util.regex.Pattern; import static com.google.common.base.Strings.nullToEmpty; @@ -49,7 +50,7 @@ public class TemplateUtils { value = FUNCTIONS.get(function).apply(value); } } - return value; + return Matcher.quoteReplacement(value); }); } diff --git a/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotificationSettingsService.java b/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotificationSettingsService.java index 3e02f42cba..b42fdd7645 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotificationSettingsService.java +++ b/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotificationSettingsService.java @@ -189,8 +189,8 @@ public class DefaultNotificationSettingsService implements NotificationSettingsS defaultNotifications.create(tenantId, DefaultNotifications.alarmComment, tenantAdmins.getId()); defaultNotifications.create(tenantId, DefaultNotifications.alarmAssignment, affectedUser.getId()); defaultNotifications.create(tenantId, DefaultNotifications.ruleEngineComponentLifecycleFailure, tenantAdmins.getId()); - defaultNotifications.create(tenantId, DefaultNotifications.edgeConnectivity, tenantAdmins.getId()); - defaultNotifications.create(tenantId, DefaultNotifications.edgeFailure, tenantAdmins.getId()); + defaultNotifications.create(tenantId, DefaultNotifications.edgeConnection, tenantAdmins.getId()); + defaultNotifications.create(tenantId, DefaultNotifications.edgeCommunicationFailures, tenantAdmins.getId()); } @Override @@ -210,7 +210,7 @@ public class DefaultNotificationSettingsService implements NotificationSettingsS defaultNotifications.create(tenantId, DefaultNotifications.exceededPerEntityRateLimits, affectedTenantAdmins.getId()); defaultNotifications.create(tenantId, DefaultNotifications.exceededRateLimitsForSysadmin, sysAdmins.getId()); } else { - List requiredNotificationTypes = List.of(NotificationType.EDGE_CONNECTIVITY, NotificationType.EDGE_FAILURE); + List requiredNotificationTypes = List.of(NotificationType.EDGE_CONNECTION, NotificationType.EDGE_COMMUNICATION_FAILURE); List existingNotificationTypes = notificationTemplateService.findNotificationTemplatesByTenantIdAndNotificationTypes( tenantId, requiredNotificationTypes, new PageLink(1)) .getData() @@ -227,11 +227,11 @@ public class DefaultNotificationSettingsService implements NotificationSettingsS for (NotificationType type : requiredNotificationTypes) { if (!existingNotificationTypes.contains(type)) { switch (type) { - case EDGE_CONNECTIVITY: - defaultNotifications.create(tenantId, DefaultNotifications.edgeConnectivity, tenantAdmins.getId()); + case EDGE_CONNECTION: + defaultNotifications.create(tenantId, DefaultNotifications.edgeConnection, tenantAdmins.getId()); break; - case EDGE_FAILURE: - defaultNotifications.create(tenantId, DefaultNotifications.edgeFailure, tenantAdmins.getId()); + case EDGE_COMMUNICATION_FAILURE: + defaultNotifications.create(tenantId, DefaultNotifications.edgeCommunicationFailures, tenantAdmins.getId()); break; } } diff --git a/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotifications.java b/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotifications.java index 4e2cc5bbad..1ef0006e87 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotifications.java +++ b/dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotifications.java @@ -40,9 +40,9 @@ import org.thingsboard.server.common.data.notification.rule.trigger.config.Alarm import org.thingsboard.server.common.data.notification.rule.trigger.config.ApiUsageLimitNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.DeviceActivityNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.DeviceActivityNotificationRuleTriggerConfig.DeviceEvent; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectivityNotificationRuleTriggerConfig; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectivityNotificationRuleTriggerConfig.EdgeConnectivityEvent; -import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeFailureNotificationRuleTriggerConfig; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectionNotificationRuleTriggerConfig; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeConnectionNotificationRuleTriggerConfig.EdgeConnectivityEvent; +import org.thingsboard.server.common.data.notification.rule.trigger.config.EdgeCommunicationFailureNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.EntitiesLimitNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.EntityActionNotificationRuleTriggerConfig; import org.thingsboard.server.common.data.notification.rule.trigger.config.NewPlatformVersionNotificationRuleTriggerConfig; @@ -328,34 +328,33 @@ public class DefaultNotifications { .description("Send notification to tenant admins when any Rule chain or Rule node failed to start, update or stop") .build()) .build(); - public static final DefaultNotification edgeConnectivity = DefaultNotification.builder() - .name("Edge connectivity notification") - .type(NotificationType.EDGE_CONNECTIVITY) - .subject("Edge '${edgeName}' is ${eventType}") + public static final DefaultNotification edgeConnection = DefaultNotification.builder() + .name("Edge connection notification") + .type(NotificationType.EDGE_CONNECTION) + .subject("Edge connection status change") .text("Edge '${edgeName}' is now ${eventType}") .icon("info").color(null) .button("Go to Edge").link("/edgeManagement/instances/${edgeId}") .rule(DefaultRule.builder() - .name("Edge connectivity") - .enabled(false) - .triggerConfig(EdgeConnectivityNotificationRuleTriggerConfig.builder() + .name("Edge connection status change") + .triggerConfig(EdgeConnectionNotificationRuleTriggerConfig.builder() .edges(null) .notifyOn(Set.of(EdgeConnectivityEvent.CONNECTED, EdgeConnectivityEvent.DISCONNECTED)) .build()) - .description("Send notification to tenant admins when Edge changes its connectivity state") + .description("Send notification to tenant admins when the connection status between TB and Edge changes") .build()) .build(); - public static final DefaultNotification edgeFailure = DefaultNotification.builder() - .name("Edge error notification") - .type(NotificationType.EDGE_FAILURE) - .subject("Edge '${edgeName}' received error") - .text("Error message: '${errorMsg}'") - .icon("error").color(null) + public static final DefaultNotification edgeCommunicationFailures = DefaultNotification.builder() + .name("Edge communication failure notification") + .type(NotificationType.EDGE_COMMUNICATION_FAILURE) + .subject("Edge '${edgeName}' communication failure occured") + .text("Failure message: '${failureMsg}'") + .icon("error").color(RED_COLOR) .button("Go to Edge").link("/edgeManagement/instances/${edgeId}") .rule(DefaultRule.builder() - .name("Edge error") - .triggerConfig(EdgeFailureNotificationRuleTriggerConfig.builder().edges(null).build()) - .description("Send notification to tenant admins or to assigned customers to Edge when error occurs") + .name("Edge communication failure") + .triggerConfig(EdgeCommunicationFailureNotificationRuleTriggerConfig.builder().edges(null).build()) + .description("Send notification to tenant admins when communication failures occur") .build()) .build(); diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html index 852cb7a549..f4ae83143f 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html @@ -408,10 +408,10 @@ - + {{ 'notification.edge-trigger-settings' | translate }} -
+
notification.filter @@ -426,9 +426,9 @@ notification.notify-on - - {{ edgeConnectivityEventTranslationMap.get(edgeEvent) | translate }} + placeholder="{{ !edgeConnectionTemplateForm.get('triggerConfig.notifyOn').value?.length ? ('event.all-events' | translate) : '' }}"> + + {{ edgeConnectionEventTranslationMap.get(edgeEvent) | translate }} @@ -445,10 +445,10 @@ - + {{ 'notification.edge-trigger-settings' | translate }} -
+
notification.filter diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.ts b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.ts index 099897af7c..34ff605027 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.ts @@ -68,7 +68,7 @@ import { } from '@shared/models/api-usage.models'; import { LimitedApi, LimitedApiTranslationMap } from '@shared/models/limited-api.models'; import { StringItemsOption } from '@shared/components/string-items-list.component'; -import { EdgeConnectivityEvent, EdgeConnectivityEventTranslationMap } from '@shared/models/edge.models'; +import { EdgeConnectionEvent, EdgeConnectionEventTranslationMap } from '@shared/models/edge.models'; export interface RuleNotificationDialogData { rule?: NotificationRule; @@ -99,8 +99,8 @@ export class RuleNotificationDialogComponent extends apiUsageLimitTemplateForm: FormGroup; newPlatformVersionTemplateForm: FormGroup; rateLimitsTemplateForm: FormGroup; - edgeFailureTemplateForm: FormGroup; - edgeConnectivityTemplateForm: FormGroup; + edgeCommunicationFailureTemplateForm: FormGroup; + edgeConnectionTemplateForm: FormGroup; triggerType = TriggerType; triggerTypes: TriggerType[]; @@ -135,8 +135,8 @@ export class RuleNotificationDialogComponent extends apiFeatures: ApiFeature[] = Object.values(ApiFeature); apiFeatureTranslationMap = ApiFeatureTranslationMap; - edgeConnectivityEvents: EdgeConnectivityEvent[] = Object.values(EdgeConnectivityEvent); - edgeConnectivityEventTranslationMap = EdgeConnectivityEventTranslationMap; + edgeConnectionEvents: EdgeConnectionEvent[] = Object.values(EdgeConnectionEvent); + edgeConnectionEventTranslationMap = EdgeConnectionEventTranslationMap; limitedApis: StringItemsOption[]; @@ -227,14 +227,14 @@ export class RuleNotificationDialogComponent extends } }); - this.edgeConnectivityTemplateForm = this.fb.group({ + this.edgeConnectionTemplateForm = this.fb.group({ triggerConfig: this.fb.group({ edges: [null], notifyOn: [null] }) }); - this.edgeFailureTemplateForm = this.fb.group({ + this.edgeCommunicationFailureTemplateForm = this.fb.group({ triggerConfig: this.fb.group({ edges: [null] }) @@ -348,8 +348,8 @@ export class RuleNotificationDialogComponent extends [TriggerType.API_USAGE_LIMIT, this.apiUsageLimitTemplateForm], [TriggerType.NEW_PLATFORM_VERSION, this.newPlatformVersionTemplateForm], [TriggerType.RATE_LIMITS, this.rateLimitsTemplateForm], - [TriggerType.EDGE_FAILURE, this.edgeFailureTemplateForm], - [TriggerType.EDGE_CONNECTIVITY, this.edgeConnectivityTemplateForm] + [TriggerType.EDGE_COMMUNICATION_FAILURE, this.edgeCommunicationFailureTemplateForm], + [TriggerType.EDGE_CONNECTION, this.edgeConnectionTemplateForm] ]); if (data.isAdd || data.isCopy) { diff --git a/ui-ngx/src/app/shared/models/edge.models.ts b/ui-ngx/src/app/shared/models/edge.models.ts index 4da5f089a0..569b2bec8a 100644 --- a/ui-ngx/src/app/shared/models/edge.models.ts +++ b/ui-ngx/src/app/shared/models/edge.models.ts @@ -191,14 +191,14 @@ export enum EdgeInstructionsMethod { export const edgeVersionAttributeKey = 'edgeVersion'; -export enum EdgeConnectivityEvent { +export enum EdgeConnectionEvent { CONNECTED= 'CONNECTED', DISCONNECTED = 'DISCONNECTED' } -export const EdgeConnectivityEventTranslationMap = new Map( +export const EdgeConnectionEventTranslationMap = new Map( [ - [EdgeConnectivityEvent.CONNECTED, 'edge-event.connected'], - [EdgeConnectivityEvent.DISCONNECTED, 'edge-event.disconnected'] + [EdgeConnectionEvent.CONNECTED, 'edge.connected'], + [EdgeConnectionEvent.DISCONNECTED, 'edge.disconnected'] ] ); diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index d23e6c5f84..ae945b243c 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -475,8 +475,8 @@ export enum NotificationType { NEW_PLATFORM_VERSION = 'NEW_PLATFORM_VERSION', RULE_NODE = 'RULE_NODE', RATE_LIMITS = 'RATE_LIMITS', - EDGE_CONNECTIVITY = 'EDGE_CONNECTIVITY', - EDGE_FAILURE = 'EDGE_FAILURE' + EDGE_CONNECTION = 'EDGE_CONNECTION', + EDGE_COMMUNICATION_FAILURE = 'EDGE_COMMUNICATION_FAILURE' } export const NotificationTypeIcons = new Map([ @@ -588,16 +588,16 @@ export const NotificationTemplateTypeTranslateMap = new Map([ @@ -628,8 +628,8 @@ export const TriggerTypeTranslationMap = new Map([ [TriggerType.API_USAGE_LIMIT, 'notification.trigger.api-usage-limit'], [TriggerType.NEW_PLATFORM_VERSION, 'notification.trigger.new-platform-version'], [TriggerType.RATE_LIMITS, 'notification.trigger.rate-limits'], - [TriggerType.EDGE_CONNECTIVITY, 'notification.trigger.edge-connectivity'], - [TriggerType.EDGE_FAILURE, 'notification.trigger.edge-failure'] + [TriggerType.EDGE_CONNECTION, 'notification.trigger.edge-connection'], + [TriggerType.EDGE_COMMUNICATION_FAILURE, 'notification.trigger.edge-communication-failure'] ]); export interface NotificationUserSettings { diff --git a/ui-ngx/src/assets/help/en_US/notification/edge_failure.md b/ui-ngx/src/assets/help/en_US/notification/edge_communication_failure.md similarity index 78% rename from ui-ngx/src/assets/help/en_US/notification/edge_failure.md rename to ui-ngx/src/assets/help/en_US/notification/edge_communication_failure.md index d0aaba21a0..03f2a2816a 100644 --- a/ui-ngx/src/assets/help/en_US/notification/edge_failure.md +++ b/ui-ngx/src/assets/help/en_US/notification/edge_communication_failure.md @@ -11,7 +11,7 @@ Available template parameters: * `edgeId` - the edge id as uuid string; * `edgeName` - the name of the edge; -* `errorMsg` - the string representation of the error, occurred on the Edge; +* `failureMsg` - the string representation of the failure, occurred on the Edge; Parameter names must be wrapped using `${...}`. For example: `${edgeName}`. You may also modify the value of the parameter with one of the suffixes: @@ -28,14 +28,14 @@ Let's assume the notification about the failing of processing connection to Edge The following template: ```text -Edge '${edgeName}' received error +Edge '${edgeName}' communication failure occurred {:copy-code} ``` will be transformed to: ```text -Edge 'DatacenterEdge' received error +Edge 'DatacenterEdge' communication failure occurred ```
@@ -43,14 +43,14 @@ Edge 'DatacenterEdge' received error The following template: ```text -Error message: '${errorMsg}' +Failure message: '${failureMsg}' {:copy-code} ``` will be transformed to: ```text -Error message: 'Failed to process edge connection!' +Failure message: 'Failed to process edge connection!' ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/edge_connectivity.md b/ui-ngx/src/assets/help/en_US/notification/edge_connection.md similarity index 84% rename from ui-ngx/src/assets/help/en_US/notification/edge_connectivity.md rename to ui-ngx/src/assets/help/en_US/notification/edge_connection.md index 2044ecf708..fed6c0372e 100644 --- a/ui-ngx/src/assets/help/en_US/notification/edge_connectivity.md +++ b/ui-ngx/src/assets/help/en_US/notification/edge_connection.md @@ -28,30 +28,17 @@ Let's assume the notification about the connecting Edge into the ThingsBoard. The following template: ```text -Edge '${edgeName}' is ${eventType} +Edge '${edgeName}' is now ${eventType} {:copy-code} ``` will be transformed to: ```text -Edge 'DatacenterEdge' is connected +Edge 'DatacenterEdge' is now connected ```
-The following template: - -```text -"Edge '${edgeName}' is now ${eventType}" -{:copy-code} -``` - -will be transformed to: - -```text -Edge 'DatacenterEdge' is now connected -``` -

diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 63b791a6ef..74879d0420 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2030,7 +2030,9 @@ "missing-related-rule-chains-title": "Edge has missing related rule chain(s)", "missing-related-rule-chains-text": "Assigned to edge rule chain(s) use rule nodes that forward message(s) to rule chain(s) that are not assigned to this edge.

List of missing rule chain(s):
{{missingRuleChains}}", "upgrade-instructions": "Upgrade Instructions", - "widget-datasource-error": "This widget supports only EDGE entity datasource" + "widget-datasource-error": "This widget supports only EDGE entity datasource", + "connected": "Connected", + "disconnected": "Disconnected" }, "edge-event": { "type-dashboard": "Dashboard", @@ -2073,9 +2075,7 @@ "action-type-assigned-to-edge": "Assigned to Edge", "action-type-unassigned-from-edge": "Unassigned from Edge", "action-type-credentials-request": "Credentials Request", - "action-type-entity-merge-request": "Entity Merge Request", - "connected": "Connected", - "disconnected": "Disconnected" + "action-type-entity-merge-request": "Entity Merge Request" }, "error": { "unable-to-connect": "Unable to connect to the server! Please check your internet connection.", @@ -3430,8 +3430,8 @@ "rule-node": "Rule node", "new-platform-version": "New platform version", "rate-limits": "Exceeded rate limits", - "edge-failure": "Edge error", - "edge-connectivity": "Edge connectivity" + "edge-communication-failure": "Edge communication failure", + "edge-connection": "Edge connection" }, "templates": "Templates", "notification-templates": "Notifications / Templates", @@ -3452,8 +3452,8 @@ "rule-engine-lifecycle-event": "Rule engine lifecycle event", "new-platform-version": "New platform version", "rate-limits": "Exceeded rate limits", - "edge-connectivity": "Edge connectivity", - "edge-failure": "Edge failure", + "edge-connection": "Edge connection", + "edge-communication-failure": "Edge communication failure", "trigger": "Trigger", "trigger-required": "Trigger is required" },