Commit 1941d5c435b539b25eeace9fa7ebd7fb3d6f4456

Authored by fengwotao
1 parent 2c7a7b63

feat: 新增规则链中英文配置

Showing 50 changed files with 664 additions and 164 deletions
  1 +/**
  2 + *规则链 动作 英文配置文件
  3 + 目前共有22个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + assignToCustomer: {
  7 + name: 'assign to customer',
  8 + details: `Finds target Customer by customer name pattern and then assign Originator Entity to this customer. Will create new Customer if it doesn't exists and 'Create new Customer if not exists' is set to true.`,
  9 + description: 'Assign Message Originator Entity to Customer',
  10 + },
  11 + clearAlarm: {
  12 + name: 'clear alarm',
  13 + details: `Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\nNode output:\nIf alarm was not cleared, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'metadata' will contains 'isClearedAlarm' property. Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.`,
  14 + description: 'Clear Alarm',
  15 + },
  16 + copyToView: {
  17 + name: 'copy to view',
  18 + details: `Copy attributes from asset/device to related entity view according to entity view configuration. \n Copy will be done only for attributes that are between start and end dates and according to attribute keys configuration. \nChanges message originator to related entity view and produces new messages according to count of updated entity views`,
  19 + description:
  20 + 'Copy attributes from asset/device to entity view and changes message originator to related entity view',
  21 + },
  22 + createAlarm: {
  23 + name: 'create alarm',
  24 + details: `Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\nNode output:\nIf alarm was not created, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'metadata' will contains one of those properties 'isNewAlarm/isExistingAlarm'. Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.`,
  25 + description: 'Create or Update Alarm',
  26 + },
  27 + createRelation: {
  28 + name: 'create relation',
  29 + details: `If the relation already exists or successfully created - Message send via <b>Success</b> chain, otherwise <b>Failure</b> chain will be used.`,
  30 + description: `Finds target Entity by entity name pattern and (entity type pattern for Asset, Device) and then create a relation to Originator Entity by type and direction. If Selected entity type: Asset, Device or Customer will create new Entity if it doesn't exist and selected checkbox 'Create new entity if not exists'.<br> In case that relation from the message originator to the selected entity not exist and If selected checkbox 'Remove current relations', before creating the new relation all existed relations to message originator by type and direction will be removed.<br> If relation from the message originator to the selected entity created and If selected checkbox 'Change originator to related entity', outbound message will be processed as a message from this entity.`,
  31 + },
  32 + deleteRelation: {
  33 + name: 'delete relation',
  34 + details: `If the relation(s) successfully deleted - Message send via <b>Success</b> chain, otherwise <b>Failure</b> chain will be used.`,
  35 + description: `Finds target Entity by entity name pattern and then delete a relation to Originator Entity by type and direction if 'Delete single entity' is set to true, otherwise rule node will delete all relations to the originator of the message by type and direction.`,
  36 + },
  37 + delay: {
  38 + name: 'delay (deprecated)',
  39 + details: `Delays messages for a configurable period. Please note, this node acknowledges the message from the current queue (message will be removed from queue). Deprecated because the acknowledged message still stays in memory (to be delayed) and this does not guarantee that message will be processed even if the "retry failures and timeouts" processing strategy will be chosen.`,
  40 + description: `Delays incoming message (deprecated)`,
  41 + },
  42 + deviceProfile: {
  43 + name: 'device profile',
  44 + details: `Create and clear alarms based on alarm rules defined in device profile. The output relation type is either 'Alarm Created', 'Alarm Updated', 'Alarm Severity Updated' and 'Alarm Cleared' or simply 'Success' if no alarms were affected.`,
  45 + description: `Process device messages based on device profile settings`,
  46 + },
  47 + generator: {
  48 + name: 'generator',
  49 + details: `Generates messages with configurable period. Javascript function used for message generation.`,
  50 + description: `Periodically generates messages`,
  51 + },
  52 + gpsGeofencingEvents: {
  53 + name: 'gps geofencing events',
  54 + details: `Extracts latitude and longitude parameters from incoming message and returns different events based on configuration parameters`,
  55 + description: `Produces incoming messages using GPS based geofencing`,
  56 + },
  57 + log: {
  58 + name: 'log',
  59 + details: `Transform incoming Message with configured JS function to String and log final value into Thingsboard log file. Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.`,
  60 + description: `Log incoming messages using JS script for transformation Message into String`,
  61 + },
  62 + messageCount: {
  63 + name: 'message count',
  64 + details: `Count incoming messages for specified interval and produces POST_TELEMETRY_REQUEST msg with messages count`,
  65 + description: `Count incoming messages`,
  66 + },
  67 + pushToEdge: {
  68 + name: 'push to edge',
  69 + details: `Push messages from cloud to edge. Message originator must be assigned to particular edge or message originator is <b>EDGE</b> entity itself. This node used only on cloud instances to push messages from cloud to edge. Once message arrived into this node it’s going to be converted into edge event and saved to the database. Node doesn't push messages directly to edge, but stores event(s) in the edge queue. <br>Supports next originator types:<br><code>DEVICE</code><br><code>ASSET</code><br><code>ENTITY_VIEW</code><br><code>DASHBOARD</code><br><code>TENANT</code><br><code>CUSTOMER</code><br><code>EDGE</code><br><br>As well node supports next message types:<br><code>POST_TELEMETRY_REQUEST</code><br><code>POST_ATTRIBUTES_REQUEST</code><br><code>ATTRIBUTES_UPDATED</code><br><code>ATTRIBUTES_DELETED</code><br><code>ALARM</code><br><br>Message will be routed via <b>Failure</b> route if node was not able to save edge event to database or unsupported originator type/message type arrived. In case successful storage edge event to database message will be routed via <b>Success</b> route.`,
  70 + description: `Push messages from cloud to edge`,
  71 + },
  72 + rpcCallReply: {
  73 + name: 'rpc call reply',
  74 + details: `Expects messages with any message type. Will forward message body to the device.`,
  75 + description: `Sends reply to RPC call from device`,
  76 + },
  77 + rpcCallRequest: {
  78 + name: 'rpc call request',
  79 + details: `Expects messages with "method" and "params". Will forward response from device to next nodes.If the RPC call request is originated by REST API call from user, will forward the response to user immediately.`,
  80 + description: `Sends RPC call to device`,
  81 + },
  82 + saveAttributes: {
  83 + name: 'save attributes',
  84 + details: `Saves entity attributes based on configurable scope parameter. Expects messages with 'POST_ATTRIBUTES_REQUEST' message type`,
  85 + description: `Saves attributes data`,
  86 + },
  87 + saveEvent: {
  88 + name: 'save event',
  89 + details: `Saves entity event . Expects messages with 'POST_EVENT_REQUEST' message type`,
  90 + description: `Saves device event data`,
  91 + },
  92 + saveTimeseries: {
  93 + name: 'save timeseries',
  94 + details: `Saves timeseries telemetry data based on configurable TTL parameter. Expects messages with 'POST_TELEMETRY_REQUEST' message type. Timestamp in milliseconds will be taken from metadata.ts, otherwise 'now' message timestamp will be applied. Allows stopping updating values for incoming keys in the latest ts_kv table if 'skipLatestPersistence' is set to true.\n <br/>Enable 'useServerTs' param to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).\n<br/>In the case of sequential processing, the platform guarantees that the messages are processed in the order of their submission to the queue. However, the timestamp of the messages originated by multiple devices/servers may be unsynchronized long before they are pushed to the queue. The DB layer has certain optimizations to ignore the updates of the \"attributes\" and \"latest values\" tables if the new record has a timestamp that is older than the previous record. So, to make sure that all the messages will be processed correctly, one should enable this parameter for sequential message processing scenarios.`,
  95 + description: `Saves timeseries data`,
  96 + },
  97 + saveToCustomTable: {
  98 + name: 'save to custom table',
  99 + details: `Administrator should set the custom table name without prefix: <b>cs_tb_</b>. <br>Administrator can configure the mapping between the Message field names and Table columns name.<br><b>Note:</b>If the mapping key is <b>$entity_id</b>, that is identified by the Message Originator, then to the appropriate column name(mapping value) will be write the message originator id.<br><br>If specified message field does not exist or is not a JSON Primitive, the outbound message will be routed via <b>failure</b> chain, otherwise, the message will be routed via <b>success</b> chain.`,
  100 + description: `Node stores data from incoming Message payload to the Cassandra database into the predefined custom table that should have <b>cs_tb_</b> prefix, to avoid the data insertion to the common TB tables.<br><b>Note:</b> rule node can be used only for Cassandra DB.`,
  101 + },
  102 + synchronizationEnd: {
  103 + name: 'synchronization end',
  104 + details: ``,
  105 + description: `This Node is now deprecated. Use "Checkpoint" instead.`,
  106 + },
  107 + synchronizationStart: {
  108 + name: 'synchronization start',
  109 + details: `This node should be used together with "synchronization end" node. \n This node will put messages into queue based on message originator id. \nSubsequent messages will not be processed until the previous message processing is completed or timeout event occurs.\nSize of the queue per originator and timeout values are configurable on a system level`,
  110 + description: `This Node is now deprecated. Use "Checkpoint" instead.`,
  111 + },
  112 + unassigFromCustomer: {
  113 + name: 'unassign from customer',
  114 + details: `Finds target Entity Customer by Customer name pattern and then unassign Originator Entity from this customer.`,
  115 + description: `Unassign Message Originator Entity from Customer`,
  116 + },
  117 +};
... ...
  1 +/**
  2 + *规则链 外部的 英文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + alarmNotice: {
  7 + name: 'alarm notice',
  8 + details: `notice method include sms,email and so on.`,
  9 + description: 'while device alarm, notice some people.',
  10 + },
  11 + awsSns: {
  12 + name: 'aws sns',
  13 + details: `Will publish message payload to the AWS SNS topic. Outbound message will contain response fields (<code>messageId</code>, <code>requestId</code>) in the Message Metadata from the AWS SNS. For example <b>requestId</b> field can be accessed with <code>metadata.requestId</code>.`,
  14 + description: 'Publish message to the AWS SNS',
  15 + },
  16 + awsSqs: {
  17 + name: 'aws sqs',
  18 + details: `Will publish message payload and metadata attributes to the AWS SQS queue. Outbound message will contain response fields (<code>messageId</code>, <code>requestId</code>, <code>messageBodyMd5</code>, <code>messageAttributesMd5</code>, <code>sequenceNumber</code>) in the Message Metadata from the AWS SQS. For example <b>requestId</b> field can be accessed with <code>metadata.requestId</code>.`,
  19 + description: 'Publish messages to the AWS SQS',
  20 + },
  21 + azureIotHub: {
  22 + name: 'azure iot hub',
  23 + details: `Will publish message payload to the Azure IoT Hub with QoS <b>AT_LEAST_ONCE</b>.`,
  24 + description: 'Publish messages to the Azure IoT Hub',
  25 + },
  26 + gcpPubsub: {
  27 + name: 'gcp pubsub',
  28 + details: `Will publish message payload to the Google Cloud Platform PubSub topic. Outbound message will contain response fields (<code>messageId</code> in the Message Metadata from the GCP PubSub. <b>messageId</b> field can be accessed with <code>metadata.messageId</code>.`,
  29 + description: 'Publish message to the Google Cloud PubSub',
  30 + },
  31 + kafka: {
  32 + name: 'kafka',
  33 + details: `Will send record via Kafka producer to Kafka server. Outbound message will contain response fields (<code>offset</code>, <code>partition</code>, <code>topic</code>) from the Kafka in the Message Metadata. For example <b>partition</b> field can be accessed with <code>metadata.partition</code>.`,
  34 + description: 'Publish messages to Kafka server',
  35 + },
  36 + mqtt: {
  37 + name: 'mqtt',
  38 + details: `Will publish message payload to the MQTT broker with QoS <b>AT_LEAST_ONCE</b>.`,
  39 + description: 'Publish messages to the MQTT broker',
  40 + },
  41 + rabbitmq: {
  42 + name: 'rabbitmq',
  43 + details: `Will publish message payload to RabbitMQ queue.`,
  44 + description: 'Publish messages to the RabbitMQ',
  45 + },
  46 + restApiCall: {
  47 + name: 'rest api call',
  48 + details: `Will invoke REST API call <code>GET | POST | PUT | DELETE</code> to external REST server. Message payload added into Request body. Configured attributes can be added into Headers from Message Metadata. Outbound message will contain response fields (<code>status</code>, <code>statusCode</code>, <code>statusReason</code> and response <code>headers</code>) in the Message Metadata. Response body saved in outbound Message payload. For example <b>statusCode</b> field can be accessed with <code>metadata.statusCode</code>.<br/><b>Note-</b> if you use system proxy properties, the next system proxy properties should be added: "http.proxyHost" and "http.proxyPort" or "https.proxyHost" and "https.proxyPort" or "socksProxyHost" and "socksProxyPort",and if your proxy with auth, the next ones should be added: "tb.proxy.user" and "tb.proxy.password" to the thingsboard.conf file.`,
  49 + description: 'Invoke REST API calls to external REST server',
  50 + },
  51 + sendEmail: {
  52 + name: 'send email',
  53 + details: `Expects messages with <b>SEND_EMAIL</b> type. Node works only with messages that where created using <code>to Email</code> transformation Node, please connect this Node with <code>to Email</code> Node using <code>Successful</code> chain.`,
  54 + description: 'Sends email message via SMTP server.',
  55 + },
  56 + sendSms: {
  57 + name: 'send sms',
  58 + details: `Will send SMS message by populating target phone numbers and sms message fields using values derived from message metadata.`,
  59 + description: 'Sends SMS message via SMS provider.',
  60 + },
  61 +};
... ...
  1 +/**
  2 + *规则链 Flow 英文配置文件
  3 + 目前共有4个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + acknowledge: {
  7 + name: 'acknowledge',
  8 + details: `After acknowledgement, the message is pushed to related rule nodes. Useful if you don't care what happens to this message next.`,
  9 + description: 'Acknowledges the incoming message',
  10 + },
  11 + checkpoint: {
  12 + name: 'checkpoint',
  13 + details: `After successful transfer incoming message is automatically acknowledged. Queue name is configurable.`,
  14 + description: 'transfers the message to another queue',
  15 + },
  16 + output: {
  17 + name: 'output',
  18 + details: `Produces output of the rule chain processing. The output is forwarded to the caller rule chain, as an output of the corresponding "input" rule node. The output rule node name corresponds to the relation type of the output message, and it is used to forward messages to other rule nodes in the caller rule chain. `,
  19 + description: 'transfers the message to the caller rule chain',
  20 + },
  21 + ruleChain: {
  22 + name: 'rule chain',
  23 + details: `Allows to nest the rule chain similar to single rule node. The incoming message is forwarded to the input node of the specified target rule chain. The target rule chain may produce multiple labeled outputs. You may use the outputs to forward the results of processing to other rule nodes.`,
  24 + description: 'transfers the message to another rule chain',
  25 + },
  26 +};
... ...
  1 +/**
  2 + *规则链 变换 英文配置文件
  3 + 目前共有3个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + changeOriginator: {
  7 + name: 'change originator',
  8 + details: `Related Entity found using configured relation direction and Relation Type. If multiple Related Entities are found, only first Entity is used as new Originator, other entities are discarded.<br/>Alarm Originator found only in case original Originator is <code>Alarm</code> entity.`,
  9 + description: 'Change Message Originator To Tenant/Customer/Related Entity/Alarm Originator',
  10 + },
  11 + script: {
  12 + name: 'script',
  13 + details: `JavaScript function receive 3 input parameters <br/> <code>metadata</code> - is a Message metadata.<br/><code>msg</code> - is a Message payload.<br/><code>msgType</code> - is a Message type.<br/>Should return the following structure:<br/><code>{ msg: <i style="color: #666;">new payload</i>,<br/>&nbsp&nbsp&nbspmetadata: <i style="color: #666;">new metadata</i>,<br/>&nbsp&nbsp&nbspmsgType: <i style="color: #666;">new msgType</i> }</code><br/>All fields in resulting object are optional and will be taken from original message if not specified.`,
  14 + description: 'Change Message payload, Metadata or Message type using JavaScript',
  15 + },
  16 + toEmail: {
  17 + name: 'to email',
  18 + details: `Transforms message to email message by populating email fields using values derived from message metadata. Set 'SEND_EMAIL' output message type.`,
  19 + description: 'Transforms message to email message',
  20 + },
  21 +};
... ...
  1 +/**
  2 + *规则链 动作 中文配置文件
  3 + 目前共有22个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + assignToCustomer: {
  7 + name: '分配给客户',
  8 + details: `按客户名称模式查找目标客户,然后将发起者实体分配给该客户。如果不存在将创建新客户,并且【如果不存在则创建新客户]设置为true。`,
  9 + description: '将消息发起人实体分配给客户',
  10 + },
  11 + clearAlarm: {
  12 + name: '清除告警',
  13 + details: `详情-基于传入消息创建JSON对象的JS函数。该对象将被添加到Alarm.details字段中。节点输出:如果告警未被清除,则返回原始消息。否则,返回类型为【告警】新消息【msg】属性和【metadata】中的告警对象将包含【isClearedAlarm】属性。可以通过【msg】属性访问消息负载。例如'temperature='+msg.temperature。也可以通过【metadata】属性访问消息元数据。例如'name='+metadata.customerName。`,
  14 + description: '清除告警',
  15 + },
  16 + copyToView: {
  17 + name: '复制到视图',
  18 + details: `根据实体视图配置,将属性从资产/设备复制到相关的实体视图。复制将仅针对开始日期和结束日期之间的属性,并根据属性键进行配置。将消息发起者更改为相关的实体视图,并根据更新的实体视图的计数生成新消息。`,
  19 + description: '将属性从资产/设备复制到实体视图,并将消息发起者更改为相关实体视图。',
  20 + },
  21 + createAlarm: {
  22 + name: '创建告警',
  23 + details: `详情-基于传入消息创建JSON对象的JS函数。该对象将被添加到Alarm.details字段中。节点输出:如果告警未被创建,则返回原始消息。否则,返回类型为【告警】的新消息,【msg】属性和【metadata】中的告警对象将包含其中一个属性【isNewAlarm/isExistingAlarm】。可以通过【msg】属性访问消息负载。例如'temperature='+msg.temperature。可以通过【metadata】属性访问消息元数据。例如'name='+metadata.customerName。`,
  24 + description: '创建或更新告警。',
  25 + },
  26 + createRelation: {
  27 + name: '创建关联关系',
  28 + details: `如果关系已存在或已成功创建;通过Success链发送消息,否则将使用Failure链路。`,
  29 + description: `按实体名称模式和(资产、设备的实体类型模式)查找目标实体,然后按类型和方向创建与发起人实体的关系。如果所选实体类型:资产、设备或客户将创建新实体(如果不存在),并选中【创建新实体】;如果从邮件发起人到所选实体的关系不存在,并且选中【删除当前关系】,则在创建新关系之前,将删除按类型和方向与邮件发起人的所有现有关系;如果创建了从邮件发件人到所选实体的关系,并且选中了【将发件人更改为相关实体】,则出站邮件将作为来自该实体的邮件进行处理。`,
  30 + },
  31 + deleteRelation: {
  32 + name: '删除关联关系',
  33 + details: `如果成功删除关系;通过则走Success链发送消息,否则将使用Failure链。`,
  34 + description: `如果“删除单个实体”设置为true,则按实体名称模式查找目标实体,然后按类型和方向删除与发起者实体的关系,否则规则节点将按类型和顺序,删除与消息发起人的所有关系。`,
  35 + },
  36 + delay: {
  37 + name: '延迟(已弃用)',
  38 + details: `为消息传输配置一段时间的延迟。请注意,此节点确认当前队列中的消息(消息将从队列中删除)。不推荐,因为已确认的消息仍保留在内存中(待延迟),并且即使选择了【重试失败和超时】处理策略,也不能保证消息得到处理。`,
  39 + description: `延迟传入消息(已弃用)`,
  40 + },
  41 + deviceProfile: {
  42 + name: '设备配置',
  43 + details: `根据设备配置文件中定义的告警规则,创建和清除报警。输出关联类型为【告警创建】、【告警更新】、【告警严重性更新】和【告警已清除】,如果没有告警受到影响,则仅为【成功】。`,
  44 + description: `根据设备配置文件处理设备消息。`,
  45 + },
  46 + generator: {
  47 + name: '生成器',
  48 + details: `生成具有可配置周期的消息。用于生成消息的Javascript函数。`,
  49 + description: `定期生成消息。`,
  50 + },
  51 + gpsGeofencingEvents: {
  52 + name: 'GPS地理围栏事件',
  53 + details: `从传入消息中提取纬度和经度参数,并根据配置参数返回不同的事件。`,
  54 + description: `使用基于GPS的地理围栏生成传入消息。`,
  55 + },
  56 + log: {
  57 + name: '日志',
  58 + details: `将配置JS函数的传入Message转换为String,并将最终值记录到平台日志文件中。可以通过msg属性访问消息负载。例如temperature= +msg.temperature。可以通过metadata属性访问消息元数据。例如name= +metadata.customerName。`,
  59 + description: `使用JS脚本记录传入消息,将Message转换为String。`,
  60 + },
  61 + messageCount: {
  62 + name: '消息计数',
  63 + details: `对指定间隔内的传入消息进行计数,并生成具有消息计数的POST_ELEMETRY_REQUEST消息。`,
  64 + description: `统计传入消息。`,
  65 + },
  66 + pushToEdge: {
  67 + name: '推送消息到边缘端',
  68 + details: `将消息从云端推送到边缘。消息发起者必须分配给指定边缘,或者消息发起方是边缘实体本身。此节点仅在云实例上用于将消息从云推送到边缘。一旦消息到达该节点,它将被转换为边缘事件并保存到数据库中。节点不直接将消息推送到边缘,而是将事件存储在边缘队列中;支持下一个发起方类型:DEVICE/ASSET/ENTITY_VIEW/DASHBOARD/TENANT/CUSTOMER/EDGE;节点也支持下一条消息类型:POST_ELEMETRY_REQUEST/POST_ATTRIBUTES_REQUEST/ATTRIBUTES_UPDATED/ATTRIBUTES_DELETED/ALARM;如果节点无法将边缘事件保存到数据库或到达了不受支持的发起者类型/消息类型,则消息将通过Failure进行路由。在成功存储边缘事件到数据库的情况下,消息将通过Success进行路由。`,
  69 + description: `将消息从云端推送到边缘端。`,
  70 + },
  71 + rpcCallReply: {
  72 + name: 'rpc请求回复',
  73 + details: `应为任何消息类型的消息。将消息正文转发到设备。`,
  74 + description: `从设备发送对RPC调用的答复。`,
  75 + },
  76 + rpcCallRequest: {
  77 + name: 'RPC调用请求',
  78 + details: `带有method和params的消息,将响应从设备转发到下一个节点。如果RPC调用请求是由用户的REST API调用发起的,则会立即将响应转发给用户。`,
  79 + description: `将RPC调用发送到设备。`,
  80 + },
  81 + saveAttributes: {
  82 + name: '保存属性',
  83 + details: `根据可配置的作用域参数保存实体属性。消息类型为POST_ATTRIBUTES_REQUEST的消息`,
  84 + description: `保存属性数据。`,
  85 + },
  86 + saveEvent: {
  87 + name: '保存事件',
  88 + details: `保存实体事件,消息类型为POST_EVENT_REQUEST的消息。`,
  89 + description: `保存设备事件数据。`,
  90 + },
  91 + saveTimeseries: {
  92 + name: '保存时序数据',
  93 + details: `根据可配置的TTL参数保存时序遥测数据,消息类型为POST_TELEMETRY_REQUEST的消息。时间戳(以毫秒为单位)将取自元数据时间戳,否则将应用现在消息时间戳,如果skipLatestPersistence设置为true,则允许停止更新最新ts_kv表中传入键的值。启用【useServerTs】参数以使用消息处理的时间戳,而不是消息中的时间戳。如果合并的消息来自多种类型(设备、资产等)的消息,则对各种顺序处理都很有用。在顺序处理的情况下,平台保证消息按照提交到队列的顺序进行处理。然而,由多个设备/服务器发起的消息的时间戳可能早在它们被推送到队列之前就不同步了。如果新记录的时间戳比以前的记录旧,则DB层具有某些优化,可以忽略“属性”和“最新值”表的更新。因此,为了确保所有消息都得到正确处理,应该为顺序消息处理场景启用此参数。`,
  94 + description: `保存时序数据。`,
  95 + },
  96 + saveToCustomTable: {
  97 + name: '保存到自定义表',
  98 + details: `管理员应设置不带前缀的自定义表名:【cs_tb_】,管理员可以配置消息字段名称和Table列名称之间的映射;注意:如果映射键为【$entity_id】;由消息发起人标识,然后到适当的列名(映射值)将写入消息发起人id。如果指定的消息字段不存在或不是标准JSON,出站消息将通过failure链路;否则,消息将通过success链进行。`,
  99 + description: `节点将来自Cassandra数据库的传入Message有效负载的数据,存储到预定义的自定义表中,该表应以cs_tb_为前缀,以避免数据插入到公共tb表中。注意:规则节点只能用于Cassandra DB。`,
  100 + },
  101 + synchronizationEnd: {
  102 + name: '同步结束',
  103 + details: ``,
  104 + description: `此节点现在已弃用。请改用“检查数据点”。`,
  105 + },
  106 + synchronizationStart: {
  107 + name: '同步启动',
  108 + details: `此节点应与“同步结束”节点一起使用。此节点将根据消息发起方id将消息放入队列。在上一条消息处理完成或发生超时事件之前,不会处理后续消息。每个发起方的队列大小和超时值可在系统级别进行配置。`,
  109 + description: `此节点现在已弃用。请改用【检查数据点】。`,
  110 + },
  111 + unassigFromCustomer: {
  112 + name: '从客户取消分配',
  113 + details: `按客户端名称模式查找目标实体客户,然后取消分配该客户的发起者实体。.`,
  114 + description: `从客户取消分配消息发起者实体。`,
  115 + },
  116 +};
... ...
... ... @@ -49,8 +49,8 @@ export default {
49 49 description: '将发起者租户属性或最新遥测添加到消息元数据中。',
50 50 },
51 51 tenantDetails: {
52   - name: '租户属性',
53   - details: `如果配置了单个/多个属性,则会将服务器范围属性添加到消息元数据中。如果配置了单个/多个“最新遥测”,则将最新遥测添加到元数据中。要访问其他节点中的这些属性,可以使用metadata.temperature。`,
54   - description: '将发起者租户属性或最新遥测添加到消息元数据中。',
  52 + name: '租户详细信息',
  53 + details: `如果选中:【将选定的详细信息添加到消息元数据】,则现有字段将添加到消息元数据而不是消息数据;注意:只允许设备、资产和实体视图类型;如果原始的消息发件人未分配给Tenant或者不支持原始发件人类型,消息将转发到失败链,否则将使用成功链路。`,
  54 + description: '将租户详细信息中的字段添加到消息正文或元数据中。',
55 55 },
56 56 };
... ...
  1 +/**
  2 + *规则链 外部的 中文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + alarmNotice: {
  7 + name: '告警通知',
  8 + details: `通知方式包括短信、电子邮件等。`,
  9 + description: '当设备产生告警时,通知联系人。',
  10 + },
  11 + awsSns: {
  12 + name: 'AWS SNS',
  13 + details: `将向AWS SNS主题发布消息有效载荷;出站消息将在AWS SNS的消息元数据中包含响应字段(messageId、requestId),例如requestId字段可以使用Metadata.requestId访问。`,
  14 + description: '将消息发布到AWS SNS。',
  15 + },
  16 + awsSqs: {
  17 + name: 'AWS SQS',
  18 + details: `将向AWS SQS队列发布消息有效负载和元数据属性。出站消息将在AWS SQS的消息元数据中包含响应字段(messageId、requestId、messageBodyMd5、messageAttributesMd5、sequenceNumber)。例如requestId字段可以使用Metadata.requestId访问。`,
  19 + description: '向AWS SQS发布消息。',
  20 + },
  21 + azureIotHub: {
  22 + name: 'Azure物联网中心',
  23 + details: `将消息有效负载发布到Azure物联网中心,使用QoS的条件至少一次。`,
  24 + description: '将消息发布到Azure物联网中心。',
  25 + },
  26 + gcpPubsub: {
  27 + name: 'GCP pubsub',
  28 + details: `将向Google Cloud Platform PubSub主题发布消息负载。出站消息将包含响应字段(GCP PubSub的消息元数据中的messageId字段可以通过Metadata.messageId访问)。`,
  29 + description: '将消息发布到Google Cloud PubSub。',
  30 + },
  31 + kafka: {
  32 + name: 'Kafka',
  33 + details: `将通过Kafka生产记录发送到Kafka服务器。出站消息将包含来自消息元数据中Kafka的响应字段(offset、partition和topic)。例如,partition字段可以通过metadata.partition访问。`,
  34 + description: '将消息发布到Kafka服务器。',
  35 + },
  36 + mqtt: {
  37 + name: 'MQTT',
  38 + details: `将消息有效负载发布到MQTT代理,使用QoS的条件至少一次。`,
  39 + description: '将消息发布到MQTT代理。',
  40 + },
  41 + rabbitmq: {
  42 + name: 'RabbitMQ',
  43 + details: `将向RabbitMQ队列发布消息负载。`,
  44 + description: '将消息发布到RabbitMQ。',
  45 + },
  46 + restApiCall: {
  47 + name: 'rest_api调用',
  48 + details: `将调用REST-API调用GET|POST|PUT|DELETE到外部REST服务器。已将消息有效负载添加到请求正文中。配置的属性可以从消息元数据添加到标头中。出站消息将在消息元数据中包含响应字段(status、statusCode和响应headers)。响应正文保存在出站消息负载中。例如,可以使用metadata.statusCode访问statusCode字段。注意:如果使用系统代理属性,则应添加下一个系统代理属性:“http.proxyHost”和“http.prroxyPort”或“https.proxyHost”和“https.prroxyPort”,接下来的两个应该添加到thingsbard.conf文件中:“tb.proxy.user”和“tb.prroxy.password”。`,
  49 + description: '调用对外部REST服务器的REST_API',
  50 + },
  51 + sendEmail: {
  52 + name: '发送邮件',
  53 + details: `应为SEND_EMAIL类型的邮件。节点仅适用于使用to Email转换节点创建的消息,请使用Successful链将与to Email节点一起使用。`,
  54 + description: '通过SMTP服务器发送电子邮件。',
  55 + },
  56 + sendSms: {
  57 + name: '发送短信',
  58 + details: `将通过使用从消息元数据派生的值填充目标电话号码和短信字段来发送短信。`,
  59 + description: '通过短信提供商发送短信。',
  60 + },
  61 +};
... ...
  1 +/**
  2 + *规则链 Flow 中文配置文件
  3 + 目前共有4个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + acknowledge: {
  7 + name: '确认消息',
  8 + details: `在确认之后,消息被推送到相关的规则节点。如果你不需要这条消息,接下来会发生什么,这很有用。`,
  9 + description: '确认传入消息。',
  10 + },
  11 + checkpoint: {
  12 + name: '检查数据点',
  13 + details: `成功传输后,自动确认收到消息。队列名称是可配置的。`,
  14 + description: '将消息转移到另一个队列。',
  15 + },
  16 + output: {
  17 + name: '输出',
  18 + details: `产生规则链处理的输出。输出作为相应的“输入”规则节点的输出转发给调用者规则链。输出规则节点名称对应于输出消息的关系类型,用于将消息转发给调用者规则链中的其他规则节点。`,
  19 + description: '将消息传递给呼叫者规则链。',
  20 + },
  21 + ruleChain: {
  22 + name: '规则链',
  23 + details: `允许嵌套规则链,类似于单个规则节点。传入消息被转发到指定目标规则链的输入节点。目标规则链可能会产生多个标记的输出。您可以使用输出将处理结果转发给其他规则节点。`,
  24 + description: '将消息传递到另一个规则链。',
  25 + },
  26 +};
... ...
  1 +/**
  2 + *规则链 变换 中文配置文件
  3 + 目前共有3个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + changeOriginator: {
  7 + name: '变更发起者',
  8 + details: `使用配置的关联方向和关联类型找到相关实体;若发现多个关联实体,则只有第一个实体被用作新的发起者,其他实体被丢弃;只有在原始发起者是Alarm实体的情况下才能找到告警联系人。`,
  9 + description: '将消息发起者更改为租户/客户/相关实体/警报发起者。',
  10 + },
  11 + script: {
  12 + name: 'JS脚本',
  13 + details: `JavaScript函数接收3个输入参数:- metadata:一条消息的元数据;- msg:一条消息的有效负载;- msgType:一条消息的类型。应返回以下结构:{ msg: new payload,<br/> metadata: new metadata,<br/>msgType: new msgType };结果对象中的所有字段都是可选的,如果没有指定,将使用原始消息中的字段。`,
  14 + description: '使用JavaScript更改消息有效负载、元数据或消息类型。',
  15 + },
  16 + toEmail: {
  17 + name: '发送到电子邮件',
  18 + details: `通过使用从元数据派生的值填充电子邮件字段,将消息转换为电子邮件内容并发送。设置SEND_EMAIL输出消息类型。`,
  19 + description: '将消息转换为电子邮件内容并发送。',
  20 + },
  21 +};
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.ASSIGN_TO_CUSTOMER);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface AssignToCustomerDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const AssignToCustomerConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbAssignToCustomerNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'assign to customer',
  18 + name: t('actions.index.assignToCustomer.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Finds target Customer by customer name pattern and then assign Originator Entity to this customer. Will create new Customer if it doesn't exists and 'Create new Customer if not exists' is set to true.",
21   - description: 'Assign Message Originator Entity to Customer',
  21 + details: t('actions.index.assignToCustomer.details'),
  22 + description: t('actions.index.assignToCustomer.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CLEAR_ALARM);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface ClearAlarmDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const ClearAlarmConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbClearAlarmNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'clear alarm',
  18 + name: t('actions.index.clearAlarm.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\nNode output:\nIf alarm was not cleared, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'metadata' will contains 'isClearedAlarm' property. Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.",
21   - description: 'Clear Alarm',
  21 + details: t('actions.index.clearAlarm.details'),
  22 + description: t('actions.index.clearAlarm.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Cleared', 'False', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.COPY_TO_VIEW);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface CopyToViewDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,13 +15,11 @@ export const CopyToViewConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbCopyAttributesToEntityViewNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'copy to view',
  18 + name: t('actions.index.copyToView.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Copy attributes from asset/device to related entity view according to entity view configuration. \n Copy will be done only for attributes that are between start and end dates and according to attribute keys configuration. \nChanges message originator to related entity view and produces new messages according to count of updated entity views',
21   - description:
22   - 'Copy attributes from asset/device to entity view and changes message originator to related entity view',
  21 + details: t('actions.index.copyToView.details'),
  22 + description: t('actions.index.copyToView.description'),
23 23 inEnabled: true,
24 24 outEnabled: true,
25 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_ALARM);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface CreateAlarmDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const CreateAlarmConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbCreateAlarmNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'create alarm',
  18 + name: t('actions.index.createAlarm.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Details - JS function that creates JSON object based on incoming message. This object will be added into Alarm.details field.\nNode output:\nIf alarm was not created, original message is returned. Otherwise new Message returned with type 'ALARM', Alarm object in 'msg' property and 'metadata' will contains one of those properties 'isNewAlarm/isExistingAlarm'. Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.",
21   - description: 'Create or Update Alarm',
  21 + details: t('actions.index.createAlarm.details'),
  22 + description: t('actions.index.createAlarm.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Created', 'Updated', 'False', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_RELATION);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface CreateRelationDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,13 +15,11 @@ export const CreateRelationConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbCreateRelationNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'create relation',
  18 + name: t('actions.index.createRelation.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'If the relation already exists or successfully created - Message send via <b>Success</b> chain, otherwise <b>Failure</b> chain will be used.',
21   - description:
22   - "Finds target Entity by entity name pattern and (entity type pattern for Asset, Device) and then create a relation to Originator Entity by type and direction. If Selected entity type: Asset, Device or Customer will create new Entity if it doesn't exist and selected checkbox 'Create new entity if not exists'.<br> In case that relation from the message originator to the selected entity not exist and If selected checkbox 'Remove current relations', before creating the new relation all existed relations to message originator by type and direction will be removed.<br> If relation from the message originator to the selected entity created and If selected checkbox 'Change originator to related entity', outbound message will be processed as a message from this entity.",
  21 + details: t('actions.index.createRelation.details'),
  22 + description: t('actions.index.createRelation.description'),
23 23 inEnabled: true,
24 24 outEnabled: true,
25 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELAY_DEPRECATED);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface DelayDeprecatedDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const DelayDeprecatedConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.delay.TbMsgDelayNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'delay (deprecated)',
  18 + name: t('actions.index.delay.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Delays messages for a configurable period. Please note, this node acknowledges the message from the current queue (message will be removed from queue). Deprecated because the acknowledged message still stays in memory (to be delayed) and this does not guarantee that message will be processed even if the "retry failures and timeouts" processing strategy will be chosen.',
21   - description: 'Delays incoming message (deprecated)',
  21 + details: t('actions.index.delay.details'),
  22 + description: t('actions.index.delay.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELETE_RELATION);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface DeleteRelationDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,13 +16,11 @@ export const DeleteRelationConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.action.TbDeleteRelationNode',
15 18 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'delete relation',
  19 + name: t('actions.index.deleteRelation.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details:
20   - 'If the relation(s) successfully deleted - Message send via <b>Success</b> chain, otherwise <b>Failure</b> chain will be used.',
21   - description:
22   - "Finds target Entity by entity name pattern and then delete a relation to Originator Entity by type and direction if 'Delete single entity' is set to true, otherwise rule node will delete all relations to the originator of the message by type and direction.",
  22 + details: t('actions.index.deleteRelation.details'),
  23 + description: t('actions.index.deleteRelation.description'),
23 24 inEnabled: true,
24 25 outEnabled: true,
25 26 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DEVICE_PROFILE);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface DeviceProfileDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,12 +16,11 @@ export const DeviceProfileConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.profile.TbDeviceProfileNode',
15 18 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'device profile',
  19 + name: t('actions.index.deviceProfile.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details:
20   - "Create and clear alarms based on alarm rules defined in device profile. The output relation type is either 'Alarm Created', 'Alarm Updated', 'Alarm Severity Updated' and 'Alarm Cleared' or simply 'Success' if no alarms were affected.",
21   - description: 'Process device messages based on device profile settings',
  22 + details: t('actions.index.deviceProfile.details'),
  23 + description: t('actions.index.deviceProfile.description'),
22 24 inEnabled: true,
23 25 outEnabled: true,
24 26 relationTypes: [
... ...
... ... @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.GENERATOR);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface GeneratorDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,12 +16,11 @@ export const GeneratorConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.debug.TbMsgGeneratorNode',
15 18 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'generator',
  19 + name: t('actions.index.generator.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details:
20   - 'Generates messages with configurable period. Javascript function used for message generation.',
21   - description: 'Periodically generates messages',
  22 + details: t('actions.index.generator.details'),
  23 + description: t('actions.index.generator.description'),
22 24 inEnabled: false,
23 25 outEnabled: true,
24 26 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.GPS_GEOFENCING_EVENTS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface GpsGeofencingEventsDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const GpsGeofencingEventsConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.geo.TbGpsGeofencingActionNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'gps geofencing events',
  18 + name: t('actions.index.gpsGeofencingEvents.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Extracts latitude and longitude parameters from incoming message and returns different events based on configuration parameters',
21   - description: 'Produces incoming messages using GPS based geofencing',
  21 + details: t('actions.index.gpsGeofencingEvents.details'),
  22 + description: t('actions.index.gpsGeofencingEvents.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Entered', 'Left', 'Inside', 'Outside', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.LOG);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface LogDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const LogConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbLogNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'log',
  18 + name: t('actions.index.log.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Transform incoming Message with configured JS function to String and log final value into Thingsboard log file. Message payload can be accessed via <code>msg</code> property. For example <code>'temperature = ' + msg.temperature ;</code>. Message metadata can be accessed via <code>metadata</code> property. For example <code>'name = ' + metadata.customerName;</code>.",
21   - description: 'Log incoming messages using JS script for transformation Message into String',
  21 + details: t('actions.index.log.details'),
  22 + description: t('actions.index.log.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.MESSAGE_COUNT);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface MessageCountDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,12 +16,11 @@ export const MessageCountConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.action.TbMsgCountNode',
15 18 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'message count',
  19 + name: t('actions.index.messageCount.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details:
20   - 'Count incoming messages for specified interval and produces POST_TELEMETRY_REQUEST msg with messages count',
21   - description: 'Count incoming messages',
  22 + details: t('actions.index.messageCount.details'),
  23 + description: t('actions.index.messageCount.description'),
22 24 inEnabled: true,
23 25 outEnabled: true,
24 26 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.PUSH_TO_EDGE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface PushToEdgeDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const PushToEdgeConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.edge.TbMsgPushToEdgeNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'push to edge',
  18 + name: t('actions.index.pushToEdge.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Push messages from cloud to edge. Message originator must be assigned to particular edge or message originator is <b>EDGE</b> entity itself. This node used only on cloud instances to push messages from cloud to edge. Once message arrived into this node it’s going to be converted into edge event and saved to the database. Node doesn't push messages directly to edge, but stores event(s) in the edge queue. <br>Supports next originator types:<br><code>DEVICE</code><br><code>ASSET</code><br><code>ENTITY_VIEW</code><br><code>DASHBOARD</code><br><code>TENANT</code><br><code>CUSTOMER</code><br><code>EDGE</code><br><br>As well node supports next message types:<br><code>POST_TELEMETRY_REQUEST</code><br><code>POST_ATTRIBUTES_REQUEST</code><br><code>ATTRIBUTES_UPDATED</code><br><code>ATTRIBUTES_DELETED</code><br><code>ALARM</code><br><br>Message will be routed via <b>Failure</b> route if node was not able to save edge event to database or unsupported originator type/message type arrived. In case successful storage edge event to database message will be routed via <b>Success</b> route.",
21   - description: 'Push messages from cloud to edge',
  21 + details: t('actions.index.pushToEdge.details'),
  22 + description: t('actions.index.pushToEdge.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REPLY);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface RpcCallReplyDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,11 +15,11 @@ export const RpcCallReplyConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'rpc call reply',
  18 + name: t('actions.index.rpcCallReply.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details: 'Expects messages with any message type. Will forward message body to the device.',
20   - description: 'Sends reply to RPC call from device',
  21 + details: t('actions.index.rpcCallReply.details'),
  22 + description: t('actions.index.rpcCallReply.description'),
21 23 inEnabled: true,
22 24 outEnabled: true,
23 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REQUEST);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface RpcCallRequestDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const RpcCallRequestConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'rpc call request',
  18 + name: t('actions.index.rpcCallRequest.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Expects messages with "method" and "params". Will forward response from device to next nodes.If the RPC call request is originated by REST API call from user, will forward the response to user immediately.',
21   - description: 'Sends RPC call to device',
  21 + details: t('actions.index.rpcCallRequest.details'),
  22 + description: t('actions.index.rpcCallRequest.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SaveAttributesDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const SaveAttributesConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'save attributes',
  18 + name: t('actions.index.saveAttributes.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Saves entity attributes based on configurable scope parameter. Expects messages with 'POST_ATTRIBUTES_REQUEST' message type",
21   - description: 'Saves attributes data',
  21 + details: t('actions.index.saveAttributes.details'),
  22 + description: t('actions.index.saveAttributes.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_EVENT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SaveEventDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,11 +15,11 @@ export const SaveEventConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.yunteng.event.TkMsgEventNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'save event',
  18 + name: t('actions.index.saveEvent.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details: "Saves entity event . Expects messages with 'POST_EVENT_REQUEST' message type",
20   - description: 'Saves device event data',
  21 + details: t('actions.index.saveEvent.details'),
  22 + description: t('actions.index.saveEvent.description'),
21 23 inEnabled: true,
22 24 outEnabled: true,
23 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TIMESERIES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SaveTimeseriesDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const SaveTimeseriesConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'save timeseries',
  18 + name: t('actions.index.saveTimeseries.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Saves timeseries telemetry data based on configurable TTL parameter. Expects messages with 'POST_TELEMETRY_REQUEST' message type. Timestamp in milliseconds will be taken from metadata.ts, otherwise 'now' message timestamp will be applied. Allows stopping updating values for incoming keys in the latest ts_kv table if 'skipLatestPersistence' is set to true.\n <br/>Enable 'useServerTs' param to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).\n<br/>In the case of sequential processing, the platform guarantees that the messages are processed in the order of their submission to the queue. However, the timestamp of the messages originated by multiple devices/servers may be unsynchronized long before they are pushed to the queue. The DB layer has certain optimizations to ignore the updates of the \"attributes\" and \"latest values\" tables if the new record has a timestamp that is older than the previous record. So, to make sure that all the messages will be processed correctly, one should enable this parameter for sequential message processing scenarios.",
21   - description: 'Saves timeseries data',
  21 + details: t('actions.index.saveTimeseries.details'),
  22 + description: t('actions.index.saveTimeseries.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TO_CUSTOM_TABLE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SaveToCustomTableDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,13 +15,11 @@ export const SaveToCustomTableConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbSaveToCustomCassandraTableNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'save to custom table',
  18 + name: t('actions.index.saveToCustomTable.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Administrator should set the custom table name without prefix: <b>cs_tb_</b>. <br>Administrator can configure the mapping between the Message field names and Table columns name.<br><b>Note:</b>If the mapping key is <b>$entity_id</b>, that is identified by the Message Originator, then to the appropriate column name(mapping value) will be write the message originator id.<br><br>If specified message field does not exist or is not a JSON Primitive, the outbound message will be routed via <b>failure</b> chain, otherwise, the message will be routed via <b>success</b> chain.',
21   - description:
22   - 'Node stores data from incoming Message payload to the Cassandra database into the predefined custom table that should have <b>cs_tb_</b> prefix, to avoid the data insertion to the common TB tables.<br><b>Note:</b> rule node can be used only for Cassandra DB.',
  21 + details: t('actions.index.saveToCustomTable.details'),
  22 + description: t('actions.index.saveToCustomTable.description'),
23 23 inEnabled: true,
24 24 outEnabled: true,
25 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_END);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SynchronizationEndDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,11 +15,11 @@ export const SynchronizationEndConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.transaction.TbSynchronizationEndNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'synchronization end',
  18 + name: t('actions.index.synchronizationEnd.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details: '',
20   - description: 'This Node is now deprecated. Use "Checkpoint" instead.',
  21 + details: t('actions.index.synchronizationEnd.details'),
  22 + description: t('actions.index.synchronizationEnd.description'),
21 23 inEnabled: true,
22 24 outEnabled: true,
23 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_START);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SynchronizationStartDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const SynchronizationStartConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.transaction.TbSynchronizationBeginNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'synchronization start',
  18 + name: t('actions.index.synchronizationStart.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'This node should be used together with "synchronization end" node. \n This node will put messages into queue based on message originator id. \nSubsequent messages will not be processed until the previous message processing is completed or timeout event occurs.\nSize of the queue per originator and timeout values are configurable on a system level',
21   - description: 'This Node is now deprecated. Use "Checkpoint" instead.',
  21 + details: t('actions.index.synchronizationStart.details'),
  22 + description: t('actions.index.synchronizationStart.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.UNASSIGN_FROM_CUSTOMER);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface UnassignFromCustomerDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const UnassignFromCustomerConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.action.TbUnassignFromCustomerNode',
15 17 categoryType: RuleNodeTypeEnum.ACTION,
16   - name: 'unassign from customer',
  18 + name: t('actions.index.unassigFromCustomer.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Finds target Entity Customer by Customer name pattern and then unassign Originator Entity from this customer.',
21   - description: 'Unassign Message Originator Entity from Customer',
  21 + details: t('actions.index.unassigFromCustomer.details'),
  22 + description: t('actions.index.unassigFromCustomer.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,12 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_DETAILS);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface TenantDetailsDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,12 +16,11 @@ export const TenantDetailsConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTenantDetailsNode',
15 18 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16   - name: 'tenant details',
  19 + name: t('enrichments.index.tenantDetails.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details:
20   - 'If checkbox: <b>Add selected details to the message metadata</b> is selected, existing fields will be added to the message metadata instead of message data.<br><br><b>Note:</b> only Device, Asset, and Entity View type are allowed.<br><br>If the originator of the message is not assigned to Tenant, or originator type is not supported - Message will be forwarded to <b>Failure</b> chain, otherwise, <b>Success</b> chain will be used.',
21   - description: 'Adds fields from Tenant details to the message body or metadata',
  22 + details: t('enrichments.index.tenantDetails.details'),
  23 + description: t('enrichments.index.tenantDetails.description'),
22 24 inEnabled: true,
23 25 outEnabled: true,
24 26 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.ALARM_NOTICE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface AlarmNoticeDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,11 +15,11 @@ export const AlarmNoticeConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.notice.AlarmNoticeNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'alarm notice',
  18 + name: t('externals.index.alarmNotice.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details: 'notice method include sms,email and so on.',
20   - description: 'while device alarm, notice some people.',
  21 + details: t('externals.index.alarmNotice.details'),
  22 + description: t('externals.index.alarmNotice.description'),
21 23 inEnabled: true,
22 24 outEnabled: true,
23 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SNS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface AwsSnsDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const AwsSnsConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.aws.sns.TbSnsNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'aws sns',
  18 + name: t('externals.index.awsSns.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Will publish message payload to the AWS SNS topic. Outbound message will contain response fields (<code>messageId</code>, <code>requestId</code>) in the Message Metadata from the AWS SNS. For example <b>requestId</b> field can be accessed with <code>metadata.requestId</code>.',
21   - description: 'Publish message to the AWS SNS',
  21 + details: t('externals.index.awsSns.details'),
  22 + description: t('externals.index.awsSns.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SQS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface AwsSqsDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const AwsSqsConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.aws.sqs.TbSqsNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'aws sqs',
  18 + name: t('externals.index.awsSqs.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Will publish message payload and metadata attributes to the AWS SQS queue. Outbound message will contain response fields (<code>messageId</code>, <code>requestId</code>, <code>messageBodyMd5</code>, <code>messageAttributesMd5</code>, <code>sequenceNumber</code>) in the Message Metadata from the AWS SQS. For example <b>requestId</b> field can be accessed with <code>metadata.requestId</code>.',
21   - description: 'Publish messages to the AWS SQS',
  21 + details: t('externals.index.awsSqs.details'),
  22 + description: t('externals.index.awsSqs.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AZURE_IOT_HUB);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface AzureIotHubDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,11 +15,11 @@ export const AzureIotHubConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.mqtt.azure.TbAzureIotHubNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'azure iot hub',
  18 + name: t('externals.index.azureIotHub.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details: 'Will publish message payload to the Azure IoT Hub with QoS <b>AT_LEAST_ONCE</b>.',
20   - description: 'Publish messages to the Azure IoT Hub',
  21 + details: t('externals.index.azureIotHub.details'),
  22 + description: t('externals.index.azureIotHub.description'),
21 23 inEnabled: true,
22 24 outEnabled: true,
23 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.GCP_PUBSUB);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface GcpPubsubDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const GcpPubsubConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.gcp.pubsub.TbPubSubNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'gcp pubsub',
  18 + name: t('externals.index.gcpPubsub.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Will publish message payload to the Google Cloud Platform PubSub topic. Outbound message will contain response fields (<code>messageId</code> in the Message Metadata from the GCP PubSub. <b>messageId</b> field can be accessed with <code>metadata.messageId</code>.',
21   - description: 'Publish message to the Google Cloud PubSub',
  21 + details: t('externals.index.gcpPubsub.details'),
  22 + description: t('externals.index.gcpPubsub.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.KAFKA);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface KafkaDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const KafkaConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.kafka.TbKafkaNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'kafka',
  18 + name: t('externals.index.kafka.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Will send record via Kafka producer to Kafka server. Outbound message will contain response fields (<code>offset</code>, <code>partition</code>, <code>topic</code>) from the Kafka in the Message Metadata. For example <b>partition</b> field can be accessed with <code>metadata.partition</code>.',
21   - description: 'Publish messages to Kafka server',
  21 + details: t('externals.index.kafka.details'),
  22 + description: t('externals.index.kafka.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.MQTT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface MqttDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,11 +15,11 @@ export const MqttConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.mqtt.TbMqttNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'mqtt',
  18 + name: t('externals.index.mqtt.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details: 'Will publish message payload to the MQTT broker with QoS <b>AT_LEAST_ONCE</b>.',
20   - description: 'Publish messages to the MQTT broker',
  21 + details: t('externals.index.mqtt.details'),
  22 + description: t('externals.index.mqtt.description'),
21 23 inEnabled: true,
22 24 outEnabled: true,
23 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,12 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.RABBITMQ);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface RabbitmqDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,11 +16,11 @@ export const RabbitmqConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.rabbitmq.TbRabbitMqNode',
15 18 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'rabbitmq',
  19 + name: t('externals.index.rabbitmq.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details: 'Will publish message payload to RabbitMQ queue.',
20   - description: 'Publish messages to the RabbitMQ',
  22 + details: t('externals.index.rabbitmq.details'),
  23 + description: t('externals.index.rabbitmq.description'),
21 24 inEnabled: true,
22 25 outEnabled: true,
23 26 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.REST_API_CALL);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface RestApiCallDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const RestApiCallConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.rest.TbRestApiCallNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'rest api call',
  18 + name: t('externals.index.restApiCall.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Will invoke REST API call <code>GET | POST | PUT | DELETE</code> to external REST server. Message payload added into Request body. Configured attributes can be added into Headers from Message Metadata. Outbound message will contain response fields (<code>status</code>, <code>statusCode</code>, <code>statusReason</code> and response <code>headers</code>) in the Message Metadata. Response body saved in outbound Message payload. For example <b>statusCode</b> field can be accessed with <code>metadata.statusCode</code>.<br/><b>Note-</b> if you use system proxy properties, the next system proxy properties should be added: "http.proxyHost" and "http.proxyPort" or "https.proxyHost" and "https.proxyPort" or "socksProxyHost" and "socksProxyPort",and if your proxy with auth, the next ones should be added: "tb.proxy.user" and "tb.proxy.password" to the thingsboard.conf file.',
21   - description: 'Invoke REST API calls to external REST server',
  21 + details: t('externals.index.restApiCall.details'),
  22 + description: t('externals.index.restApiCall.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_EMAIL);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SendEmailDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const SendEmailConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.mail.TbSendEmailNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'send email',
  18 + name: t('externals.index.sendEmail.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Expects messages with <b>SEND_EMAIL</b> type. Node works only with messages that where created using <code>to Email</code> transformation Node, please connect this Node with <code>to Email</code> Node using <code>Successful</code> chain.',
21   - description: 'Sends email message via SMTP server.',
  21 + details: t('externals.index.sendEmail.details'),
  22 + description: t('externals.index.sendEmail.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_SMS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface SendSmsDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const SendSmsConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.sms.TbSendSmsNode',
15 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16   - name: 'send sms',
  18 + name: t('externals.index.sendSms.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Will send SMS message by populating target phone numbers and sms message fields using values derived from message metadata.',
21   - description: 'Sends SMS message via SMS provider.',
  21 + details: t('externals.index.sendSms.details'),
  22 + description: t('externals.index.sendSms.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(FlowCategoryComponentEnum.ACKNOWLEDGE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface AcknowledgeDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const AcknowledgeConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.flow.TbAckNode',
15 17 categoryType: RuleNodeTypeEnum.FLOW,
16   - name: 'acknowledge',
  18 + name: t('flows.index.acknowledge.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "After acknowledgement, the message is pushed to related rule nodes. Useful if you don't care what happens to this message next.",
21   - description: 'Acknowledges the incoming message',
  21 + details: t('flows.index.acknowledge.details'),
  22 + description: t('flows.index.acknowledge.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(FlowCategoryComponentEnum.CHECKPOINT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface CheckpointDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const CheckpointConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.flow.TbCheckpointNode',
15 17 categoryType: RuleNodeTypeEnum.FLOW,
16   - name: 'checkpoint',
  18 + name: t('flows.index.checkpoint.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'After successful transfer incoming message is automatically acknowledged. Queue name is configurable.',
21   - description: 'transfers the message to another queue',
  21 + details: t('flows.index.checkpoint.details'),
  22 + description: t('flows.index.checkpoint.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(FlowCategoryComponentEnum.OUTPUT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface OutputDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const OutputConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.flow.TbRuleChainOutputNode',
15 17 categoryType: RuleNodeTypeEnum.FLOW,
16   - name: 'output',
  18 + name: t('flows.index.output.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Produces output of the rule chain processing. The output is forwarded to the caller rule chain, as an output of the corresponding "input" rule node. The output rule node name corresponds to the relation type of the output message, and it is used to forward messages to other rule nodes in the caller rule chain. ',
21   - description: 'transfers the message to the caller rule chain',
  21 + details: t('flows.index.output.details'),
  22 + description: t('flows.index.output.description'),
22 23 inEnabled: true,
23 24 outEnabled: false,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(FlowCategoryComponentEnum.RULE_CHAIN);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface RuleChainDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,13 +15,12 @@ export const RuleChainConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.flow.TbRuleChainInputNode',
15 17 categoryType: RuleNodeTypeEnum.FLOW,
16   - name: 'rule chain',
  18 + name: t('flows.index.ruleChain.name'),
17 19 // backgroundColor: '#d6c4f1',
18 20 configurationDescriptor: {
19 21 nodeDefinition: {
20   - details:
21   - 'Allows to nest the rule chain similar to single rule node. The incoming message is forwarded to the input node of the specified target rule chain. The target rule chain may produce multiple labeled outputs. You may use the outputs to forward the results of processing to other rule nodes.',
22   - description: 'transfers the message to another rule chain',
  22 + details: t('flows.index.ruleChain.details'),
  23 + description: t('flows.index.ruleChain.description'),
23 24 inEnabled: true,
24 25 outEnabled: true,
25 26 relationTypes: ['Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { TransformationCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(TransformationCategoryComponentEnum.CHANGE_ORIGINATOR);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface ChangeOriginatorDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const ChangeOriginatorConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.transform.TbChangeOriginatorNode',
15 17 categoryType: RuleNodeTypeEnum.TRANSFORMATION,
16   - name: 'change originator',
  18 + name: t('transformations.index.changeOriginator.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - 'Related Entity found using configured relation direction and Relation Type. If multiple Related Entities are found, only first Entity is used as new Originator, other entities are discarded.<br/>Alarm Originator found only in case original Originator is <code>Alarm</code> entity.',
21   - description: 'Change Message Originator To Tenant/Customer/Related Entity/Alarm Originator',
  21 + details: t('transformations.index.changeOriginator.details'),
  22 + description: t('transformations.index.changeOriginator.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,12 @@ import { TransformationCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(TransformationCategoryComponentEnum.SCRIPT);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 11 export interface ScriptDataType {
9 12 someConfiguration?: Recordable;
10 13 }
... ... @@ -13,12 +16,11 @@ export const ScriptConfig: NodeItemConfigType = {
13 16 ...keys,
14 17 clazz: 'org.thingsboard.rule.engine.transform.TbTransformMsgNode',
15 18 categoryType: RuleNodeTypeEnum.TRANSFORMATION,
16   - name: 'script',
  19 + name: t('transformations.index.script.name'),
17 20 configurationDescriptor: {
18 21 nodeDefinition: {
19   - details:
20   - 'JavaScript function receive 3 input parameters <br/> <code>metadata</code> - is a Message metadata.<br/><code>msg</code> - is a Message payload.<br/><code>msgType</code> - is a Message type.<br/>Should return the following structure:<br/><code>{ msg: <i style="color: #666;">new payload</i>,<br/>&nbsp&nbsp&nbspmetadata: <i style="color: #666;">new metadata</i>,<br/>&nbsp&nbsp&nbspmsgType: <i style="color: #666;">new msgType</i> }</code><br/>All fields in resulting object are optional and will be taken from original message if not specified.',
21   - description: 'Change Message payload, Metadata or Message type using JavaScript',
  22 + details: t('transformations.index.script.details'),
  23 + description: t('transformations.index.script.description'),
22 24 inEnabled: true,
23 25 outEnabled: true,
24 26 relationTypes: ['Success', 'Failure'],
... ...
... ... @@ -2,9 +2,11 @@ import { TransformationCategoryComponentEnum } from '../../../enum/category';
2 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 3 import type { NodeItemConfigType } from '../../../types/node';
4 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 7 const keys = useCreateNodeKey(TransformationCategoryComponentEnum.TO_EMAIL);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 10 export interface ToEmailDataType {
9 11 someConfiguration?: Recordable;
10 12 }
... ... @@ -13,12 +15,11 @@ export const ToEmailConfig: NodeItemConfigType = {
13 15 ...keys,
14 16 clazz: 'org.thingsboard.rule.engine.mail.TbMsgToEmailNode',
15 17 categoryType: RuleNodeTypeEnum.TRANSFORMATION,
16   - name: 'to email',
  18 + name: t('transformations.index.toEmail.name'),
17 19 configurationDescriptor: {
18 20 nodeDefinition: {
19   - details:
20   - "Transforms message to email message by populating email fields using values derived from message metadata. Set 'SEND_EMAIL' output message type.",
21   - description: 'Transforms message to email message',
  21 + details: t('transformations.index.toEmail.details'),
  22 + description: t('transformations.index.toEmail.description'),
22 23 inEnabled: true,
23 24 outEnabled: true,
24 25 relationTypes: ['Success', 'Failure'],
... ...