Commit 4230262960c61015fdb59d9ee3f87cf281315de4
1 parent
e0b6c323
Add rule node help links. Improve rule nodes description.
Showing
11 changed files
with
89 additions
and
105 deletions
@@ -39,9 +39,9 @@ import org.thingsboard.server.common.msg.TbMsg; | @@ -39,9 +39,9 @@ import org.thingsboard.server.common.msg.TbMsg; | ||
39 | nodeDetails = | 39 | nodeDetails = |
40 | "Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\n" + | 40 | "Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\n" + |
41 | "Node output:\n" + | 41 | "Node output:\n" + |
42 | - "If alarm was not cleared, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'matadata' will contains 'isClearedAlarm' property " + | ||
43 | - "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>" + | ||
44 | - "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>", | 42 | + "If alarm was not cleared, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'matadata' will contains 'isClearedAlarm' property. " + |
43 | + "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. " + | ||
44 | + "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.", | ||
45 | uiResources = {"static/rulenode/rulenode-core-config.js"}, | 45 | uiResources = {"static/rulenode/rulenode-core-config.js"}, |
46 | configDirective = "tbActionNodeClearAlarmConfig", | 46 | configDirective = "tbActionNodeClearAlarmConfig", |
47 | icon = "notifications_off" | 47 | icon = "notifications_off" |
@@ -41,9 +41,9 @@ import org.thingsboard.server.common.msg.TbMsg; | @@ -41,9 +41,9 @@ import org.thingsboard.server.common.msg.TbMsg; | ||
41 | nodeDetails = | 41 | nodeDetails = |
42 | "Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\n" + | 42 | "Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\n" + |
43 | "Node output:\n" + | 43 | "Node output:\n" + |
44 | - "If alarm was not created, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'matadata' will contains one of those properties 'isNewAlarm/isExistingAlarm' " + | ||
45 | - "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>" + | ||
46 | - "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>", | 44 | + "If alarm was not created, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'matadata' will contains one of those properties 'isNewAlarm/isExistingAlarm'. " + |
45 | + "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. " + | ||
46 | + "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.", | ||
47 | uiResources = {"static/rulenode/rulenode-core-config.js"}, | 47 | uiResources = {"static/rulenode/rulenode-core-config.js"}, |
48 | configDirective = "tbActionNodeCreateAlarmConfig", | 48 | configDirective = "tbActionNodeCreateAlarmConfig", |
49 | icon = "notifications_active" | 49 | icon = "notifications_active" |
@@ -31,8 +31,8 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS; | @@ -31,8 +31,8 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS; | ||
31 | configClazz = TbLogNodeConfiguration.class, | 31 | configClazz = TbLogNodeConfiguration.class, |
32 | nodeDescription = "Log incoming messages using JS script for transformation Message into String", | 32 | nodeDescription = "Log incoming messages using JS script for transformation Message into String", |
33 | nodeDetails = "Transform incoming Message with configured JS function to String and log final value into Thingsboard log file. " + | 33 | nodeDetails = "Transform incoming Message with configured JS function to String and log final value into Thingsboard log file. " + |
34 | - "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>" + | ||
35 | - "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>", | 34 | + "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. " + |
35 | + "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.", | ||
36 | uiResources = {"static/rulenode/rulenode-core-config.js"}, | 36 | uiResources = {"static/rulenode/rulenode-core-config.js"}, |
37 | configDirective = "tbActionNodeLogConfig", | 37 | configDirective = "tbActionNodeLogConfig", |
38 | icon = "menu" | 38 | icon = "menu" |
@@ -38,7 +38,7 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS; | @@ -38,7 +38,7 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS; | ||
38 | name = "generator", | 38 | name = "generator", |
39 | configClazz = TbMsgGeneratorNodeConfiguration.class, | 39 | configClazz = TbMsgGeneratorNodeConfiguration.class, |
40 | nodeDescription = "Periodically generates messages", | 40 | nodeDescription = "Periodically generates messages", |
41 | - nodeDetails = "Generates messages with configurable period. Javascript function used fore message generation.", | 41 | + nodeDetails = "Generates messages with configurable period. Javascript function used for message generation.", |
42 | inEnabled = false, | 42 | inEnabled = false, |
43 | uiResources = {"static/rulenode/rulenode-core-config.js", "static/rulenode/rulenode-core-config.css"}, | 43 | uiResources = {"static/rulenode/rulenode-core-config.js", "static/rulenode/rulenode-core-config.css"}, |
44 | configDirective = "tbActionNodeGeneratorConfig", | 44 | configDirective = "tbActionNodeGeneratorConfig", |
@@ -35,9 +35,9 @@ import static org.thingsboard.rule.engine.mail.TbSendEmailNode.SEND_EMAIL_TYPE; | @@ -35,9 +35,9 @@ import static org.thingsboard.rule.engine.mail.TbSendEmailNode.SEND_EMAIL_TYPE; | ||
35 | type = ComponentType.TRANSFORMATION, | 35 | type = ComponentType.TRANSFORMATION, |
36 | name = "to email", | 36 | name = "to email", |
37 | configClazz = TbMsgToEmailNodeConfiguration.class, | 37 | configClazz = TbMsgToEmailNodeConfiguration.class, |
38 | - nodeDescription = "Change Message Originator To Tenant/Customer/Related Entity", | ||
39 | - nodeDetails = "Related Entity found using configured relation direction and Relation Type. " + | ||
40 | - "If multiple Related Entities are found, only first Entity is used as new Originator, other entities are discarded. ", | 38 | + nodeDescription = "Transforms message to email message", |
39 | + nodeDetails = "Transforms message to email message by populating email fields using values derived from message metadata. " + | ||
40 | + "Set 'SEND_EMAIL' output message type.", | ||
41 | uiResources = {"static/rulenode/rulenode-core-config.js"}, | 41 | uiResources = {"static/rulenode/rulenode-core-config.js"}, |
42 | configDirective = "tbTransformationNodeToEmailConfig", | 42 | configDirective = "tbTransformationNodeToEmailConfig", |
43 | icon = "email" | 43 | icon = "email" |
@@ -37,10 +37,9 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS; | @@ -37,10 +37,9 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS; | ||
37 | type = ComponentType.EXTERNAL, | 37 | type = ComponentType.EXTERNAL, |
38 | name = "send email", | 38 | name = "send email", |
39 | configClazz = TbSendEmailNodeConfiguration.class, | 39 | configClazz = TbSendEmailNodeConfiguration.class, |
40 | - nodeDescription = "Log incoming messages using JS script for transformation Message into String", | ||
41 | - nodeDetails = "Transform incoming Message with configured JS condition to String and log final value. " + | ||
42 | - "Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>" + | ||
43 | - "Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>", | 40 | + nodeDescription = "Sends email message via SMTP server", |
41 | + nodeDetails = "Expects messages with 'SEND_EMAIL' message type, usually processed by 'to email' node. " + | ||
42 | + "Will send email message via configured SMTP server.", | ||
44 | uiResources = {"static/rulenode/rulenode-core-config.js"}, | 43 | uiResources = {"static/rulenode/rulenode-core-config.js"}, |
45 | configDirective = "tbActionNodeSendEmailConfig", | 44 | configDirective = "tbActionNodeSendEmailConfig", |
46 | icon = "send" | 45 | icon = "send" |
@@ -13,36 +13,36 @@ | @@ -13,36 +13,36 @@ | ||
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -var pluginClazzHelpLinkMap = { | ||
17 | - 'org.thingsboard.server.extensions.core.plugin.messaging.DeviceMessagingPlugin': 'pluginDeviceMessaging', | ||
18 | - 'org.thingsboard.server.extensions.core.plugin.telemetry.TelemetryStoragePlugin': 'pluginTelemetryStorage', | ||
19 | - 'org.thingsboard.server.extensions.core.plugin.rpc.RpcPlugin': 'pluginRpcPlugin', | ||
20 | - 'org.thingsboard.server.extensions.core.plugin.mail.MailPlugin': 'pluginMailPlugin', | ||
21 | - 'org.thingsboard.server.extensions.rest.plugin.RestApiCallPlugin': 'pluginRestApiCallPlugin', | ||
22 | - 'org.thingsboard.server.extensions.core.plugin.time.TimePlugin': 'pluginTimePlugin', | ||
23 | - 'org.thingsboard.server.extensions.kafka.plugin.KafkaPlugin': 'pluginKafkaPlugin', | ||
24 | - 'org.thingsboard.server.extensions.rabbitmq.plugin.RabbitMqPlugin': 'pluginRabbitMqPlugin' | ||
25 | 16 | ||
26 | -}; | ||
27 | - | ||
28 | -var filterClazzHelpLinkMap = { | ||
29 | - 'org.thingsboard.server.extensions.core.filter.MsgTypeFilter': 'filterMsgType', | ||
30 | - 'org.thingsboard.server.extensions.core.filter.DeviceTelemetryFilter': 'filterDeviceTelemetry', | ||
31 | - 'org.thingsboard.server.extensions.core.filter.MethodNameFilter': 'filterMethodName', | ||
32 | - 'org.thingsboard.server.extensions.core.filter.DeviceAttributesFilter': 'filterDeviceAttributes' | ||
33 | -}; | ||
34 | - | ||
35 | -var processorClazzHelpLinkMap = { | ||
36 | - 'org.thingsboard.server.extensions.core.processor.AlarmDeduplicationProcessor': 'processorAlarmDeduplication' | ||
37 | -}; | ||
38 | - | ||
39 | -var pluginActionsClazzHelpLinkMap = { | ||
40 | - 'org.thingsboard.server.extensions.core.action.rpc.RpcPluginAction': 'pluginActionRpc', | ||
41 | - 'org.thingsboard.server.extensions.core.action.mail.SendMailAction': 'pluginActionSendMail', | ||
42 | - 'org.thingsboard.server.extensions.core.action.telemetry.TelemetryPluginAction': 'pluginActionTelemetry', | ||
43 | - 'org.thingsboard.server.extensions.kafka.action.KafkaPluginAction': 'pluginActionKafka', | ||
44 | - 'org.thingsboard.server.extensions.rabbitmq.action.RabbitMqPluginAction': 'pluginActionRabbitMq', | ||
45 | - 'org.thingsboard.server.extensions.rest.action.RestApiCallPluginAction': 'pluginActionRestApiCall' | 17 | +var ruleNodeClazzHelpLinkMap = { |
18 | + 'org.thingsboard.rule.engine.filter.TbJsFilterNode': 'ruleNodeJsFilter', | ||
19 | + 'org.thingsboard.rule.engine.filter.TbJsSwitchNode': 'ruleNodeJsSwitch', | ||
20 | + 'org.thingsboard.rule.engine.filter.TbMsgTypeFilterNode': 'ruleNodeMessageTypeFilter', | ||
21 | + 'org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode': 'ruleNodeMessageTypeSwitch', | ||
22 | + 'org.thingsboard.rule.engine.metadata.TbGetAttributesNode': 'ruleNodeOriginatorAttributes', | ||
23 | + 'org.thingsboard.rule.engine.metadata.TbGetCustomerAttributeNode': 'ruleNodeCustomerAttributes', | ||
24 | + 'org.thingsboard.rule.engine.metadata.TbGetDeviceAttrNode': 'ruleNodeDeviceAttributes', | ||
25 | + 'org.thingsboard.rule.engine.metadata.TbGetRelatedAttributeNode': 'ruleNodeRelatedAttributes', | ||
26 | + 'org.thingsboard.rule.engine.metadata.TbGetTenantAttributeNode': 'ruleNodeTenantAttributes', | ||
27 | + 'org.thingsboard.rule.engine.transform.TbChangeOriginatorNode': 'ruleNodeChangeOriginator', | ||
28 | + 'org.thingsboard.rule.engine.transform.TbTransformMsgNode': 'ruleNodeTransformMsg', | ||
29 | + 'org.thingsboard.rule.engine.mail.TbMsgToEmailNode': 'ruleNodeMsgToEmail', | ||
30 | + 'org.thingsboard.rule.engine.action.TbClearAlarmNode': 'ruleNodeClearAlarm', | ||
31 | + 'org.thingsboard.rule.engine.action.TbCreateAlarmNode': 'ruleNodeCrateAlarm', | ||
32 | + 'org.thingsboard.rule.engine.debug.TbMsgGeneratorNode': 'ruleNodeMsgGenerator', | ||
33 | + 'org.thingsboard.rule.engine.action.TbLogNode': 'ruleNodeLog', | ||
34 | + 'org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode': 'ruleNodeRpcCallReply', | ||
35 | + 'org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode': 'ruleNodeRpcCallRequest', | ||
36 | + 'org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode': 'ruleNodeSaveAttributes', | ||
37 | + 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode': 'ruleNodeSaveTimeseries', | ||
38 | + 'tb.internal.RuleChain': 'ruleNodeRuleChain', | ||
39 | + 'org.thingsboard.rule.engine.aws.sns.TbSnsNode': 'ruleNodeAwsSns', | ||
40 | + 'org.thingsboard.rule.engine.aws.sqs.TbSqsNode': 'ruleNodeAwsSqs', | ||
41 | + 'org.thingsboard.rule.engine.kafka.TbKafkaNode': 'ruleNodeKafka', | ||
42 | + 'org.thingsboard.rule.engine.mqtt.TbMqttNode': 'ruleNodeMqtt', | ||
43 | + 'org.thingsboard.rule.engine.rabbitmq.TbRabbitMqNode': 'ruleNodeRabbitMq', | ||
44 | + 'org.thingsboard.rule.engine.rest.TbRestApiCallNode': 'ruleNodeRestApiCall', | ||
45 | + 'org.thingsboard.rule.engine.mail.TbSendEmailNode': 'ruleNodeSendEmail' | ||
46 | }; | 46 | }; |
47 | 47 | ||
48 | var helpBaseUrl = "https://thingsboard.io"; | 48 | var helpBaseUrl = "https://thingsboard.io"; |
@@ -52,30 +52,36 @@ export default angular.module('thingsboard.help', []) | @@ -52,30 +52,36 @@ export default angular.module('thingsboard.help', []) | ||
52 | { | 52 | { |
53 | linksMap: { | 53 | linksMap: { |
54 | outgoingMailSettings: helpBaseUrl + "/docs/user-guide/ui/mail-settings", | 54 | outgoingMailSettings: helpBaseUrl + "/docs/user-guide/ui/mail-settings", |
55 | - plugins: helpBaseUrl + "/docs/user-guide/rule-engine/#plugins", | ||
56 | - pluginDeviceMessaging: helpBaseUrl + "/docs/reference/plugins/messaging/", | ||
57 | - pluginTelemetryStorage: helpBaseUrl + "/docs/reference/plugins/telemetry/", | ||
58 | - pluginRpcPlugin: helpBaseUrl + "/docs/reference/plugins/rpc/", | ||
59 | - pluginMailPlugin: helpBaseUrl + "/docs/reference/plugins/mail/", | ||
60 | - pluginRestApiCallPlugin: helpBaseUrl + "/docs/reference/plugins/rest/", | ||
61 | - pluginTimePlugin: helpBaseUrl + "/docs/reference/plugins/time/", | ||
62 | - pluginKafkaPlugin: helpBaseUrl + "/docs/reference/plugins/kafka/", | ||
63 | - pluginRabbitMqPlugin: helpBaseUrl + "/docs/reference/plugins/rabbitmq/", | ||
64 | - rules: helpBaseUrl + "/docs/user-guide/rule-engine/#rules", | ||
65 | - filters: helpBaseUrl + "/docs/user-guide/rule-engine/#filters", | ||
66 | - filterMsgType: helpBaseUrl + "/docs/reference/filters/message-type-filter", | ||
67 | - filterDeviceTelemetry: helpBaseUrl + "/docs/reference/filters/device-telemetry-filter", | ||
68 | - filterMethodName: helpBaseUrl + "/docs/reference/filters/method-name-filter/", | ||
69 | - filterDeviceAttributes: helpBaseUrl + "/docs/reference/filters/device-attributes-filter", | ||
70 | - processors: helpBaseUrl + "/docs/user-guide/rule-engine/#processors", | ||
71 | - processorAlarmDeduplication: "http://thingsboard.io/docs/#q=processorAlarmDeduplication", | ||
72 | - pluginActions: helpBaseUrl + "/docs/user-guide/rule-engine/#actions", | ||
73 | - pluginActionRpc: helpBaseUrl + "/docs/reference/actions/rpc-plugin-action", | ||
74 | - pluginActionSendMail: helpBaseUrl + "/docs/reference/actions/send-mail-action", | ||
75 | - pluginActionTelemetry: helpBaseUrl + "/docs/reference/actions/telemetry-plugin-action/", | ||
76 | - pluginActionKafka: helpBaseUrl + "/docs/reference/actions/kafka-plugin-action", | ||
77 | - pluginActionRabbitMq: helpBaseUrl + "/docs/reference/actions/rabbitmq-plugin-action", | ||
78 | - pluginActionRestApiCall: helpBaseUrl + "/docs/reference/actions/rest-api-call-plugin-action", | 55 | + ruleEngine: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/overview/", |
56 | + ruleNodeJsFilter: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/filter-nodes/#script-filter-node", | ||
57 | + ruleNodeJsSwitch: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/filter-nodes/#switch-node", | ||
58 | + ruleNodeMessageTypeFilter: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/filter-nodes/#message-type-filter-node", | ||
59 | + ruleNodeMessageTypeSwitch: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/filter-nodes/#message-type-switch-node", | ||
60 | + ruleNodeOriginatorAttributes: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/enrichment-nodes/#originator-attributes", | ||
61 | + ruleNodeCustomerAttributes: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/enrichment-nodes/#customer-attributes", | ||
62 | + ruleNodeDeviceAttributes: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/enrichment-nodes/#device-attributes", | ||
63 | + ruleNodeRelatedAttributes: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/enrichment-nodes/#related-attributes", | ||
64 | + ruleNodeTenantAttributes: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/enrichment-nodes/#tenant-attributes", | ||
65 | + ruleNodeChangeOriginator: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/transformation-nodes/#change-originator", | ||
66 | + ruleNodeTransformMsg: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/transformation-nodes/#script-transformation-node", | ||
67 | + ruleNodeMsgToEmail: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/transformation-nodes/#to-email-node", | ||
68 | + ruleNodeClearAlarm: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#clear-alarm-node", | ||
69 | + ruleNodeCrateAlarm: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#create-alarm-node", | ||
70 | + ruleNodeMsgGenerator: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#generator-node", | ||
71 | + ruleNodeLog: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#log-node", | ||
72 | + ruleNodeRpcCallReply: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#rpc-call-reply-node", | ||
73 | + ruleNodeRpcCallRequest: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#rpc-call-request-node", | ||
74 | + ruleNodeSaveAttributes: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#save-attributes-node", | ||
75 | + ruleNodeSaveTimeseries: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/action-nodes/#save-timeseries-node", | ||
76 | + ruleNodeRuleChain: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/rule-chains/", | ||
77 | + ruleNodeAwsSns: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#aws-sns-node", | ||
78 | + ruleNodeAwsSqs: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#aws-sqs-node", | ||
79 | + ruleNodeKafka: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#kafka-node", | ||
80 | + ruleNodeMqtt: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#mqtt-node", | ||
81 | + ruleNodeRabbitMq: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#rabbitmq-node", | ||
82 | + ruleNodeRestApiCall: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#rest-api-call-node", | ||
83 | + ruleNodeSendEmail: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/external-nodes/#send-email-node", | ||
84 | + rulechains: helpBaseUrl + "/docs/user-guide/rule-engine-2-0/rule-chains/", | ||
79 | tenants: helpBaseUrl + "/docs/user-guide/ui/tenants", | 85 | tenants: helpBaseUrl + "/docs/user-guide/ui/tenants", |
80 | customers: helpBaseUrl + "/docs/user-guide/ui/customers", | 86 | customers: helpBaseUrl + "/docs/user-guide/ui/customers", |
81 | assets: helpBaseUrl + "/docs/user-guide/ui/assets", | 87 | assets: helpBaseUrl + "/docs/user-guide/ui/assets", |
@@ -90,38 +96,11 @@ export default angular.module('thingsboard.help', []) | @@ -90,38 +96,11 @@ export default angular.module('thingsboard.help', []) | ||
90 | widgetsConfigAlarm: helpBaseUrl + "/docs/user-guide/ui/dashboards#alarm", | 96 | widgetsConfigAlarm: helpBaseUrl + "/docs/user-guide/ui/dashboards#alarm", |
91 | widgetsConfigStatic: helpBaseUrl + "/docs/user-guide/ui/dashboards#static", | 97 | widgetsConfigStatic: helpBaseUrl + "/docs/user-guide/ui/dashboards#static", |
92 | }, | 98 | }, |
93 | - getPluginLink: function(plugin) { | ||
94 | - var link = 'plugins'; | ||
95 | - if (plugin && plugin.clazz) { | ||
96 | - if (pluginClazzHelpLinkMap[plugin.clazz]) { | ||
97 | - link = pluginClazzHelpLinkMap[plugin.clazz]; | ||
98 | - } | ||
99 | - } | ||
100 | - return link; | ||
101 | - }, | ||
102 | - getFilterLink: function(filter) { | ||
103 | - var link = 'filters'; | ||
104 | - if (filter && filter.clazz) { | ||
105 | - if (filterClazzHelpLinkMap[filter.clazz]) { | ||
106 | - link = filterClazzHelpLinkMap[filter.clazz]; | ||
107 | - } | ||
108 | - } | ||
109 | - return link; | ||
110 | - }, | ||
111 | - getProcessorLink: function(processor) { | ||
112 | - var link = 'processors'; | ||
113 | - if (processor && processor.clazz) { | ||
114 | - if (processorClazzHelpLinkMap[processor.clazz]) { | ||
115 | - link = processorClazzHelpLinkMap[processor.clazz]; | ||
116 | - } | ||
117 | - } | ||
118 | - return link; | ||
119 | - }, | ||
120 | - getPluginActionLink: function(pluginAction) { | ||
121 | - var link = 'pluginActions'; | ||
122 | - if (pluginAction && pluginAction.clazz) { | ||
123 | - if (pluginActionsClazzHelpLinkMap[pluginAction.clazz]) { | ||
124 | - link = pluginActionsClazzHelpLinkMap[pluginAction.clazz]; | 99 | + getRuleNodeLink: function(ruleNode) { |
100 | + var link = 'ruleEngine'; | ||
101 | + if (ruleNode && ruleNode.component && ruleNode.component.clazz) { | ||
102 | + if (ruleNodeClazzHelpLinkMap[ruleNode.component.clazz]) { | ||
103 | + link = ruleNodeClazzHelpLinkMap[ruleNode.component.clazz]; | ||
125 | } | 104 | } |
126 | } | 105 | } |
127 | return link; | 106 | return link; |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | limitations under the License. | 15 | limitations under the License. |
16 | 16 | ||
17 | --> | 17 | --> |
18 | -<md-dialog aria-label="{{ 'rulenode.add-link' | translate }}" tb-help="'rulechains'" help-container-id="help-container"> | 18 | +<md-dialog aria-label="{{ 'rulenode.add-link' | translate }}" tb-help="'ruleEngine'" help-container-id="help-container"> |
19 | <form name="theForm" ng-submit="vm.add()"> | 19 | <form name="theForm" ng-submit="vm.add()"> |
20 | <md-toolbar> | 20 | <md-toolbar> |
21 | <div class="md-toolbar-tools"> | 21 | <div class="md-toolbar-tools"> |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | limitations under the License. | 15 | limitations under the License. |
16 | 16 | ||
17 | --> | 17 | --> |
18 | -<md-dialog aria-label="{{ 'rulenode.add' | translate }}" tb-help="'rulechains'" help-container-id="help-container" style="min-width: 650px;"> | 18 | +<md-dialog aria-label="{{ 'rulenode.add' | translate }}" tb-help="vm.helpLinks.getRuleNodeLink(vm.ruleNode)" help-container-id="help-container" style="min-width: 650px;"> |
19 | <form name="theForm" ng-submit="vm.add()"> | 19 | <form name="theForm" ng-submit="vm.add()"> |
20 | <md-toolbar> | 20 | <md-toolbar> |
21 | <div class="md-toolbar-tools"> | 21 | <div class="md-toolbar-tools"> |
@@ -30,7 +30,7 @@ import addRuleNodeLinkTemplate from './add-link.tpl.html'; | @@ -30,7 +30,7 @@ import addRuleNodeLinkTemplate from './add-link.tpl.html'; | ||
30 | /*@ngInject*/ | 30 | /*@ngInject*/ |
31 | export function RuleChainController($state, $scope, $compile, $q, $mdUtil, $timeout, $mdExpansionPanel, $window, $document, $mdDialog, | 31 | export function RuleChainController($state, $scope, $compile, $q, $mdUtil, $timeout, $mdExpansionPanel, $window, $document, $mdDialog, |
32 | $filter, $translate, hotkeys, types, ruleChainService, itembuffer, Modelfactory, flowchartConstants, | 32 | $filter, $translate, hotkeys, types, ruleChainService, itembuffer, Modelfactory, flowchartConstants, |
33 | - ruleChain, ruleChainMetaData, ruleNodeComponents) { | 33 | + ruleChain, ruleChainMetaData, ruleNodeComponents, helpLinks) { |
34 | 34 | ||
35 | var vm = this; | 35 | var vm = this; |
36 | 36 | ||
@@ -113,6 +113,8 @@ export function RuleChainController($state, $scope, $compile, $q, $mdUtil, $time | @@ -113,6 +113,8 @@ export function RuleChainController($state, $scope, $compile, $q, $mdUtil, $time | ||
113 | 113 | ||
114 | vm.openRuleChainContextMenu = openRuleChainContextMenu; | 114 | vm.openRuleChainContextMenu = openRuleChainContextMenu; |
115 | 115 | ||
116 | + vm.helpLinkIdForRuleNodeType = helpLinkIdForRuleNodeType; | ||
117 | + | ||
116 | initHotKeys(); | 118 | initHotKeys(); |
117 | 119 | ||
118 | function openRuleChainContextMenu($event, $mdOpenMousepointMenu) { | 120 | function openRuleChainContextMenu($event, $mdOpenMousepointMenu) { |
@@ -473,6 +475,10 @@ export function RuleChainController($state, $scope, $compile, $q, $mdUtil, $time | @@ -473,6 +475,10 @@ export function RuleChainController($state, $scope, $compile, $q, $mdUtil, $time | ||
473 | 475 | ||
474 | vm.destroyTooltips = destroyTooltips; | 476 | vm.destroyTooltips = destroyTooltips; |
475 | 477 | ||
478 | + function helpLinkIdForRuleNodeType() { | ||
479 | + return helpLinks.getRuleNodeLink(vm.editingRuleNode); | ||
480 | + } | ||
481 | + | ||
476 | function destroyTooltips() { | 482 | function destroyTooltips() { |
477 | if (vm.tooltipTimeout) { | 483 | if (vm.tooltipTimeout) { |
478 | $timeout.cancel(vm.tooltipTimeout); | 484 | $timeout.cancel(vm.tooltipTimeout); |
@@ -202,7 +202,7 @@ | @@ -202,7 +202,7 @@ | ||
202 | on-toggle-details-edit-mode="vm.onRevertRuleNodeLinkEdit(vm.ruleNodeLinkForm)" | 202 | on-toggle-details-edit-mode="vm.onRevertRuleNodeLinkEdit(vm.ruleNodeLinkForm)" |
203 | on-apply-details="vm.saveRuleNodeLink(vm.ruleNodeLinkForm)" | 203 | on-apply-details="vm.saveRuleNodeLink(vm.ruleNodeLinkForm)" |
204 | the-form="vm.ruleNodeLinkForm"> | 204 | the-form="vm.ruleNodeLinkForm"> |
205 | - <details-buttons tb-help="vm.helpLinkIdForRuleNodeLink()" help-container-id="link-help-container"> | 205 | + <details-buttons tb-help="'ruleEngine'" help-container-id="link-help-container"> |
206 | <div id="link-help-container"></div> | 206 | <div id="link-help-container"></div> |
207 | </details-buttons> | 207 | </details-buttons> |
208 | <form name="vm.ruleNodeLinkForm" ng-if="vm.isEditingRuleNodeLink"> | 208 | <form name="vm.ruleNodeLinkForm" ng-if="vm.isEditingRuleNodeLink"> |