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 | 464 | clazz: 'tb.internal.RuleChain', |
465 | 465 | configurationDescriptor: { |
466 | 466 | nodeDefinition: { |
467 | - description: "Forwards incoming messages to specified Rule Chain", | |
467 | + description: "", | |
468 | 468 | details: "Forwards incoming messages to specified Rule Chain", |
469 | 469 | inEnabled: true, |
470 | 470 | outEnabled: false, |
... | ... | @@ -483,30 +483,35 @@ export default angular.module('thingsboard.types', []) |
483 | 483 | FILTER: { |
484 | 484 | value: "FILTER", |
485 | 485 | name: "rulenode.type-filter", |
486 | + details: "rulenode.type-filter-details", | |
486 | 487 | nodeClass: "tb-filter-type", |
487 | 488 | icon: "filter_list" |
488 | 489 | }, |
489 | 490 | ENRICHMENT: { |
490 | 491 | value: "ENRICHMENT", |
491 | 492 | name: "rulenode.type-enrichment", |
493 | + details: "rulenode.type-enrichment-details", | |
492 | 494 | nodeClass: "tb-enrichment-type", |
493 | 495 | icon: "playlist_add" |
494 | 496 | }, |
495 | 497 | TRANSFORMATION: { |
496 | 498 | value: "TRANSFORMATION", |
497 | 499 | name: "rulenode.type-transformation", |
500 | + details: "rulenode.type-transformation-details", | |
498 | 501 | nodeClass: "tb-transformation-type", |
499 | 502 | icon: "transform" |
500 | 503 | }, |
501 | 504 | ACTION: { |
502 | 505 | value: "ACTION", |
503 | 506 | name: "rulenode.type-action", |
507 | + details: "rulenode.type-action-details", | |
504 | 508 | nodeClass: "tb-action-type", |
505 | 509 | icon: "flash_on" |
506 | 510 | }, |
507 | 511 | RULE_CHAIN: { |
508 | 512 | value: "RULE_CHAIN", |
509 | 513 | name: "rulenode.type-rule-chain", |
514 | + details: "rulenode.type-rule-chain-details", | |
510 | 515 | nodeClass: "tb-rule-chain-type", |
511 | 516 | icon: "settings_ethernet" |
512 | 517 | }, | ... | ... |
... | ... | @@ -1186,10 +1186,15 @@ export default angular.module('thingsboard.locale', []) |
1186 | 1186 | "custom-link-label": "Custom link label", |
1187 | 1187 | "custom-link-label-required": "Custom link label is required.", |
1188 | 1188 | "type-filter": "Filter", |
1189 | + "type-filter-details": "Filter incoming messages with configured conditions", | |
1189 | 1190 | "type-enrichment": "Enrichment", |
1191 | + "type-enrichment-details": "Add additional information into Message Metadata", | |
1190 | 1192 | "type-transformation": "Transformation", |
1193 | + "type-transformation-details": "Change Message payload and Metadata", | |
1191 | 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 | 1199 | "rule-plugin": { |
1195 | 1200 | "management": "Rules and plugins management" | ... | ... |
... | ... | @@ -34,7 +34,8 @@ const aKeyCode = 65; |
34 | 34 | const escKeyCode = 27; |
35 | 35 | |
36 | 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 | 40 | var vm = this; |
40 | 41 | |
... | ... | @@ -155,11 +156,12 @@ export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, |
155 | 156 | }; |
156 | 157 | |
157 | 158 | vm.typeHeaderMouseEnter = function(event, typeId) { |
159 | + var ruleNodeType = types.ruleNodeType[typeId]; | |
158 | 160 | displayTooltip(event, |
159 | 161 | '<div class="tb-rule-node-tooltip">' + |
160 | 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 | 165 | '</div>' + |
164 | 166 | '</div>' |
165 | 167 | ); | ... | ... |