Showing
5 changed files
with
16 additions
and
17 deletions
@@ -384,7 +384,7 @@ export default angular.module('thingsboard.types', []) | @@ -384,7 +384,7 @@ export default angular.module('thingsboard.types', []) | ||
384 | entityView: "ENTITY_VIEW", | 384 | entityView: "ENTITY_VIEW", |
385 | edge: "EDGE" | 385 | edge: "EDGE" |
386 | }, | 386 | }, |
387 | - edgeDownlinksType:{ | 387 | + edgeEventType:{ |
388 | dashboard: "DASHBOARD", | 388 | dashboard: "DASHBOARD", |
389 | asset: "ASSET", | 389 | asset: "ASSET", |
390 | device: "DEVICE", | 390 | device: "DEVICE", |
@@ -405,7 +405,7 @@ export default angular.module('thingsboard.types', []) | @@ -405,7 +405,7 @@ export default angular.module('thingsboard.types', []) | ||
405 | widgetType: "WIDGET_TYPE", | 405 | widgetType: "WIDGET_TYPE", |
406 | adminSettings: "ADMIN_SETTINGS" | 406 | adminSettings: "ADMIN_SETTINGS" |
407 | }, | 407 | }, |
408 | - edgeDownlinksStatus: { | 408 | + getEdgeStatus: { |
409 | "DEPLOYED": { | 409 | "DEPLOYED": { |
410 | name: "edge.deployed", | 410 | name: "edge.deployed", |
411 | color: grey900 | 411 | color: grey900 |
@@ -43,11 +43,11 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD | @@ -43,11 +43,11 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD | ||
43 | } | 43 | } |
44 | var content = ''; | 44 | var content = ''; |
45 | switch(scope.downlink.type) { | 45 | switch(scope.downlink.type) { |
46 | - case types.edgeDownlinksType.relation: | 46 | + case types.edgeEventType.relation: |
47 | content = angular.toJson(scope.downlink.body); | 47 | content = angular.toJson(scope.downlink.body); |
48 | showDialog(); | 48 | showDialog(); |
49 | break; | 49 | break; |
50 | - case types.edgeDownlinksType.ruleChainMetaData: | 50 | + case types.edgeEventType.ruleChainMetaData: |
51 | content = ruleChainService.getRuleChainMetaData(scope.downlink.entityId, {ignoreErrors: true}).then( | 51 | content = ruleChainService.getRuleChainMetaData(scope.downlink.entityId, {ignoreErrors: true}).then( |
52 | function success(info) { | 52 | function success(info) { |
53 | showDialog(); | 53 | showDialog(); |
@@ -87,9 +87,9 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD | @@ -87,9 +87,9 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD | ||
87 | } | 87 | } |
88 | 88 | ||
89 | scope.checkEdgeDownlinksType = function (type) { | 89 | scope.checkEdgeDownlinksType = function (type) { |
90 | - return !(type === types.edgeDownlinksType.widgetType || | ||
91 | - type === types.edgeDownlinksType.adminSettings || | ||
92 | - type === types.edgeDownlinksType.widgetsBundle ); | 90 | + return !(type === types.edgeEventType.widgetType || |
91 | + type === types.edgeEventType.adminSettings || | ||
92 | + type === types.edgeEventType.widgetsBundle ); | ||
93 | } | 93 | } |
94 | 94 | ||
95 | scope.checkTooltip = function($event) { | 95 | scope.checkTooltip = function($event) { |
@@ -105,11 +105,11 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD | @@ -105,11 +105,11 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD | ||
105 | scope.updateStatus = function(downlinkCreatedTime) { | 105 | scope.updateStatus = function(downlinkCreatedTime) { |
106 | var status; | 106 | var status; |
107 | if (downlinkCreatedTime < scope.queueStartTs) { | 107 | if (downlinkCreatedTime < scope.queueStartTs) { |
108 | - status = $translate.instant(types.edgeDownlinksStatus.DEPLOYED.name); | ||
109 | - scope.statusColor = types.edgeDownlinksStatus.DEPLOYED.color; | 108 | + status = $translate.instant(types.getEdgeStatus.DEPLOYED.name); |
109 | + scope.statusColor = types.getEdgeStatus.DEPLOYED.color; | ||
110 | } else { | 110 | } else { |
111 | - status = $translate.instant(types.edgeDownlinksStatus.PENDING.name); | ||
112 | - scope.statusColor = types.edgeDownlinksStatus.PENDING.color; | 111 | + status = $translate.instant(types.getEdgeStatus.PENDING.name); |
112 | + scope.statusColor = types.getEdgeStatus.PENDING.color; | ||
113 | } | 113 | } |
114 | return status; | 114 | return status; |
115 | } | 115 | } |
@@ -16,8 +16,8 @@ | @@ -16,8 +16,8 @@ | ||
16 | 16 | ||
17 | --> | 17 | --> |
18 | <div class="tb-cell" flex="20">{{ downlink.createdTime | date : 'yyyy-MM-dd HH:mm:ss' }}</div> | 18 | <div class="tb-cell" flex="20">{{ downlink.createdTime | date : 'yyyy-MM-dd HH:mm:ss' }}</div> |
19 | -<div class="tb-cell" flex="15">{{ downlink.edgeDownlinksTypeText }}</div> | ||
20 | -<div class="tb-cell" flex="15">{{ downlink.edgeDownlinksActionText }}</div> | 19 | +<div class="tb-cell" flex="15">{{ downlink.edgeEventTypeText }}</div> |
20 | +<div class="tb-cell" flex="15">{{ downlink.edgeEventActionText }}</div> | ||
21 | <div class="tb-cell" flex="30">{{ downlink.entityId }}</div> | 21 | <div class="tb-cell" flex="30">{{ downlink.entityId }}</div> |
22 | <div class="tb-cell" flex="10" ng-style="{'color': statusColor}">{{ updateStatus(downlink.createdTime) }}</div> | 22 | <div class="tb-cell" flex="10" ng-style="{'color': statusColor}">{{ updateStatus(downlink.createdTime) }}</div> |
23 | <div class="tb-cell" flex="10"> | 23 | <div class="tb-cell" flex="10"> |
@@ -211,8 +211,8 @@ export default function EdgeDownlinksDirective($compile, $templateCache, $rootSc | @@ -211,8 +211,8 @@ export default function EdgeDownlinksDirective($compile, $templateCache, $rootSc | ||
211 | 211 | ||
212 | data.forEach( | 212 | data.forEach( |
213 | edgeDownlink => { | 213 | edgeDownlink => { |
214 | - edgeDownlink.edgeDownlinksActionText = $translate.instant(types.edgeEventActionTypeTranslations[edgeDownlink.action].name); | ||
215 | - edgeDownlink.edgeDownlinksTypeText = $translate.instant(types.edgeEventTypeTranslations[edgeDownlink.type].name); | 214 | + edgeDownlink.edgeEventActionText = $translate.instant(types.edgeEventActionTypeTranslations[edgeDownlink.action].name); |
215 | + edgeDownlink.edgeEventTypeText = $translate.instant(types.edgeEventTypeTranslations[edgeDownlink.type].name); | ||
216 | } | 216 | } |
217 | ); | 217 | ); |
218 | return data; | 218 | return data; |
@@ -68,8 +68,7 @@ | @@ -68,8 +68,7 @@ | ||
68 | <md-tab ng-if="!vm.grid.detailsConfig.isDetailsEditMode" md-on-select="vm.grid.triggerResize()" label="{{ 'edge.downlinks' | translate }}"> | 68 | <md-tab ng-if="!vm.grid.detailsConfig.isDetailsEditMode" md-on-select="vm.grid.triggerResize()" label="{{ 'edge.downlinks' | translate }}"> |
69 | <tb-edge-downlinks-table flex entity-type="vm.types.entityType.edge" | 69 | <tb-edge-downlinks-table flex entity-type="vm.types.entityType.edge" |
70 | entity-id="vm.grid.operatingItem().id.id" | 70 | entity-id="vm.grid.operatingItem().id.id" |
71 | - tenant-id="vm.grid.operatingItem().tenantId.id" | ||
72 | - default-event-type="{{vm.types.edgeDownlinks.value}}"> | 71 | + tenant-id="vm.grid.operatingItem().tenantId.id"> |
73 | </tb-edge-downlinks-table> | 72 | </tb-edge-downlinks-table> |
74 | </md-tab> | 73 | </md-tab> |
75 | <md-tab ng-if="!vm.grid.detailsConfig.isDetailsEditMode" md-on-select="vm.grid.triggerResize()" label="{{ 'relation.relations' | translate }}"> | 74 | <md-tab ng-if="!vm.grid.detailsConfig.isDetailsEditMode" md-on-select="vm.grid.triggerResize()" label="{{ 'relation.relations' | translate }}"> |