diff --git a/ui/src/app/common/types.constant.js b/ui/src/app/common/types.constant.js index 7b37ada832..f48f3e9f03 100644 --- a/ui/src/app/common/types.constant.js +++ b/ui/src/app/common/types.constant.js @@ -389,6 +389,19 @@ export default angular.module('thingsboard.types', []) customer: "CUSTOMER", relation: "RELATION" }, + edgeEventAction: { + updated: "UPDATED", + added: "ADDED", + assignedToEdge: "ASSIGNED_TO_EDGE", + deleted: "DELETED", + unassignedFromEdge: "UNASSIGNED_FROM_EDGE", + alarmAck: "ALARM_ACK", + alarmClear: "ALARM_CLEAR", + credentialsUpdated: "CREDENTIALS_UPDATED", + attributesUpdated: "ATTRIBUTES_UPDATED", + attributesDeleted: "ATTRIBUTES_DELETED", + timeseriesUpdated: "TIMESERIES_UPDATED" + }, importEntityColumnType: { name: { name: 'import.column-type.name', diff --git a/ui/src/app/event/event-row.directive.js b/ui/src/app/event/event-row.directive.js index e5908d88b0..b1b6311e5e 100644 --- a/ui/src/app/event/event-row.directive.js +++ b/ui/src/app/event/event-row.directive.js @@ -102,37 +102,45 @@ export default function EventRowDirective($compile, $templateCache, $mdDialog, $ switch(scope.event.edgeEventType) { case types.edgeEventType.relation: content = angular.toJson(scope.event.entityBody); + showDialog(); break; case types.edgeEventType.ruleChainMetaData: - content = ruleChainService.getRuleChainMetaData(scope.event.entityId, {}).then( + content = ruleChainService.getRuleChainMetaData(scope.event.entityId, {ignoreErrors: true}).then( function success(info) { + showDialog(); return angular.toJson(info); }, function fail() { - toast.showError($translate.instant('edge.load-entity-error')); + showError(); }); break; default: - content = entityService.getEntity(scope.event.edgeEventType, scope.event.entityId, {}).then( + content = entityService.getEntity(scope.event.edgeEventType, scope.event.entityId, {ignoreLoading: true, ignoreErrors: true}).then( function success(info) { + showDialog(); return angular.toJson(info); }, function fail() { - toast.showError($translate.instant('edge.load-entity-error')); + showError(); }); break; } - $mdDialog.show({ - controller: 'EventContentDialogController', - controllerAs: 'vm', - templateUrl: eventErrorDialogTemplate, - locals: {content: content, title: title, contentType: contentType, showingCallback: onShowingCallback}, - parent: angular.element($document[0].body), - fullscreen: true, - targetEvent: $event, - multiple: true, - onShowing: function(scope, element) { - onShowingCallback.onShowing(scope, element); - } - }); + function showDialog() { + $mdDialog.show({ + controller: 'EventContentDialogController', + controllerAs: 'vm', + templateUrl: eventErrorDialogTemplate, + locals: {content: content, title: title, contentType: contentType, showingCallback: onShowingCallback}, + parent: angular.element($document[0].body), + fullscreen: true, + targetEvent: $event, + multiple: true, + onShowing: function(scope, element) { + onShowingCallback.onShowing(scope, element); + } + }); + } + function showError() { + toast.showError($translate.instant('edge.load-entity-error')); + } } scope.checkTooltip = function($event) { diff --git a/ui/src/app/locale/locale.constant-en_US.json b/ui/src/app/locale/locale.constant-en_US.json index bea55fd30e..f8d1c8568a 100644 --- a/ui/src/app/locale/locale.constant-en_US.json +++ b/ui/src/app/locale/locale.constant-en_US.json @@ -821,7 +821,7 @@ "make-private-edge-text": "After the confirmation the edge and all its data will be made private and won't be accessible by others.", "import": "Import edge", "label": "Label", - "load-entity-error": "Could not load entity info", + "load-entity-error": "Entity not found. Failed to load info", "assign-new-edge": "Assign new edge", "manage-edge-dashboards": "Manage edge dashboards", "unassign-from-edge": "Unassign from edge",