Showing
5 changed files
with
16 additions
and
17 deletions
... | ... | @@ -384,7 +384,7 @@ export default angular.module('thingsboard.types', []) |
384 | 384 | entityView: "ENTITY_VIEW", |
385 | 385 | edge: "EDGE" |
386 | 386 | }, |
387 | - edgeDownlinksType:{ | |
387 | + edgeEventType:{ | |
388 | 388 | dashboard: "DASHBOARD", |
389 | 389 | asset: "ASSET", |
390 | 390 | device: "DEVICE", |
... | ... | @@ -405,7 +405,7 @@ export default angular.module('thingsboard.types', []) |
405 | 405 | widgetType: "WIDGET_TYPE", |
406 | 406 | adminSettings: "ADMIN_SETTINGS" |
407 | 407 | }, |
408 | - edgeDownlinksStatus: { | |
408 | + getEdgeStatus: { | |
409 | 409 | "DEPLOYED": { |
410 | 410 | name: "edge.deployed", |
411 | 411 | color: grey900 | ... | ... |
... | ... | @@ -43,11 +43,11 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD |
43 | 43 | } |
44 | 44 | var content = ''; |
45 | 45 | switch(scope.downlink.type) { |
46 | - case types.edgeDownlinksType.relation: | |
46 | + case types.edgeEventType.relation: | |
47 | 47 | content = angular.toJson(scope.downlink.body); |
48 | 48 | showDialog(); |
49 | 49 | break; |
50 | - case types.edgeDownlinksType.ruleChainMetaData: | |
50 | + case types.edgeEventType.ruleChainMetaData: | |
51 | 51 | content = ruleChainService.getRuleChainMetaData(scope.downlink.entityId, {ignoreErrors: true}).then( |
52 | 52 | function success(info) { |
53 | 53 | showDialog(); |
... | ... | @@ -87,9 +87,9 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD |
87 | 87 | } |
88 | 88 | |
89 | 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 | 95 | scope.checkTooltip = function($event) { |
... | ... | @@ -105,11 +105,11 @@ export default function EdgeDownlinksRowDirective($compile, $templateCache, $mdD |
105 | 105 | scope.updateStatus = function(downlinkCreatedTime) { |
106 | 106 | var status; |
107 | 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 | 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 | 114 | return status; |
115 | 115 | } | ... | ... |
... | ... | @@ -16,8 +16,8 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 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 | 21 | <div class="tb-cell" flex="30">{{ downlink.entityId }}</div> |
22 | 22 | <div class="tb-cell" flex="10" ng-style="{'color': statusColor}">{{ updateStatus(downlink.createdTime) }}</div> |
23 | 23 | <div class="tb-cell" flex="10"> | ... | ... |
... | ... | @@ -211,8 +211,8 @@ export default function EdgeDownlinksDirective($compile, $templateCache, $rootSc |
211 | 211 | |
212 | 212 | data.forEach( |
213 | 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 | 218 | return data; | ... | ... |
... | ... | @@ -68,8 +68,7 @@ |
68 | 68 | <md-tab ng-if="!vm.grid.detailsConfig.isDetailsEditMode" md-on-select="vm.grid.triggerResize()" label="{{ 'edge.downlinks' | translate }}"> |
69 | 69 | <tb-edge-downlinks-table flex entity-type="vm.types.entityType.edge" |
70 | 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 | 72 | </tb-edge-downlinks-table> |
74 | 73 | </md-tab> |
75 | 74 | <md-tab ng-if="!vm.grid.detailsConfig.isDetailsEditMode" md-on-select="vm.grid.triggerResize()" label="{{ 'relation.relations' | translate }}"> | ... | ... |