Commit 73473e3bebf1b62a26558ce30ba3ab4f9801a3a4
1 parent
8f3fbc94
Rule Chain: Update tooltip messages
Showing
3 changed files
with
17 additions
and
5 deletions
@@ -464,7 +464,7 @@ export default angular.module('thingsboard.types', []) | @@ -464,7 +464,7 @@ export default angular.module('thingsboard.types', []) | ||
464 | clazz: 'tb.internal.RuleChain', | 464 | clazz: 'tb.internal.RuleChain', |
465 | configurationDescriptor: { | 465 | configurationDescriptor: { |
466 | nodeDefinition: { | 466 | nodeDefinition: { |
467 | - description: "Forwards incoming messages to specified Rule Chain", | 467 | + description: "", |
468 | details: "Forwards incoming messages to specified Rule Chain", | 468 | details: "Forwards incoming messages to specified Rule Chain", |
469 | inEnabled: true, | 469 | inEnabled: true, |
470 | outEnabled: false, | 470 | outEnabled: false, |
@@ -483,30 +483,35 @@ export default angular.module('thingsboard.types', []) | @@ -483,30 +483,35 @@ export default angular.module('thingsboard.types', []) | ||
483 | FILTER: { | 483 | FILTER: { |
484 | value: "FILTER", | 484 | value: "FILTER", |
485 | name: "rulenode.type-filter", | 485 | name: "rulenode.type-filter", |
486 | + details: "rulenode.type-filter-details", | ||
486 | nodeClass: "tb-filter-type", | 487 | nodeClass: "tb-filter-type", |
487 | icon: "filter_list" | 488 | icon: "filter_list" |
488 | }, | 489 | }, |
489 | ENRICHMENT: { | 490 | ENRICHMENT: { |
490 | value: "ENRICHMENT", | 491 | value: "ENRICHMENT", |
491 | name: "rulenode.type-enrichment", | 492 | name: "rulenode.type-enrichment", |
493 | + details: "rulenode.type-enrichment-details", | ||
492 | nodeClass: "tb-enrichment-type", | 494 | nodeClass: "tb-enrichment-type", |
493 | icon: "playlist_add" | 495 | icon: "playlist_add" |
494 | }, | 496 | }, |
495 | TRANSFORMATION: { | 497 | TRANSFORMATION: { |
496 | value: "TRANSFORMATION", | 498 | value: "TRANSFORMATION", |
497 | name: "rulenode.type-transformation", | 499 | name: "rulenode.type-transformation", |
500 | + details: "rulenode.type-transformation-details", | ||
498 | nodeClass: "tb-transformation-type", | 501 | nodeClass: "tb-transformation-type", |
499 | icon: "transform" | 502 | icon: "transform" |
500 | }, | 503 | }, |
501 | ACTION: { | 504 | ACTION: { |
502 | value: "ACTION", | 505 | value: "ACTION", |
503 | name: "rulenode.type-action", | 506 | name: "rulenode.type-action", |
507 | + details: "rulenode.type-action-details", | ||
504 | nodeClass: "tb-action-type", | 508 | nodeClass: "tb-action-type", |
505 | icon: "flash_on" | 509 | icon: "flash_on" |
506 | }, | 510 | }, |
507 | RULE_CHAIN: { | 511 | RULE_CHAIN: { |
508 | value: "RULE_CHAIN", | 512 | value: "RULE_CHAIN", |
509 | name: "rulenode.type-rule-chain", | 513 | name: "rulenode.type-rule-chain", |
514 | + details: "rulenode.type-rule-chain-details", | ||
510 | nodeClass: "tb-rule-chain-type", | 515 | nodeClass: "tb-rule-chain-type", |
511 | icon: "settings_ethernet" | 516 | icon: "settings_ethernet" |
512 | }, | 517 | }, |
@@ -1186,10 +1186,15 @@ export default angular.module('thingsboard.locale', []) | @@ -1186,10 +1186,15 @@ export default angular.module('thingsboard.locale', []) | ||
1186 | "custom-link-label": "Custom link label", | 1186 | "custom-link-label": "Custom link label", |
1187 | "custom-link-label-required": "Custom link label is required.", | 1187 | "custom-link-label-required": "Custom link label is required.", |
1188 | "type-filter": "Filter", | 1188 | "type-filter": "Filter", |
1189 | + "type-filter-details": "Filter incoming messages with configured conditions", | ||
1189 | "type-enrichment": "Enrichment", | 1190 | "type-enrichment": "Enrichment", |
1191 | + "type-enrichment-details": "Add additional information into Message Metadata", | ||
1190 | "type-transformation": "Transformation", | 1192 | "type-transformation": "Transformation", |
1193 | + "type-transformation-details": "Change Message payload and Metadata", | ||
1191 | "type-action": "Action", | 1194 | "type-action": "Action", |
1192 | - "type-rule-chain": "Rule Chain" | 1195 | + "type-action-details": "Perform special action", |
1196 | + "type-rule-chain": "Rule Chain", | ||
1197 | + "type-rule-chain-details": "Forwards incoming messages to specified Rule Chain" | ||
1193 | }, | 1198 | }, |
1194 | "rule-plugin": { | 1199 | "rule-plugin": { |
1195 | "management": "Rules and plugins management" | 1200 | "management": "Rules and plugins management" |
@@ -34,7 +34,8 @@ const aKeyCode = 65; | @@ -34,7 +34,8 @@ const aKeyCode = 65; | ||
34 | const escKeyCode = 27; | 34 | const escKeyCode = 27; |
35 | 35 | ||
36 | /*@ngInject*/ | 36 | /*@ngInject*/ |
37 | -export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, $timeout, $mdExpansionPanel, $document, $mdDialog, $filter, types, ruleChainService, Modelfactory, flowchartConstants, ruleChain, ruleChainMetaData) { | 37 | +export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, $timeout, $mdExpansionPanel, $document, $mdDialog, |
38 | + $filter, $translate, types, ruleChainService, Modelfactory, flowchartConstants, ruleChain, ruleChainMetaData) { | ||
38 | 39 | ||
39 | var vm = this; | 40 | var vm = this; |
40 | 41 | ||
@@ -155,11 +156,12 @@ export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, | @@ -155,11 +156,12 @@ export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, | ||
155 | }; | 156 | }; |
156 | 157 | ||
157 | vm.typeHeaderMouseEnter = function(event, typeId) { | 158 | vm.typeHeaderMouseEnter = function(event, typeId) { |
159 | + var ruleNodeType = types.ruleNodeType[typeId]; | ||
158 | displayTooltip(event, | 160 | displayTooltip(event, |
159 | '<div class="tb-rule-node-tooltip">' + | 161 | '<div class="tb-rule-node-tooltip">' + |
160 | '<div id="tooltip-content" layout="column">' + | 162 | '<div id="tooltip-content" layout="column">' + |
161 | - '<div class="tb-node-title">' + typeId + '</div>' + | ||
162 | - '<div class="tb-node-description">' + 'Some description of component type' + '</div>' + | 163 | + '<div class="tb-node-title">' + $translate.instant(ruleNodeType.name) + '</div>' + |
164 | + '<div class="tb-node-details">' + $translate.instant(ruleNodeType.details) + '</div>' + | ||
163 | '</div>' + | 165 | '</div>' + |
164 | '</div>' | 166 | '</div>' |
165 | ); | 167 | ); |