Rule Chain: Update tooltip messages

This commit is contained in:
Igor Kulikov 2018-03-22 13:48:46 +02:00
parent 8f3fbc945d
commit 73473e3beb
3 changed files with 17 additions and 5 deletions

View File

@ -464,7 +464,7 @@ export default angular.module('thingsboard.types', [])
clazz: 'tb.internal.RuleChain', clazz: 'tb.internal.RuleChain',
configurationDescriptor: { configurationDescriptor: {
nodeDefinition: { nodeDefinition: {
description: "Forwards incoming messages to specified Rule Chain", description: "",
details: "Forwards incoming messages to specified Rule Chain", details: "Forwards incoming messages to specified Rule Chain",
inEnabled: true, inEnabled: true,
outEnabled: false, outEnabled: false,
@ -483,30 +483,35 @@ export default angular.module('thingsboard.types', [])
FILTER: { FILTER: {
value: "FILTER", value: "FILTER",
name: "rulenode.type-filter", name: "rulenode.type-filter",
details: "rulenode.type-filter-details",
nodeClass: "tb-filter-type", nodeClass: "tb-filter-type",
icon: "filter_list" icon: "filter_list"
}, },
ENRICHMENT: { ENRICHMENT: {
value: "ENRICHMENT", value: "ENRICHMENT",
name: "rulenode.type-enrichment", name: "rulenode.type-enrichment",
details: "rulenode.type-enrichment-details",
nodeClass: "tb-enrichment-type", nodeClass: "tb-enrichment-type",
icon: "playlist_add" icon: "playlist_add"
}, },
TRANSFORMATION: { TRANSFORMATION: {
value: "TRANSFORMATION", value: "TRANSFORMATION",
name: "rulenode.type-transformation", name: "rulenode.type-transformation",
details: "rulenode.type-transformation-details",
nodeClass: "tb-transformation-type", nodeClass: "tb-transformation-type",
icon: "transform" icon: "transform"
}, },
ACTION: { ACTION: {
value: "ACTION", value: "ACTION",
name: "rulenode.type-action", name: "rulenode.type-action",
details: "rulenode.type-action-details",
nodeClass: "tb-action-type", nodeClass: "tb-action-type",
icon: "flash_on" icon: "flash_on"
}, },
RULE_CHAIN: { RULE_CHAIN: {
value: "RULE_CHAIN", value: "RULE_CHAIN",
name: "rulenode.type-rule-chain", name: "rulenode.type-rule-chain",
details: "rulenode.type-rule-chain-details",
nodeClass: "tb-rule-chain-type", nodeClass: "tb-rule-chain-type",
icon: "settings_ethernet" icon: "settings_ethernet"
}, },

View File

@ -1186,10 +1186,15 @@ export default angular.module('thingsboard.locale', [])
"custom-link-label": "Custom link label", "custom-link-label": "Custom link label",
"custom-link-label-required": "Custom link label is required.", "custom-link-label-required": "Custom link label is required.",
"type-filter": "Filter", "type-filter": "Filter",
"type-filter-details": "Filter incoming messages with configured conditions",
"type-enrichment": "Enrichment", "type-enrichment": "Enrichment",
"type-enrichment-details": "Add additional information into Message Metadata",
"type-transformation": "Transformation", "type-transformation": "Transformation",
"type-transformation-details": "Change Message payload and Metadata",
"type-action": "Action", "type-action": "Action",
"type-rule-chain": "Rule Chain" "type-action-details": "Perform special action",
"type-rule-chain": "Rule Chain",
"type-rule-chain-details": "Forwards incoming messages to specified Rule Chain"
}, },
"rule-plugin": { "rule-plugin": {
"management": "Rules and plugins management" "management": "Rules and plugins management"

View File

@ -34,7 +34,8 @@ const aKeyCode = 65;
const escKeyCode = 27; const escKeyCode = 27;
/*@ngInject*/ /*@ngInject*/
export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, $timeout, $mdExpansionPanel, $document, $mdDialog, $filter, types, ruleChainService, Modelfactory, flowchartConstants, ruleChain, ruleChainMetaData) { export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil, $timeout, $mdExpansionPanel, $document, $mdDialog,
$filter, $translate, types, ruleChainService, Modelfactory, flowchartConstants, ruleChain, ruleChainMetaData) {
var vm = this; var vm = this;
@ -155,11 +156,12 @@ export function RuleChainController($stateParams, $scope, $compile, $q, $mdUtil,
}; };
vm.typeHeaderMouseEnter = function(event, typeId) { vm.typeHeaderMouseEnter = function(event, typeId) {
var ruleNodeType = types.ruleNodeType[typeId];
displayTooltip(event, displayTooltip(event,
'<div class="tb-rule-node-tooltip">' + '<div class="tb-rule-node-tooltip">' +
'<div id="tooltip-content" layout="column">' + '<div id="tooltip-content" layout="column">' +
'<div class="tb-node-title">' + typeId + '</div>' + '<div class="tb-node-title">' + $translate.instant(ruleNodeType.name) + '</div>' +
'<div class="tb-node-description">' + 'Some description of component type' + '</div>' + '<div class="tb-node-details">' + $translate.instant(ruleNodeType.details) + '</div>' +
'</div>' + '</div>' +
'</div>' '</div>'
); );