Commit ee9b5b61b9425f8411a78ea1c3490a7d1e2d41e4

Authored by xp.Huang
2 parents 5127d364 a32a5fed

Merge branch 'ft' into 'main_dev'

feat: 规则链中英文翻译

See merge request yunteng/thingskit-front!1031
Showing 100 changed files with 2539 additions and 534 deletions

Too many changes to show.

To preserve performance only 100 of 107 files are displayed.

@@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
12 overlayClassName="app-locale-picker-overlay" 12 overlayClassName="app-locale-picker-overlay"
13 > 13 >
14 <span class="cursor-pointer flex items-center" :style="{ color: color }"> 14 <span class="cursor-pointer flex items-center" :style="{ color: color }">
15 - <!-- <Icon icon="ion:language" /> -->  
16 - <!-- <span v-if="showText" class="ml-1">{{ getLocaleText }}</span> --> 15 + <!-- <Icon icon="ion:language" />
  16 + <span v-if="showText" class="ml-1">{{ getLocaleText }}</span> -->
17 </span> 17 </span>
18 </Dropdown> 18 </Dropdown>
19 </template> 19 </template>
  1 +/**
  2 + *规则链 动作 英文配置文件
  3 + 目前共有22个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: 'Action',
  7 + description: 'Perform special actions',
  8 + assignToCustomer: {
  9 + name: 'assign to customer',
  10 + 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.`,
  11 + description: 'Assign Message Originator Entity to Customer',
  12 + },
  13 + clearAlarm: {
  14 + name: 'clear alarm',
  15 + 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>.`,
  16 + description: 'Clear Alarm',
  17 + },
  18 + copyToView: {
  19 + name: 'copy to view',
  20 + 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`,
  21 + description:
  22 + 'Copy attributes from asset/device to entity view and changes message originator to related entity view',
  23 + },
  24 + createAlarm: {
  25 + name: 'create alarm',
  26 + 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>.`,
  27 + description: 'Create or Update Alarm',
  28 + },
  29 + createRelation: {
  30 + name: 'create relation',
  31 + details: `If the relation already exists or successfully created - Message send via <b>Success</b> chain, otherwise <b>Failure</b> chain will be used.`,
  32 + 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.`,
  33 + },
  34 + deleteRelation: {
  35 + name: 'delete relation',
  36 + details: `If the relation(s) successfully deleted - Message send via <b>Success</b> chain, otherwise <b>Failure</b> chain will be used.`,
  37 + 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.`,
  38 + },
  39 + delay: {
  40 + name: 'delay (deprecated)',
  41 + 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.`,
  42 + description: `Delays incoming message (deprecated)`,
  43 + },
  44 + deviceProfile: {
  45 + name: 'device profile',
  46 + 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.`,
  47 + description: `Process device messages based on device profile settings`,
  48 + },
  49 + generator: {
  50 + name: 'generator',
  51 + details: `Generates messages with configurable period. Javascript function used for message generation.`,
  52 + description: `Periodically generates messages`,
  53 + },
  54 + gpsGeofencingEvents: {
  55 + name: 'gps geofencing events',
  56 + details: `Extracts latitude and longitude parameters from incoming message and returns different events based on configuration parameters`,
  57 + description: `Produces incoming messages using GPS based geofencing`,
  58 + },
  59 + log: {
  60 + name: 'log',
  61 + 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>.`,
  62 + description: `Log incoming messages using JS script for transformation Message into String`,
  63 + },
  64 + messageCount: {
  65 + name: 'message count',
  66 + details: `Count incoming messages for specified interval and produces POST_TELEMETRY_REQUEST msg with messages count`,
  67 + description: `Count incoming messages`,
  68 + },
  69 + pushToEdge: {
  70 + name: 'push to edge',
  71 + 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.`,
  72 + description: `Push messages from cloud to edge`,
  73 + },
  74 + rpcCallReply: {
  75 + name: 'rpc call reply',
  76 + details: `Expects messages with any message type. Will forward message body to the device.`,
  77 + description: `Sends reply to RPC call from device`,
  78 + },
  79 + rpcCallRequest: {
  80 + name: 'rpc call request',
  81 + 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.`,
  82 + description: `Sends RPC call to device`,
  83 + },
  84 + saveAttributes: {
  85 + name: 'save attributes',
  86 + details: `Saves entity attributes based on configurable scope parameter. Expects messages with 'POST_ATTRIBUTES_REQUEST' message type`,
  87 + description: `Saves attributes data`,
  88 + },
  89 + saveEvent: {
  90 + name: 'save event',
  91 + details: `Saves entity event . Expects messages with 'POST_EVENT_REQUEST' message type`,
  92 + description: `Saves device event data`,
  93 + },
  94 + saveTimeseries: {
  95 + name: 'save timeseries',
  96 + 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.`,
  97 + description: `Saves timeseries data`,
  98 + },
  99 + saveToCustomTable: {
  100 + name: 'save to custom table',
  101 + 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.`,
  102 + 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.`,
  103 + },
  104 + synchronizationEnd: {
  105 + name: 'synchronization end',
  106 + details: ``,
  107 + description: `This Node is now deprecated. Use "Checkpoint" instead.`,
  108 + },
  109 + synchronizationStart: {
  110 + name: 'synchronization start',
  111 + 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`,
  112 + description: `This Node is now deprecated. Use "Checkpoint" instead.`,
  113 + },
  114 + unassigFromCustomer: {
  115 + name: 'unassign from customer',
  116 + details: `Finds target Entity Customer by Customer name pattern and then unassign Originator Entity from this customer.`,
  117 + description: `Unassign Message Originator Entity from Customer`,
  118 + },
  119 +};
  1 +/**
  2 + *规则链 属性集 英文配置文件
  3 + 目前共有10个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: 'Enrichment',
  7 + description: 'Add additional information to message metadata',
  8 + calculateDelta: {
  9 + name: 'calculate delta',
  10 + details: `Calculates delta and period based on the previous time-series reading and current data. Delta calculation is done in scope of the message originator, e.g. device, asset or customer. If there is input key, the output relation will be 'Success' unless delta is negative and corresponding configuration parameter is set. If there is no input value key in the incoming message, the output relation will be 'Other'.`,
  11 + description: `Calculates and adds 'delta' value into message based on the incoming and previous value`,
  12 + },
  13 + customerAttributes: {
  14 + name: 'customer attributes',
  15 + details: `If Attributes enrichment configured, server scope attributes are added into Message metadata. If Latest Telemetry enrichment configured, latest telemetry added into metadata. To access those attributes in other nodes this template can be used <code>metadata.temperature</code>.`,
  16 + description: 'Add Originators Customer Attributes or Latest Telemetry into Message Metadata',
  17 + },
  18 + customerDetails: {
  19 + name: 'customer details',
  20 + details: `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 Customer, 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 Customer details to the message body or metadata',
  22 + },
  23 + originatorAttributes: {
  24 + name: 'originator attributes',
  25 + details: `If Attributes enrichment configured, <b>CLIENT/SHARED/SERVER</b> attributes are added into Message metadata with specific prefix: <i>cs/shared/ss</i>. Latest telemetry value added into metadata without prefix. To access those attributes in other nodes this template can be used <code>metadata.cs_temperature</code> or <code>metadata.shared_limit</code> `,
  26 + description: 'Add Message Originator Attributes or Latest Telemetry into Message Metadata',
  27 + },
  28 + originatorFields: {
  29 + name: 'originator fields',
  30 + details: `Will fetch fields values specified in mapping. If specified field is not part of originator fields it will be ignored.`,
  31 + description: 'Add Message Originator fields values into Message Metadata',
  32 + },
  33 + originatorTelemetry: {
  34 + name: 'originator telemetry',
  35 + details: `The node allows you to select fetch mode: <b>FIRST/LAST/ALL</b> to fetch telemetry of certain time range that are added into Message metadata without any prefix. If selected fetch mode <b>ALL</b> Telemetry will be added like array into Message Metadata where <b>key</b> is Timestamp and <b>value</b> is value of Telemetry.</br>If selected fetch mode <b>FIRST</b> or <b>LAST</b> Telemetry will be added like string without Timestamp.</br>Also, the rule node allows you to select telemetry sampling order: <b>ASC</b> or <b>DESC</b>. </br>Aggregation feature allows you to fetch aggregated telemetry as a single value by <b>AVG, COUNT, SUM, MIN, MAX, NONE</b>. </br><b>Note</b>: The maximum size of the fetched array is 1000 records.\n `,
  36 + description: 'Add Message Originator Telemetry for selected time range into Message Metadata\n',
  37 + },
  38 + relatedAttributes: {
  39 + name: 'related attributes',
  40 + details: `Related Entity found using configured relation direction and Relation Type. If multiple Related Entities are found, only first Entity is used for attributes enrichment, other entities are discarded. If Attributes enrichment configured, server scope attributes are added into Message metadata. If Latest Telemetry enrichment configured, latest telemetry added into metadata. To access those attributes in other nodes this template can be used <code>metadata.temperature</code>.`,
  41 + description:
  42 + 'Add Originators Related Entity Attributes or Latest Telemetry into Message Metadata',
  43 + },
  44 + relatedDeviceAttributes: {
  45 + name: 'related device attributes',
  46 + details: `If Attributes enrichment configured, <b>CLIENT/SHARED/SERVER</b> attributes are added into Message metadata with specific prefix: <i>cs/shared/ss</i>. Latest telemetry value added into metadata without prefix. To access those attributes in other nodes this template can be used <code>metadata.cs_temperature</code> or <code>metadata.shared_limit</code>`,
  47 + description:
  48 + 'Add Originators Related Device Attributes and Latest Telemetry value into Message Metadata',
  49 + },
  50 + tenantAttributes: {
  51 + name: 'tenant attributes',
  52 + details: `If Attributes enrichment configured, server scope attributes are added into Message metadata. If Latest Telemetry enrichment configured, latest telemetry added into metadata. To access those attributes in other nodes this template can be used <code>metadata.temperature</code>.`,
  53 + description: 'Add Originators Tenant Attributes or Latest Telemetry into Message Metadata',
  54 + },
  55 + tenantDetails: {
  56 + name: 'tenant details',
  57 + details: `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.`,
  58 + description: 'Adds fields from Tenant details to the message body or metadata',
  59 + },
  60 +};
  1 +/**
  2 + *规则链 外部的 英文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: 'External',
  7 + description: 'Interacting with external systems',
  8 + alarmNotice: {
  9 + name: 'alarm notice',
  10 + details: `notice method include sms,email and so on.`,
  11 + description: 'while device alarm, notice some people.',
  12 + },
  13 + awsSns: {
  14 + name: 'aws sns',
  15 + 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>.`,
  16 + description: 'Publish message to the AWS SNS',
  17 + },
  18 + awsSqs: {
  19 + name: 'aws sqs',
  20 + 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>.`,
  21 + description: 'Publish messages to the AWS SQS',
  22 + },
  23 + azureIotHub: {
  24 + name: 'azure iot hub',
  25 + details: `Will publish message payload to the Azure IoT Hub with QoS <b>AT_LEAST_ONCE</b>.`,
  26 + description: 'Publish messages to the Azure IoT Hub',
  27 + },
  28 + gcpPubsub: {
  29 + name: 'gcp pubsub',
  30 + 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>.`,
  31 + description: 'Publish message to the Google Cloud PubSub',
  32 + },
  33 + kafka: {
  34 + name: 'kafka',
  35 + 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>.`,
  36 + description: 'Publish messages to Kafka server',
  37 + },
  38 + mqtt: {
  39 + name: 'mqtt',
  40 + details: `Will publish message payload to the MQTT broker with QoS <b>AT_LEAST_ONCE</b>.`,
  41 + description: 'Publish messages to the MQTT broker',
  42 + },
  43 + rabbitmq: {
  44 + name: 'rabbitmq',
  45 + details: `Will publish message payload to RabbitMQ queue.`,
  46 + description: 'Publish messages to the RabbitMQ',
  47 + },
  48 + restApiCall: {
  49 + name: 'rest api call',
  50 + 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.`,
  51 + description: 'Invoke REST API calls to external REST server',
  52 + },
  53 + sendEmail: {
  54 + name: 'send email',
  55 + 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.`,
  56 + description: 'Sends email message via SMTP server.',
  57 + },
  58 + sendSms: {
  59 + name: 'send sms',
  60 + details: `Will send SMS message by populating target phone numbers and sms message fields using values derived from message metadata.`,
  61 + description: 'Sends SMS message via SMS provider.',
  62 + },
  63 +};
  1 +/**
  2 + *规则链 筛选器 英文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: 'Filter',
  7 + description: 'Filter incoming messages using configuration criteria',
  8 + checkAlarmStatus: {
  9 + name: 'check alarm status',
  10 + details:
  11 + 'If the alarm status matches the specified one - msg is success if does not match - msg is failure.',
  12 + description: 'Checks alarm status.',
  13 + },
  14 + checkExistenceFields: {
  15 + name: 'check existence fields',
  16 + details: `If selected checkbox 'Check that all selected keys are present'\" and all keys in message data and metadata are exist - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.\nElse if the checkbox is not selected, and at least one of the keys from data or metadata of the message exists - send Message via <b>True</b> chain, otherwise, <b>False</b> chain is used. `,
  17 + description: 'Checks the existence of the selected keys from message data and metadata.',
  18 + },
  19 + checkRelation: {
  20 + name: 'check relation',
  21 + details:
  22 + 'If at least one relation exists - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.',
  23 + description: `Checks the relation from the selected entity to the originator of the message by type and direction if 'Check for single entity' is set to true, otherwise rule node will check if exist any relation to the originator of the message by type and direction.`,
  24 + },
  25 + gpsGeofencingFilter: {
  26 + name: 'gps geofencing filter',
  27 + details: `Extracts latitude and longitude parameters from incoming message and returns 'True' if they are inside configured perimeters, 'False' otherwise.`,
  28 + description: 'Filter incoming messages by GPS based geofencing',
  29 + },
  30 + messageType: {
  31 + name: 'message type',
  32 + details: `If incoming MessageType is expected - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.`,
  33 + description: 'Filter incoming messages by Message Type',
  34 + },
  35 + messageTypeSwitch: {
  36 + name: 'message type switch',
  37 + details: `Sends messages with message types <b>"Post attributes", "Post telemetry", "RPC Request"</b> etc. via corresponding chain, otherwise <b>Other</b> chain is used.`,
  38 + description: 'Route incoming messages by Message Type',
  39 + },
  40 + originatorType: {
  41 + name: 'originator type',
  42 + details: `If Originator Type of incoming message is expected - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.`,
  43 + description: 'Filter incoming messages by message Originator Type',
  44 + },
  45 + originatorTypeSwitch: {
  46 + name: 'originator type switch',
  47 + details: `Routes messages to chain according to the originator type ('Device', 'Asset', etc.).`,
  48 + description: 'Route incoming messages by Message Originator Type',
  49 + },
  50 + sceneReact: {
  51 + name: 'originator type switch',
  52 + details: `Implement interactive control of devices based on business scenarios`,
  53 + description: 'Implement interactive control of devices based on business scenarios',
  54 + },
  55 + script: {
  56 + name: 'script',
  57 + details: `Evaluate incoming Message with configured JS condition. If <b>True</b> - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.Message payload can be accessed via <code>msg</code> property. For example <code>msg.temperature < 10;</code><br/>Message metadata can be accessed via <code>metadata</code> property. For example <code>metadata.customerName === 'John';</code><br/>Message type can be accessed via <code>msgType</code> property.`,
  58 + description: 'Filter incoming messages using JS script',
  59 + },
  60 + switch: {
  61 + name: 'switch',
  62 + details: `Node executes configured JS script. Script should return array of next Chain names where Message should be routed. If Array is empty - message not routed to next Node. Message payload can be accessed via <code>msg</code> property. For example <code>msg.temperature < 10;</code><br/>Message metadata can be accessed via <code>metadata</code> property. For example <code>metadata.customerName === 'John';</code><br/>Message type can be accessed via <code>msgType</code> property.`,
  63 + description: 'Route incoming Message to one or multiple output chains',
  64 + },
  65 +};
  1 +/**
  2 + *规则链 Flow 英文配置文件
  3 + 目前共有4个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: 'Flow',
  7 + description: 'Organizes message flow',
  8 + acknowledge: {
  9 + name: 'acknowledge',
  10 + details: `After acknowledgement, the message is pushed to related rule nodes. Useful if you don't care what happens to this message next.`,
  11 + description: 'Acknowledges the incoming message',
  12 + },
  13 + checkpoint: {
  14 + name: 'checkpoint',
  15 + details: `After successful transfer incoming message is automatically acknowledged. Queue name is configurable.`,
  16 + description: 'transfers the message to another queue',
  17 + },
  18 + output: {
  19 + name: 'output',
  20 + 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. `,
  21 + description: 'transfers the message to the caller rule chain',
  22 + },
  23 + ruleChain: {
  24 + name: 'rule chain',
  25 + 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.`,
  26 + description: 'transfers the message to another rule chain',
  27 + },
  28 +};
  1 +/**
  2 + *规则链 变换 英文配置文件
  3 + 目前共有3个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: 'Transform',
  7 + description: 'Change message Payload and metadata',
  8 + changeOriginator: {
  9 + name: 'change originator',
  10 + 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.`,
  11 + description: 'Change Message Originator To Tenant/Customer/Related Entity/Alarm Originator',
  12 + },
  13 + script: {
  14 + name: 'script',
  15 + 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.`,
  16 + description: 'Change Message payload, Metadata or Message type using JavaScript',
  17 + },
  18 + toEmail: {
  19 + name: 'to email',
  20 + details: `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',
  22 + },
  23 +};
  1 +/**
  2 + *规则链 动作 英文配置文件
  3 + 目前共有22个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + AssignToCustomerFieldsNameEnum: {
  7 + CUSTOMER_NAME_PATTERN: 'Customer name pattern',
  8 + CREATE_CUSTOMER_IF_NOT_EXISTS: 'Create new customer if not exists',
  9 + CUSTOMER_CACHE_EXPIRATION: 'Customers cache expiration time(sec)',
  10 + },
  11 + ClearAlarmFieldsNameEnum: {
  12 + ALARM_TYPE: 'Alarm type',
  13 + ALARM_DETAILS_BUILD_JS: 'Alarm details builder',
  14 + },
  15 + CreateAlarmFieldsNameEnum: {
  16 + ALARM_DETAILS_BUILD_JS: 'Alarm details builder',
  17 + USE_MESSAGE_ALARM_DATA: 'Use message alarm data',
  18 + OVERWRITE_ALARM_DETAILS: 'Overwrite alarm details',
  19 + ALARM_TYPE: 'Alarm type',
  20 + SEVERITY: 'Alarm severity pattern',
  21 + PROPAGATE: 'Propagate alarm to related entities',
  22 + RELATION_TYPES: 'Relation types to propagate',
  23 + PROPAGATE_TO_OWNER: 'Propagate alarm to entity owner (Customer or Tenant)',
  24 + PROPAGATE_TO_TENANT: 'Propagate alarm to Tenant',
  25 + DYNAMIC_SEVERITY: 'Use alarm severity pattern',
  26 + },
  27 + CreateRelationFieldsNameEnum: {
  28 + DIRECTION: 'Direction',
  29 + ENTITY_TYPE: 'Type',
  30 + ENTITY_NAME_PATTERN: 'Name pattern',
  31 + ENTITY_TYPE_PATTERN: 'Type pattern',
  32 + RELATION_TYPE: 'Relation type pattern',
  33 + CREATE_ENTITY_IF_NOT_EXISTS: 'Create new entity if not exists',
  34 + REMOVE_CURRENT_RELATIONS: 'Remove current relations',
  35 + CHANGE_ORIGINATOR_TO_RELATED_ENTITY: 'Change originator to related entity',
  36 + ENTITY_CACHE_EXPIRATION: 'Entities cache expiration time(sec)',
  37 + },
  38 + DelayDeprecatedFieldsNameEnum: {
  39 + USE_METADATA_PERIOD_IN_SECONDS_PATTERNS: 'Use period in seconds pattern',
  40 + PERIOD_IN_SECONDS: 'Period in seconds',
  41 + PERIOD_IN_SECONDS_PATTERN: 'Period in seconds pattern',
  42 + MAX_PENDING_MSGS: 'Maximum pending messages',
  43 + },
  44 + DeleteRelationFieldsNameEnum: {
  45 + DELETE_FOR_SINGLE_ENTITY: 'Delete relation to specific entity',
  46 + DIRECTION: 'Direction',
  47 + ENTITY_TYPE: 'Type',
  48 + ENTITY_NAME_PATTERN: 'Name pattern',
  49 + RELATION_TYPE: 'Relation type pattern',
  50 + ENTITY_CACHE_EXPIRATION: 'Entities cache expiration time(sec)',
  51 + },
  52 + DeviceProfileFieldsNameEnum: {
  53 + PERSIST_ALARM_RULES_STATE: 'Persist state of alarm rules',
  54 + FETCH_ALARM_RULES_STATE_ON_START: 'Fetch state of alarm rules',
  55 + },
  56 + GeneratorFieldsNameEnum: {
  57 + MSG_COUNT: 'Message count(0 - unlimited)',
  58 + PERIOD_IN_SECONDS: 'Period in seconds',
  59 + JS_SCRIPT: 'Generate',
  60 + // ORIGINATOR_ID = '资产',
  61 + ORIGINATOR_TYPE: 'Type',
  62 + },
  63 + GpsGeofencingEventsFieldsNameEnum: {
  64 + LATITUDE_KEY_NAME: 'Latitude key name',
  65 + LONGITUDE_KEY_NAME: 'longitude key name',
  66 + PERIMETER_TYPE: 'Perimeter type',
  67 + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA: 'Fetch perimeter information from message metadata',
  68 + PERIMETER_KEY_NAME: 'Perimeter key name',
  69 + CENTER_LATITUDE: 'Center Latitude',
  70 + CENTER_LONGITUDE: 'Center Longitude',
  71 + RANGE: 'Range',
  72 + RANGE_UNIT: 'Range units',
  73 + POLYGONS_DEFINITION: 'Polygon definition',
  74 + MIN_INSIDE_DURATION: 'Minimal inside duration',
  75 + MIN_INSIDE_DURATION_TIME_UNIT: 'Minimal inside duration time unit',
  76 + MIN_OUTSIDE_DURATION: 'Minimal outside duration',
  77 + MIN_OUTSIDE_DURATION_TIME_UNIT: 'Minimal outside duration time unit',
  78 + },
  79 + LogFieldsNameEnum: {
  80 + JS_SCRIPT: 'To string',
  81 + },
  82 + MessageCountFieldsNameEnum: {
  83 + INTERVAL: 'Interval in seconds',
  84 + TELEMETRY_PREFIX: 'Output timeseries key prefix',
  85 + },
  86 + PushToEdgeFieldsNameEnum: {
  87 + SCOPE: 'Device Attribute Range',
  88 + },
  89 + RpcCallReplyFieldsNameEnum: {
  90 + REQUEST_ID_META_DATA_ATTRIBUTE: 'Request Id Metadata attribute name',
  91 + },
  92 + RpcCallRequestFieldsNameEnum: {
  93 + TIMEOUT_IN_SECONDS: 'Timeout in seconds',
  94 + },
  95 + SaveAttributesFieldsNameEnum: {
  96 + NOTIFY_DEVICE: 'Notify Device',
  97 + SCOPE: 'Device Attribute Range',
  98 + },
  99 + SaveEventFieldsNameEnum: {
  100 + CONFIGURATION: 'configuration',
  101 + },
  102 + SaveTimeseriesFieldsNameEnum: {
  103 + DEFAULT_TTL: 'Default TTL in seconds',
  104 + SKIP_LATEST_PERSISTENCE: 'Skit latest persistence',
  105 + USE_SERVER_TS: 'Use server ts',
  106 + },
  107 + SaveToCustomTableFieldsNameEnum: {
  108 + FIELDS_MAPPING: 'Fields mapping',
  109 + TABLE_NAME: 'Custom table name',
  110 + },
  111 + UnassignFromCustomerFieldsNameEnum: {
  112 + CUSTOMER_NAME_PATTERN: 'Customer name pattern',
  113 + CUSTOMER_CACHE_EXPIRATION: 'Customer cache expiration time(sec)',
  114 + },
  115 +};
  1 +/**
  2 + *规则链 通用表单 英文配置文件
  3 + 目前共有1个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CommonFieldsNameEnum: {
  7 + NAME: 'Name',
  8 + DESCRIPTION: 'Description',
  9 + DEBUG_MODE: 'Debug Mode',
  10 + },
  11 +};
  1 +/**
  2 + *规则链 属性集表单 英文配置文件
  3 + 目前共有10个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CalculateDeltaFieldsNameEnum: {
  7 + INPUT_VALUE_KEY: 'Input value key',
  8 + OUTPUT_VALUE_KEY: 'Output value key',
  9 + ROUND: 'Decimals',
  10 + USE_CACHE: 'Use cache for latest value',
  11 + TELL_FAILURE_IF_DELTA_IS_NEGATIVE: 'Tell Failure if delta is negative',
  12 + ADD_PERIOD_BETWEEN_MSGS: 'Add period between messages',
  13 + PERIOD_VALUE_KEY: 'Period value key',
  14 + },
  15 + CustomerAttributesFieldsNameEnum: {
  16 + ATTR_MAPING: 'Attributes mapping',
  17 + TELEMETRY: 'Latest telemetry',
  18 + },
  19 + CustomerDetailsFieldsNameEnum: {
  20 + DETAILS_LIST: 'Select entity details',
  21 + ADD_TO_METADATA: 'Add selected details to message metadata',
  22 + },
  23 + OriginatorAttributesNameEnum: {
  24 + TELL_FAILURE_IF_ABSENT: 'Tell Failure',
  25 + CLIENT_ATTRIBUTE_NAMES: 'Client attributes',
  26 + SHARED_ATTRIBUTE_NAMES: 'Shared attributes',
  27 + SERVER_ATTRIBUTE_NAMES: 'Server attributes',
  28 + LATEST_TS_KEY_NAMES: 'Latest timeseries',
  29 + GET_LATEST_VALUE_WITH_TS: 'Fetch Latest telemetry with Timestamp',
  30 + },
  31 + OriginatorFieldsNameEnum: {
  32 + FIELDS_MAPPING: 'Fields mapping',
  33 + },
  34 + OriginatorTelemetryFieldsNameEnum: {
  35 + LATEST_TS_KEY_NAMES: 'Timeseries key',
  36 + AGGREGATION: 'Data aggregation function',
  37 + FETCH_MODE: 'Fetch Mode',
  38 + ORDER_BY: 'Order by',
  39 + LIMIT: 'Limit',
  40 + USE_METADATA_INTERVAL_PATTERNS: 'Use interval patterns',
  41 + START_INTERVAL: 'Start Interval',
  42 + START_INTERVAL_TIME_UNIT: 'Start Interval Time Unit',
  43 + END_INTERVAL: 'End Interval',
  44 + END_INTERVAL_TIME_UNIT: 'End Interval Time Unit',
  45 + START_INTERVAL_PATTERN: 'startIntervalPattern',
  46 + END_INTERVAL_PATTERN: 'endIntervalPattern',
  47 + },
  48 + RelatedAttributesFieldsNameEnum: {
  49 + RELATIONS_QUERY: 'Relations query',
  50 + ATTR_MAPPING: 'Attributes mapping',
  51 + TELEMETRY: 'Latest telemetry',
  52 + },
  53 + RelatedDeviceAttributeFieldsNameEnum: {
  54 + DEVICE_RELATIONS_QUERY: 'DeviceRelationsQuery',
  55 + TELL_FAILURE_IF_ABSENT: 'Tell Failure',
  56 + CLIENT_ATTRIBUTE_NAMES: 'Client attributes',
  57 + SHARED_ATTRIBUTE_NAMES: 'Shared attributes',
  58 + SERVER_ATTRIBUTE_NAMES: 'Server attributes',
  59 + LATEST_TS_KEY_NAMES: 'Latest timeseries',
  60 + GET_LATEST_VALUE_WITH_TS: 'Fetch Latest telemetry with Timestamp',
  61 + FETCH_LAST_LEVEL_ONLY: 'Obtain only the last level of association',
  62 + // DEVICE_RELATIONS_QUERY
  63 + DIRECTION: 'Direction',
  64 + MAX_LEVEL: 'Max relation level',
  65 + RELATION_TYPE: 'Association type',
  66 + DEVICE_TYPES: 'Device Type',
  67 + },
  68 + TenantAttributesFieldsNameEnum: {
  69 + ATTR_MAPING: 'attrMapping',
  70 + TELEMETRY: 'Latest telemetry',
  71 + },
  72 + TenantDetailsFieldsNameEnum: {
  73 + DETAILS_LIST: 'Add selected details to message metadata',
  74 + ADD_TO_METADATA: 'Select entity details',
  75 + },
  76 +};
  1 +/**
  2 + *规则链 外部的 英文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + AlarmNoticeFieldsNameEnum: {
  7 + CONFIGURATION: 'configuration',
  8 + },
  9 + AwsSnsFieldsNameEnum: {
  10 + TOPIC_ARN_PATTERN: 'Topic ARN pattern',
  11 + ACCESS_KEY_ID: 'AWS Access Key ID',
  12 + SECRET_ACCESS_KEY: 'AWS Secret Access Key',
  13 + REGION: 'AWS Region',
  14 + },
  15 + AwsSqsFieldsNameEnum: {
  16 + QUEUE_TYPE: 'Queue type',
  17 + QUEUE_URL_PATTERN: 'Queue URL pattern',
  18 + DELAY_SECONDS: 'Delay(seconds)',
  19 + MESSAGE_ATTRIBUTES: 'Message attributes',
  20 + ACCESS_KEY_ID: 'AWS Access Key ID',
  21 + SECRET_ACCESS_KEY: 'AWS Secret Access Key',
  22 + REGION: 'AWS Region',
  23 + },
  24 + AzureIotHubFieldsNameEnum: {
  25 + TOPIC_PATTERN: 'Topic',
  26 + HOST: 'Hostname',
  27 + PORT: 'port',
  28 + CONNECT_TIMEOUT_SEC: 'connectTimeoutSec',
  29 + CLIENT_ID: 'Device ID',
  30 + CLEAN_SESSION: 'cleanSession',
  31 + SSL: 'ssl',
  32 + CREDENTIALS: 'credentials',
  33 + TYPE: 'Credentials type',
  34 + SAS_KEY: 'sasKey',
  35 + CA_CERT: 'CA certificate file',
  36 + CA_CERT_FILE_NAME: 'caCertFileName',
  37 + PRIVATE_KEY: 'Client private key file',
  38 + PRIVATE_KEY_FILE_NAME: 'privateKeyFileName',
  39 + CERT: 'Client certificate file',
  40 + CERT_FILE_NAME: 'certFileName',
  41 + PASSWORD: 'Private key password',
  42 + },
  43 + GcpPubsubFieldsNameEnum: {
  44 + PROJECT_ID: 'GCP project ID',
  45 + TOPIC_NAME: 'Topic name',
  46 + SERVICE_ACCOUNT_KEY: 'GCP service account key file',
  47 + SERVICE_ACCOUNT_KEY_FILE_NAME: 'serviceAccountKeyFileName',
  48 + MESSAGE_ATTRIBUTES: 'Message attributes',
  49 + },
  50 + KafkaFieldsNameEnum: {
  51 + TOPIC_PATTERN: 'Topic pattern',
  52 + BOOTSTRAP_SERVERS: 'Bootstrap servers',
  53 + RETRIES: 'Automatically retry times if fails',
  54 + BATCH_SIZE: 'Produces batch size in bytes',
  55 + LINGER: 'Time to buffer locally(ms)',
  56 + BUFFER_MEMORY: 'Client buffer max size in bytes',
  57 + ACKS: 'Number of acknowledgments',
  58 + KEY_SERIALIZER: 'Key serializer',
  59 + VALUE_SERIALIZER: 'Value serializer',
  60 + OTHER_PROPERTIES: 'Other properties',
  61 + ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS:
  62 + 'Add Message metadata key-value pairs to Kafka record headers',
  63 + KAFKA_HEADERS_CHARSET: 'Charset encoding',
  64 + },
  65 + MqttFieldsNameEnum: {
  66 + TOPIC_PATTERN: 'Topic pattern',
  67 + HOST: 'Host',
  68 + PORT: 'Port',
  69 + CONNECT_TIMEOUT_SEC: 'Connection timeout(sec)',
  70 + CLIENT_ID: 'Client ID',
  71 + APPEND_CLIENT_ID_SUFFIX: 'Add Service ID as suffix to Client ID',
  72 + CLEAN_SESSION: 'Clean session',
  73 + SSL: 'Enable SSL',
  74 + CREDENTIALS: 'credentials',
  75 +
  76 + TYPE: 'Credentials type',
  77 + PASSWORD: 'Password',
  78 + CA_CERT: 'Server CA certificate file',
  79 + CA_CERT_FILE_NAME: 'caCertFileName',
  80 + PRIVATE_KEY: 'Client private key file',
  81 + PRIVATE_KEY_FILE_NAME: 'privateKeyFileName',
  82 + CERT: 'Client certificate file',
  83 + CERT_FILE_NAME: 'certFileName',
  84 + USERNAME: 'Username',
  85 + },
  86 + RabbitmqFieldsNameEnum: {
  87 + EXCHANGE_NAME_PATTERN: 'Exchange name pattern',
  88 + ROUTING_KEY_PATTERN: 'Routing key pattern',
  89 + MESSAGE_PROPERTIES: 'Message properties',
  90 + HOST: 'Host',
  91 + PORT: 'Port',
  92 + VIRTUAL_HOST: 'Virtual host',
  93 + USERNAME: 'Username',
  94 + PASSWORD: 'Password',
  95 + AUTOMATIC_RECOVERY_ENABLED: 'Automatic recovery',
  96 + CONNECTION_TIMEOUT: 'Connection timeout(ms)',
  97 + HANDSHAKE_TIMEOUT: 'Handshake timeout(ms)',
  98 + CLIENT_PROPERTIES: 'Client properties',
  99 + },
  100 + RestApiCallFieldsNameEnum: {
  101 + REST_ENDPOINT_URL_PATTERN: 'Endpoint URL pattern',
  102 + REQUEST_METHOD: 'Request method',
  103 + USE_SIMPLE_CLIENT_HTTP_FACTORY: 'Use simple client HTTP factory',
  104 + IGNORE_REQUEST_BODY: 'Without request body',
  105 + ENABLE_PROXY: 'Enable proxy',
  106 + USE_SYSTEM_PROXY_PROPERTIES: 'Use system proxy properties',
  107 + PROXY_SCHEME: 'Proxy scheme',
  108 + PROXY_HOST: 'Proxy host',
  109 + PROXY_PORT: 'Proxy port',
  110 + PROXY_USER: 'Proxy user',
  111 + PROXY_PASSWORD: 'Proxy password',
  112 + READ_TIMEOUT_MS: 'Read timeout in millis',
  113 + MAX_PARALLEL_REQUESTS_COUNT: 'Max number of parallel request',
  114 + HEADERS: 'Header',
  115 + USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE: 'Use redis queue for message persistence',
  116 + TRIM_QUEUE: 'Trim redis queue',
  117 + MAX_QUEUE_SIZE: 'Redis queue max size',
  118 + CREDENTIALS: 'Credentials',
  119 +
  120 + TYPE: 'Credentials type',
  121 + PASSWORD: 'Password',
  122 + CA_CERT: 'Server CA certificate file',
  123 + CA_CERT_FILE_NAME: 'caCertFileName',
  124 + PRIVATE_KEY: 'Client private key file',
  125 + PRIVATE_KEY_FILE_NAME: 'privateKeyFileName',
  126 + CERT: 'Client certificate file',
  127 + CERT_FILE_NAME: 'certFileName',
  128 + USERNAME: 'Username',
  129 + },
  130 + SendEmailFieldsNameEnum: {
  131 + USE_SYSTEM_SMTP_SETTINGS: 'Use system SMTP settings',
  132 + SMTP_PROTOCOL: 'Protocol',
  133 + SMTP_HOST: 'SMTP host',
  134 + SMTP_PORT: 'SMTP port',
  135 + TIMEOUT: 'Timeout ms',
  136 + ENABLE_TLS: 'Enable TLS',
  137 + TLS_VERSION: 'TLS version',
  138 + ENABLE_PROXY: 'Enable proxy',
  139 + PROXY_HOST: 'Proxy host',
  140 + PROXY_PORT: 'Proxy port',
  141 + PROXY_USER: 'Proxy user',
  142 + PROXY_PASSWORD: 'Proxy password',
  143 + USERNAME: 'Username',
  144 + PASSWORD: 'Password',
  145 + },
  146 + SendSMSFieldsNameEnum: {
  147 + NUMBERS_TO_TEMPLATE: 'Phone Numbers To Template',
  148 + SMS_MESSAGE_TEMPLATE: 'SMS message Template',
  149 + USE_SYSTEM_SMS_SETTINGS: 'User system SMS provider settings',
  150 + SMS_PROVIDER_CONFIGURATION: 'smsProviderConfiguration',
  151 +
  152 + ACCESS_KEY_ID: 'AWS Access Key ID',
  153 + SECRET_ACCESS_KEY: 'AWS Access Key',
  154 + REGION: 'AWS Area',
  155 + TYPE: 'SMS Service provider type',
  156 + NUMBER_FROM: "Sender's phone number",
  157 + ACCOUNT_SID: 'Twilio Account SID',
  158 + ACCOUNT_TOKEN: 'Twilio Account Token',
  159 + },
  160 +};
  1 +/**
  2 + *规则链 筛选器表单 英文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CheckAlarmStatusFieldNameEnum: {
  7 + ALARM_STATUS_LIST: 'Alarm status filter',
  8 + },
  9 + CheckExistenceFieldsNameEnum: {
  10 + MESSAGE_NAMES: 'Message data',
  11 + METADATA_NAMES: 'Message metadata',
  12 + CHECK_ALL_KEYS: 'Check that all selected keys are present',
  13 + },
  14 + CheckRelationFieldsNameEnum: {
  15 + DIRECTION: 'Direction',
  16 + CHECK_FOR_SINGLE_ENTITY: 'Check relation to specific entity',
  17 + ENTITY_TYPE: 'Type',
  18 + RELEATION_TYPE: 'Association type',
  19 + },
  20 + GpsGeofencingFilterFieldsNameEnum: {
  21 + LATITUDE_KEY_NAME: 'Latitude Key Name',
  22 + LONGITUDE_KEY_NAME: 'Longitude Key Name',
  23 + PERIMETER_TYPE: 'Perimeter Type',
  24 + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA: 'Fetch perimeter information from message metadata',
  25 + CENTER_LATITUDE: 'Center latitude',
  26 + CENTER_LONGITUDE: 'Center longitude',
  27 + RANGE: 'Range',
  28 + RANGE_UNIT: 'Range unit',
  29 + PERIMETER_KEY_NAME: 'Perimeter key name',
  30 + POLYGONS_DEFINITION: 'Polygons definition',
  31 + },
  32 + MessageTypeFieldsNameEnum: {
  33 + MESSAGE_TYPES: 'Message Types Filter',
  34 + },
  35 + OriginatorTypeFieldsNameEnum: {
  36 + ORIGINATOR_TYPES: 'Originator types filter',
  37 + },
  38 + ScriptFieldsNameEnum: {
  39 + JS_SCRIPT: 'Filter',
  40 + },
  41 + SwitchFieldsNameEnum: {
  42 + JS_SCRIPT: 'Filter',
  43 + },
  44 +};
  1 +/**
  2 + *规则链 Flow 英文配置文件
  3 + 目前共有4个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CheckPointFieldsNameEnum: {
  7 + QUEUE_NAME: 'Queue name',
  8 + },
  9 + RuleChainFieldsNameEnum: {
  10 + RULE_CHAIN_ID: 'Rule chain',
  11 + },
  12 +};
  1 +/**
  2 + *规则链 变换 英文配置文件
  3 + 目前共有3个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + ChangeOriginatorFieldsNameEnum: {
  7 + ORIGINATOR_SOURCE: 'Originator source',
  8 + RELATIONS_QUERY: 'Relations Query',
  9 + },
  10 + ScriptFieldsNameEnum: {
  11 + JS_SCRIPT: 'Transform',
  12 + },
  13 + ToEmailFieldsNameEnum: {
  14 + FROM_TEMPLATE: 'From Template',
  15 + TO_TEMPLATE: 'To Template',
  16 + CC_TEMPLATE: 'Cc Template',
  17 + BCC_TEMPLATE: 'Bcc Template',
  18 + SUBJECT_TEMPLATE: 'Subject Template',
  19 + MAIL_BODY_TYPE: 'Mail body type',
  20 + IS_HTML_TEMPLATE: 'Dynamic mail body type',
  21 + BODY_TEMPLATE: 'Body Template',
  22 + },
  23 +};
  1 +/**
  2 + *规则链 动作 中文配置文件
  3 + 目前共有22个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: '动作',
  7 + description: '执行特别动作',
  8 + assignToCustomer: {
  9 + name: '分配给客户',
  10 + details: `按客户名称模式查找目标客户,然后将发起者实体分配给该客户。如果不存在将创建新客户,并且【如果不存在则创建新客户]设置为true。`,
  11 + description: '将消息发起人实体分配给客户',
  12 + },
  13 + clearAlarm: {
  14 + name: '清除告警',
  15 + details: `详情-基于传入消息创建JSON对象的JS函数。该对象将被添加到Alarm.details字段中。节点输出:如果告警未被清除,则返回原始消息。否则,返回类型为【告警】新消息【msg】属性和【metadata】中的告警对象将包含【isClearedAlarm】属性。可以通过【msg】属性访问消息负载。例如'temperature='+msg.temperature。也可以通过【metadata】属性访问消息元数据。例如'name='+metadata.customerName。`,
  16 + description: '清除告警',
  17 + },
  18 + copyToView: {
  19 + name: '复制到视图',
  20 + details: `根据实体视图配置,将属性从资产/设备复制到相关的实体视图。复制将仅针对开始日期和结束日期之间的属性,并根据属性键进行配置。将消息发起者更改为相关的实体视图,并根据更新的实体视图的计数生成新消息。`,
  21 + description: '将属性从资产/设备复制到实体视图,并将消息发起者更改为相关实体视图。',
  22 + },
  23 + createAlarm: {
  24 + name: '创建告警',
  25 + details: `详情-基于传入消息创建JSON对象的JS函数。该对象将被添加到Alarm.details字段中。节点输出:如果告警未被创建,则返回原始消息。否则,返回类型为【告警】的新消息,【msg】属性和【metadata】中的告警对象将包含其中一个属性【isNewAlarm/isExistingAlarm】。可以通过【msg】属性访问消息负载。例如'temperature='+msg.temperature。可以通过【metadata】属性访问消息元数据。例如'name='+metadata.customerName。`,
  26 + description: '创建或更新告警。',
  27 + },
  28 + createRelation: {
  29 + name: '创建关联关系',
  30 + details: `如果关系已存在或已成功创建;通过Success链发送消息,否则将使用Failure链路。`,
  31 + description: `按实体名称模式和(资产、设备的实体类型模式)查找目标实体,然后按类型和方向创建与发起人实体的关系。如果所选实体类型:资产、设备或客户将创建新实体(如果不存在),并选中【创建新实体】;如果从邮件发起人到所选实体的关系不存在,并且选中【删除当前关系】,则在创建新关系之前,将删除按类型和方向与邮件发起人的所有现有关系;如果创建了从邮件发件人到所选实体的关系,并且选中了【将发件人更改为相关实体】,则出站邮件将作为来自该实体的邮件进行处理。`,
  32 + },
  33 + deleteRelation: {
  34 + name: '删除关联关系',
  35 + details: `如果成功删除关系;通过则走Success链发送消息,否则将使用Failure链。`,
  36 + description: `如果“删除单个实体”设置为true,则按实体名称模式查找目标实体,然后按类型和方向删除与发起者实体的关系,否则规则节点将按类型和顺序,删除与消息发起人的所有关系。`,
  37 + },
  38 + delay: {
  39 + name: '延迟(已弃用)',
  40 + details: `为消息传输配置一段时间的延迟。请注意,此节点确认当前队列中的消息(消息将从队列中删除)。不推荐,因为已确认的消息仍保留在内存中(待延迟),并且即使选择了【重试失败和超时】处理策略,也不能保证消息得到处理。`,
  41 + description: `延迟传入消息(已弃用)`,
  42 + },
  43 + deviceProfile: {
  44 + name: '设备配置',
  45 + details: `根据设备配置文件中定义的告警规则,创建和清除报警。输出关联类型为【告警创建】、【告警更新】、【告警严重性更新】和【告警已清除】,如果没有告警受到影响,则仅为【成功】。`,
  46 + description: `根据设备配置文件处理设备消息。`,
  47 + },
  48 + generator: {
  49 + name: '生成器',
  50 + details: `生成具有可配置周期的消息。用于生成消息的Javascript函数。`,
  51 + description: `定期生成消息。`,
  52 + },
  53 + gpsGeofencingEvents: {
  54 + name: 'GPS地理围栏事件',
  55 + details: `从传入消息中提取纬度和经度参数,并根据配置参数返回不同的事件。`,
  56 + description: `使用基于GPS的地理围栏生成传入消息。`,
  57 + },
  58 + log: {
  59 + name: '日志',
  60 + details: `将配置JS函数的传入Message转换为String,并将最终值记录到平台日志文件中。可以通过msg属性访问消息负载。例如temperature= +msg.temperature。可以通过metadata属性访问消息元数据。例如name= +metadata.customerName。`,
  61 + description: `使用JS脚本记录传入消息,将Message转换为String。`,
  62 + },
  63 + messageCount: {
  64 + name: '消息计数',
  65 + details: `对指定间隔内的传入消息进行计数,并生成具有消息计数的POST_ELEMETRY_REQUEST消息。`,
  66 + description: `统计传入消息。`,
  67 + },
  68 + pushToEdge: {
  69 + name: '推送消息到边缘端',
  70 + details: `将消息从云端推送到边缘。消息发起者必须分配给指定边缘,或者消息发起方是边缘实体本身。此节点仅在云实例上用于将消息从云推送到边缘。一旦消息到达该节点,它将被转换为边缘事件并保存到数据库中。节点不直接将消息推送到边缘,而是将事件存储在边缘队列中;支持下一个发起方类型:DEVICE/ASSET/ENTITY_VIEW/DASHBOARD/TENANT/CUSTOMER/EDGE;节点也支持下一条消息类型:POST_ELEMETRY_REQUEST/POST_ATTRIBUTES_REQUEST/ATTRIBUTES_UPDATED/ATTRIBUTES_DELETED/ALARM;如果节点无法将边缘事件保存到数据库或到达了不受支持的发起者类型/消息类型,则消息将通过Failure进行路由。在成功存储边缘事件到数据库的情况下,消息将通过Success进行路由。`,
  71 + description: `将消息从云端推送到边缘端。`,
  72 + },
  73 + rpcCallReply: {
  74 + name: 'rpc请求回复',
  75 + details: `应为任何消息类型的消息。将消息正文转发到设备。`,
  76 + description: `从设备发送对RPC调用的答复。`,
  77 + },
  78 + rpcCallRequest: {
  79 + name: 'RPC调用请求',
  80 + details: `带有method和params的消息,将响应从设备转发到下一个节点。如果RPC调用请求是由用户的REST API调用发起的,则会立即将响应转发给用户。`,
  81 + description: `将RPC调用发送到设备。`,
  82 + },
  83 + saveAttributes: {
  84 + name: '保存属性',
  85 + details: `根据可配置的作用域参数保存实体属性。消息类型为POST_ATTRIBUTES_REQUEST的消息`,
  86 + description: `保存属性数据。`,
  87 + },
  88 + saveEvent: {
  89 + name: '保存事件',
  90 + details: `保存实体事件,消息类型为POST_EVENT_REQUEST的消息。`,
  91 + description: `保存设备事件数据。`,
  92 + },
  93 + saveTimeseries: {
  94 + name: '保存时序数据',
  95 + details: `根据可配置的TTL参数保存时序遥测数据,消息类型为POST_TELEMETRY_REQUEST的消息。时间戳(以毫秒为单位)将取自元数据时间戳,否则将应用现在消息时间戳,如果skipLatestPersistence设置为true,则允许停止更新最新ts_kv表中传入键的值。启用【useServerTs】参数以使用消息处理的时间戳,而不是消息中的时间戳。如果合并的消息来自多种类型(设备、资产等)的消息,则对各种顺序处理都很有用。在顺序处理的情况下,平台保证消息按照提交到队列的顺序进行处理。然而,由多个设备/服务器发起的消息的时间戳可能早在它们被推送到队列之前就不同步了。如果新记录的时间戳比以前的记录旧,则DB层具有某些优化,可以忽略“属性”和“最新值”表的更新。因此,为了确保所有消息都得到正确处理,应该为顺序消息处理场景启用此参数。`,
  96 + description: `保存时序数据。`,
  97 + },
  98 + saveToCustomTable: {
  99 + name: '保存到自定义表',
  100 + details: `管理员应设置不带前缀的自定义表名:【cs_tb_】,管理员可以配置消息字段名称和Table列名称之间的映射;注意:如果映射键为【$entity_id】;由消息发起人标识,然后到适当的列名(映射值)将写入消息发起人id。如果指定的消息字段不存在或不是标准JSON,出站消息将通过failure链路;否则,消息将通过success链进行。`,
  101 + description: `节点将来自Cassandra数据库的传入Message有效负载的数据,存储到预定义的自定义表中,该表应以cs_tb_为前缀,以避免数据插入到公共tb表中。注意:规则节点只能用于Cassandra DB。`,
  102 + },
  103 + synchronizationEnd: {
  104 + name: '同步结束',
  105 + details: ``,
  106 + description: `此节点现在已弃用。请改用“检查数据点”。`,
  107 + },
  108 + synchronizationStart: {
  109 + name: '同步启动',
  110 + details: `此节点应与“同步结束”节点一起使用。此节点将根据消息发起方id将消息放入队列。在上一条消息处理完成或发生超时事件之前,不会处理后续消息。每个发起方的队列大小和超时值可在系统级别进行配置。`,
  111 + description: `此节点现在已弃用。请改用【检查数据点】。`,
  112 + },
  113 + unassigFromCustomer: {
  114 + name: '从客户取消分配',
  115 + details: `按客户端名称模式查找目标实体客户,然后取消分配该客户的发起者实体。.`,
  116 + description: `从客户取消分配消息发起者实体。`,
  117 + },
  118 +};
  1 +/**
  2 + *规则链 属性集 中文配置文件
  3 + 目前共有10个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: '属性集',
  7 + description: '向消息元数据中添加附加信息',
  8 + calculateDelta: {
  9 + name: '计算增量',
  10 + details: `该节点可以在规则中获取上一次遥测的值,以此可以实现二次遥测的差。比如一个设备,一天上传一次数据,如果你要对比今天和昨天的数据,并将两者数据差保存到数据库,就能够使用该节点。增量计算是在消息发起者的范围内完成的,例如设备、资产或客户。如果有输入键,则输出关系将为“成功”,除非增量为负并且设置了相应的配置参数。如果传入消息中没有输入值键,则输出关系将为“其他”。`,
  11 + description: `根据传入值和上一个值计算增量值并将其添加到消息中。`,
  12 + },
  13 + customerAttributes: {
  14 + name: '客户端属性',
  15 + details: `如果已配置属性,则会将服务器范围属性添加到消息元数据中。如果配置了'最新遥测',则将最新遥测添加到元数据中。要访问其他节点中的这些属性,可以使用metadata.temperature访问。`,
  16 + description: `将发起者客户端属性或最新遥测添加到消息元数据中。`,
  17 + },
  18 + customerDetails: {
  19 + name: '客户详情',
  20 + details: `如果选中:【将选定的详细信息添加到消息元数据】,则现有字段将添加到消息元数据,而不是消息数据。注意:只允许设备、资产和实体视图类型;如果消息的原始发件人未分配给客户或者不支持原始发件人类型的消息将转发到失败链路,否则将使用成功链路。`,
  21 + description: `将“客户详细信息”中的字段添加到消息正文或元数据中。`,
  22 + },
  23 + originatorAttributes: {
  24 + name: '发起者属性',
  25 + details: `如果配置了单个/多个属性,客户端属性/共享属性/服务器属性将添加到具有特定前缀的消息元数据中:cs/SHARED/ss。添加到元数据中的最新遥测值,不带前缀。要访问其他节点中的这些属性,可以使用metadata.cs_temperature或metadata.shared_limit。`,
  26 + description: `将消息发起者的属性或最新遥测添加到消息元数据中。`,
  27 + },
  28 + originatorFields: {
  29 + name: '发起者字段',
  30 + details: `将获取映射中指定的字段值。如果指定的字段不是原始发件人字段的一部分,它将被忽略。`,
  31 + description: '将消息发起人字段值添加到消息元数据中。',
  32 + },
  33 + originatorTelemetry: {
  34 + name: '发起者遥测',
  35 + details: `该节点允许您选择提取模式:FIRST/LAST/ALL 以提取添加到消息元数据中的特定时间范围的遥测数据,而不带任何前缀。如果选择提取模式,ALL遥测将像数组一样添加到消息元数据中,其中Key为时间戳,Value是遥测的值;如果选择提取模式FIRST或LAST遥测将像不带时间戳的字符串一样添加;此外,规则节点允许您选择遥测采样顺序:ASC或DESC;聚合功能允许您通过AVG、COUNT、SUM、MIN、MAX、NONE将聚合遥测作为单个值获取;注意:提取数据放入数组中最大记录为1000条。`,
  36 + description: '将选定时间范围的消息发起人遥测添加到消息元数据中。',
  37 + },
  38 + relatedAttributes: {
  39 + name: '关联属性',
  40 + details: `使用配置的关系方向和关系类型找到相关实体;若找到多个相关实体,则只有第一个实体用于单个/多个属性,其他实体将被丢弃;如果配置了属性,则会将服务器范围属性添加到消息元数据中;如果配置了最新遥测,则将最新遥测添加到元数据中。要访问其他节点中的这些属性,可以使用metadata.temperature访问。`,
  41 + description: '将发起人相关实体属性或最新遥测添加到消息元数据中。',
  42 + },
  43 + relatedDeviceAttributes: {
  44 + name: '关联设备属性',
  45 + details: `如果配置了单个/多个属性,CLIENT/SHARED/SERVER 属性将添加到具有特定前缀的消息元数据中:cs/SHARED/ss。添加到元数据中的最新遥测值,不带前缀。要访问其他节点中的这些属性,可以使用 metadata.cs_temperature或metadata.shared_limit。`,
  46 + description: '关联设备属性将发起者关联设备属性和最新遥测值添加到消息元数据中。',
  47 + },
  48 + tenantAttributes: {
  49 + name: '租户属性',
  50 + details: `如果配置了单个/多个属性,则会将服务器范围属性添加到消息元数据中。如果配置了单个/多个“最新遥测”,则将最新遥测添加到元数据中。要访问其他节点中的这些属性,可以使用metadata.temperature。`,
  51 + description: '将发起者租户属性或最新遥测添加到消息元数据中。',
  52 + },
  53 + tenantDetails: {
  54 + name: '租户详细信息',
  55 + details: `如果选中:【将选定的详细信息添加到消息元数据】,则现有字段将添加到消息元数据而不是消息数据;注意:只允许设备、资产和实体视图类型;如果原始的消息发件人未分配给Tenant或者不支持原始发件人类型,消息将转发到失败链,否则将使用成功链路。`,
  56 + description: '将租户详细信息中的字段添加到消息正文或元数据中。',
  57 + },
  58 +};
  1 +/**
  2 + *规则链 外部的 中文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: '外部的',
  7 + description: '与外部系统交互',
  8 + alarmNotice: {
  9 + name: '告警通知',
  10 + details: `通知方式包括短信、电子邮件等。`,
  11 + description: '当设备产生告警时,通知联系人。',
  12 + },
  13 + awsSns: {
  14 + name: 'AWS SNS',
  15 + details: `将向AWS SNS主题发布消息有效载荷;出站消息将在AWS SNS的消息元数据中包含响应字段(messageId、requestId),例如requestId字段可以使用Metadata.requestId访问。`,
  16 + description: '将消息发布到AWS SNS。',
  17 + },
  18 + awsSqs: {
  19 + name: 'AWS SQS',
  20 + details: `将向AWS SQS队列发布消息有效负载和元数据属性。出站消息将在AWS SQS的消息元数据中包含响应字段(messageId、requestId、messageBodyMd5、messageAttributesMd5、sequenceNumber)。例如requestId字段可以使用Metadata.requestId访问。`,
  21 + description: '向AWS SQS发布消息。',
  22 + },
  23 + azureIotHub: {
  24 + name: 'Azure物联网中心',
  25 + details: `将消息有效负载发布到Azure物联网中心,使用QoS的条件至少一次。`,
  26 + description: '将消息发布到Azure物联网中心。',
  27 + },
  28 + gcpPubsub: {
  29 + name: 'GCP pubsub',
  30 + details: `将向Google Cloud Platform PubSub主题发布消息负载。出站消息将包含响应字段(GCP PubSub的消息元数据中的messageId字段可以通过Metadata.messageId访问)。`,
  31 + description: '将消息发布到Google Cloud PubSub。',
  32 + },
  33 + kafka: {
  34 + name: 'Kafka',
  35 + details: `将通过Kafka生产记录发送到Kafka服务器。出站消息将包含来自消息元数据中Kafka的响应字段(offset、partition和topic)。例如,partition字段可以通过metadata.partition访问。`,
  36 + description: '将消息发布到Kafka服务器。',
  37 + },
  38 + mqtt: {
  39 + name: 'MQTT',
  40 + details: `将消息有效负载发布到MQTT代理,使用QoS的条件至少一次。`,
  41 + description: '将消息发布到MQTT代理。',
  42 + },
  43 + rabbitmq: {
  44 + name: 'RabbitMQ',
  45 + details: `将向RabbitMQ队列发布消息负载。`,
  46 + description: '将消息发布到RabbitMQ。',
  47 + },
  48 + restApiCall: {
  49 + name: 'rest_api调用',
  50 + 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”。`,
  51 + description: '调用对外部REST服务器的REST_API',
  52 + },
  53 + sendEmail: {
  54 + name: '发送邮件',
  55 + details: `应为SEND_EMAIL类型的邮件。节点仅适用于使用to Email转换节点创建的消息,请使用Successful链将与to Email节点一起使用。`,
  56 + description: '通过SMTP服务器发送电子邮件。',
  57 + },
  58 + sendSms: {
  59 + name: '发送短信',
  60 + details: `将通过使用从消息元数据派生的值填充目标电话号码和短信字段来发送短信。`,
  61 + description: '通过短信提供商发送短信。',
  62 + },
  63 +};
  1 +/**
  2 + *规则链 筛选器 中文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: '筛选器',
  7 + description: '使用配置条件筛选传入消息',
  8 + checkAlarmStatus: {
  9 + name: '检测报警状态',
  10 + details: '如果警报状态与指定的状态匹配,则消息成功;如果不匹配,则消息失败。',
  11 + description: '检测报警状态',
  12 + },
  13 + checkExistenceFields: {
  14 + name: '检测字段是否存在',
  15 + details: `如果选中【检查所有选择的键是否存在】 ,就必选满足Message data中配置的字段和Message metadata中配置的字段,都必须存在才会返回true发送消息,否则返回false。
  16 + 如果未选中,Message data中配置的字段或者Message metadata中配置的字段至少有一个键存在返回true,否则返回false。`,
  17 + description: '检查消息中的字段数据和消息元数据中所选择的键是否都存在。',
  18 + },
  19 + checkRelation: {
  20 + name: '检查实体关系是否存在',
  21 + details: '如果至少存在一个关系,通过True链路发送消息,否则使用False链路。',
  22 + description: `检查关系是按类型和方向将所选实体发送给消息的发起者;如果“检查单个实体”设置为true,否则规则节点将按类型和方向检查是否存在与消息发起者的任何关系。`,
  23 + },
  24 + gpsGeofencingFilter: {
  25 + name: 'GPS地理围栏过滤器',
  26 + details: `从传入消息中提取纬度和经度参数,如果它们位于配置的周界内,则返回'True',否则返回'False'。`,
  27 + description: '通过基于GPS的地理围栏过滤传入消息。',
  28 + },
  29 + messageType: {
  30 + name: '消息类型',
  31 + details: `如果需要传入消息类型通过,则'True'链发送消息,否则使用'False'链路。`,
  32 + description: '按消息类型筛选传入消息。',
  33 + },
  34 + messageTypeSwitch: {
  35 + name: '消息类型转换',
  36 + details: `通过相应链发送消息类型为'属性上报','遥测上报','RPC请求'等的消息,否则使用其他链。`,
  37 + description: '按消息类型路由传入消息。',
  38 + },
  39 + originatorType: {
  40 + name: '发起者类型',
  41 + details: `如果预期传入消息的发起者类型,通过则True链发送消息,否则使用False链路。`,
  42 + description: '按消息发起者类型过滤传入消息。',
  43 + },
  44 + originatorTypeSwitch: {
  45 + name: '发起者类型转换',
  46 + details: `根据发起方类型(设备、资产等)将消息路由到链。`,
  47 + description: '按消息发起者类型路由传入消息。',
  48 + },
  49 + sceneReact: {
  50 + name: '场景交互',
  51 + details: `基于业务场景,实现设备的交互控制。`,
  52 + description: '基于业务场景,实现设备的交互控制。',
  53 + },
  54 + script: {
  55 + name: 'JS脚本',
  56 + details: `使用配置的JS匹配条件传入消息。如果为True,则通过True链发送消息,否则使用False链。可以通过msg属性访问消息负载。 例如 msg.temperature < 10 ;可以通过metadata属性访问消息元数据。例如metadata.customerName === 'John';可以通过msgType属性访问消息类型。`,
  57 + description: '使用JS脚本过滤传入消息。',
  58 + },
  59 + switch: {
  60 + name: '转换器',
  61 + details: `节点执行配置的JS脚本。脚本返回的消息应该路由到下一个链名称的数组。如果数组为空,则消息不会路由到下一个节点。可以通过 msg 属性访问消息负载。例如 msg.temperature < 10; 可以通过 metadata 属性访问消息元数据。例如 metadata.customerName==='John' ;可以通过 msgType属性访问消息类型。`,
  62 + description: '将传入消息路由到一个或多个输出链。',
  63 + },
  64 +};
  1 +/**
  2 + *规则链 Flow 中文配置文件
  3 + 目前共有4个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: '流动',
  7 + description: '组织消息流',
  8 + acknowledge: {
  9 + name: '确认消息',
  10 + details: `在确认之后,消息被推送到相关的规则节点。如果你不需要这条消息,接下来会发生什么,这很有用。`,
  11 + description: '确认传入消息。',
  12 + },
  13 + checkpoint: {
  14 + name: '检查数据点',
  15 + details: `成功传输后,自动确认收到消息。队列名称是可配置的。`,
  16 + description: '将消息转移到另一个队列。',
  17 + },
  18 + output: {
  19 + name: '输出',
  20 + details: `产生规则链处理的输出。输出作为相应的“输入”规则节点的输出转发给调用者规则链。输出规则节点名称对应于输出消息的关系类型,用于将消息转发给调用者规则链中的其他规则节点。`,
  21 + description: '将消息传递给呼叫者规则链。',
  22 + },
  23 + ruleChain: {
  24 + name: '规则链',
  25 + details: `允许嵌套规则链,类似于单个规则节点。传入消息被转发到指定目标规则链的输入节点。目标规则链可能会产生多个标记的输出。您可以使用输出将处理结果转发给其他规则节点。`,
  26 + description: '将消息传递到另一个规则链。',
  27 + },
  28 +};
  1 +/**
  2 + *规则链 变换 中文配置文件
  3 + 目前共有3个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + title: '变换',
  7 + description: '更改消息载体和元数据',
  8 + changeOriginator: {
  9 + name: '变更发起者',
  10 + details: `使用配置的关联方向和关联类型找到相关实体;若发现多个关联实体,则只有第一个实体被用作新的发起者,其他实体被丢弃;只有在原始发起者是Alarm实体的情况下才能找到告警联系人。`,
  11 + description: '将消息发起者更改为租户/客户/相关实体/警报发起者。',
  12 + },
  13 + script: {
  14 + name: 'JS脚本',
  15 + details: `JavaScript函数接收3个输入参数:- metadata:一条消息的元数据;- msg:一条消息的有效负载;- msgType:一条消息的类型。应返回以下结构:{ msg: new payload,<br/> metadata: new metadata,<br/>msgType: new msgType };结果对象中的所有字段都是可选的,如果没有指定,将使用原始消息中的字段。`,
  16 + description: '使用JavaScript更改消息有效负载、元数据或消息类型。',
  17 + },
  18 + toEmail: {
  19 + name: '发送到电子邮件',
  20 + details: `通过使用从元数据派生的值填充电子邮件字段,将消息转换为电子邮件内容并发送。设置SEND_EMAIL输出消息类型。`,
  21 + description: '将消息转换为电子邮件内容并发送。',
  22 + },
  23 +};
  1 +/**
  2 + *规则链 动作 中文配置文件
  3 + 目前共有22个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + AssignToCustomerFieldsNameEnum: {
  7 + CUSTOMER_NAME_PATTERN: '客户名称模式',
  8 + CREATE_CUSTOMER_IF_NOT_EXISTS: '创建新客户(如果不存在)',
  9 + CUSTOMER_CACHE_EXPIRATION: '客户缓存过期时间(秒)',
  10 + },
  11 + ClearAlarmFieldsNameEnum: {
  12 + ALARM_TYPE: '报警类型',
  13 + ALARM_DETAILS_BUILD_JS: '报警详细信息生成器',
  14 + },
  15 + CreateAlarmFieldsNameEnum: {
  16 + ALARM_DETAILS_BUILD_JS: '报警详细信息生成器',
  17 + USE_MESSAGE_ALARM_DATA: '使用消息报警数据',
  18 + OVERWRITE_ALARM_DETAILS: '覆盖报警详细信息',
  19 + ALARM_TYPE: '报警类型',
  20 + SEVERITY: '报警严重性模式',
  21 + PROPAGATE: '向相关实体传播警报',
  22 + RELATION_TYPES: '要传播的关系类型',
  23 + PROPAGATE_TO_OWNER: '向实体所有者(客户或租户)传播警报',
  24 + PROPAGATE_TO_TENANT: '向租户传播警报',
  25 + DYNAMIC_SEVERITY: '使用警报严重性模式',
  26 + },
  27 + CreateRelationFieldsNameEnum: {
  28 + DIRECTION: '方向',
  29 + ENTITY_TYPE: '类型',
  30 + ENTITY_NAME_PATTERN: '名称模式',
  31 + ENTITY_TYPE_PATTERN: '类型模式',
  32 + RELATION_TYPE: '关系类型模式',
  33 + CREATE_ENTITY_IF_NOT_EXISTS: '如果不存在,则创建新实体',
  34 + REMOVE_CURRENT_RELATIONS: '删除当前关系',
  35 + CHANGE_ORIGINATOR_TO_RELATED_ENTITY: '将发起人变更为相关实体',
  36 + ENTITY_CACHE_EXPIRATION: '实体缓存过期时间(秒)',
  37 + },
  38 + DelayDeprecatedFieldsNameEnum: {
  39 + USE_METADATA_PERIOD_IN_SECONDS_PATTERNS: '使用周期(秒)模式',
  40 + PERIOD_IN_SECONDS: '周期(秒)',
  41 + PERIOD_IN_SECONDS_PATTERN: '以秒为单位的周期模式',
  42 + MAX_PENDING_MSGS: '最大挂起邮件数',
  43 + },
  44 + DeleteRelationFieldsNameEnum: {
  45 + DELETE_FOR_SINGLE_ENTITY: '删除与特定实体的关系',
  46 + DIRECTION: '方向',
  47 + ENTITY_TYPE: '类型',
  48 + ENTITY_NAME_PATTERN: '名称模式',
  49 + RELATION_TYPE: '关系类型模式',
  50 + ENTITY_CACHE_EXPIRATION: '实体缓存过期时间(秒)',
  51 + },
  52 + DeviceProfileFieldsNameEnum: {
  53 + PERSIST_ALARM_RULES_STATE: '坚持报警规则的状态',
  54 + FETCH_ALARM_RULES_STATE_ON_START: '获取报警规则的状态',
  55 + },
  56 + GeneratorFieldsNameEnum: {
  57 + MSG_COUNT: '邮件计数(0-无限制)',
  58 + PERIOD_IN_SECONDS: '周期(秒)',
  59 + JS_SCRIPT: '产生',
  60 + // ORIGINATOR_ID = '资产',
  61 + ORIGINATOR_TYPE: '类型',
  62 + },
  63 + GpsGeofencingEventsFieldsNameEnum: {
  64 + LATITUDE_KEY_NAME: '纬度键名称',
  65 + LONGITUDE_KEY_NAME: '经度关键字名称',
  66 + PERIMETER_TYPE: '周界类型',
  67 + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA: '从消息元数据中获取周边信息',
  68 + PERIMETER_KEY_NAME: '周界密钥名称',
  69 + CENTER_LATITUDE: '中心纬度',
  70 + CENTER_LONGITUDE: '中心经度',
  71 + RANGE: '范围',
  72 + RANGE_UNIT: '量程单位',
  73 + POLYGONS_DEFINITION: '范围单位多边形定义',
  74 + MIN_INSIDE_DURATION: '最小内部持续时间',
  75 + MIN_INSIDE_DURATION_TIME_UNIT: '最小内部持续时间单位',
  76 + MIN_OUTSIDE_DURATION: '最小外部持续时间',
  77 + MIN_OUTSIDE_DURATION_TIME_UNIT: '最小外部持续时间单位',
  78 + },
  79 + LogFieldsNameEnum: {
  80 + JS_SCRIPT: '转换成字符串',
  81 + },
  82 + MessageCountFieldsNameEnum: {
  83 + INTERVAL: '间隔(秒)',
  84 + TELEMETRY_PREFIX: '输出时间序列密钥前缀',
  85 + },
  86 + PushToEdgeFieldsNameEnum: {
  87 + SCOPE: '设备属性范围',
  88 + },
  89 + RpcCallReplyFieldsNameEnum: {
  90 + REQUEST_ID_META_DATA_ATTRIBUTE: '请求Id元数据属性名称',
  91 + },
  92 + RpcCallRequestFieldsNameEnum: {
  93 + TIMEOUT_IN_SECONDS: '超时(秒)',
  94 + },
  95 + SaveAttributesFieldsNameEnum: {
  96 + NOTIFY_DEVICE: '通知设备',
  97 + SCOPE: '设备属性范围',
  98 + },
  99 + SaveEventFieldsNameEnum: {
  100 + CONFIGURATION: '配置',
  101 + },
  102 + SaveTimeseriesFieldsNameEnum: {
  103 + DEFAULT_TTL: '默认TTL(秒)',
  104 + SKIP_LATEST_PERSISTENCE: '滑雪最新坚持',
  105 + USE_SERVER_TS: '使用服务器ts',
  106 + },
  107 + SaveToCustomTableFieldsNameEnum: {
  108 + FIELDS_MAPPING: '字段映射',
  109 + TABLE_NAME: '自定义表名称',
  110 + },
  111 + UnassignFromCustomerFieldsNameEnum: {
  112 + CUSTOMER_NAME_PATTERN: '客户名称模式',
  113 + CUSTOMER_CACHE_EXPIRATION: '客户缓存过期时间(秒)',
  114 + },
  115 +};
  1 +/**
  2 + *规则链 通用表单 中文配置文件
  3 + 目前共有1个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CommonFieldsNameEnum: {
  7 + NAME: '名称',
  8 + DESCRIPTION: '说明',
  9 + DEBUG_MODE: '调试模式',
  10 + },
  11 +};
  1 +/**
  2 + *规则链 属性集表单 中文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CalculateDeltaFieldsNameEnum: {
  7 + INPUT_VALUE_KEY: '输入值键',
  8 + OUTPUT_VALUE_KEY: '输出值键',
  9 + ROUND: '小数',
  10 + USE_CACHE: '使用缓存获取最新值',
  11 + TELL_FAILURE_IF_DELTA_IS_NEGATIVE: '如果delta为负数,则告知Failure',
  12 + ADD_PERIOD_BETWEEN_MSGS: '在消息之间添加句点',
  13 + PERIOD_VALUE_KEY: '期间值键',
  14 + },
  15 + CustomerAttributesFieldsNameEnum: {
  16 + ATTR_MAPING: '属性映射',
  17 + TELEMETRY: '最新遥测',
  18 + },
  19 + CustomerDetailsFieldsNameEnum: {
  20 + DETAILS_LIST: '选择实体详细信息',
  21 + ADD_TO_METADATA: '将选定的详细信息添加到消息元数据',
  22 + },
  23 + OriginatorAttributesNameEnum: {
  24 + TELL_FAILURE_IF_ABSENT: '告知失败',
  25 + CLIENT_ATTRIBUTE_NAMES: '客户端属性',
  26 + SHARED_ATTRIBUTE_NAMES: '共享属性',
  27 + SERVER_ATTRIBUTE_NAMES: '服务器属性',
  28 + LATEST_TS_KEY_NAMES: '最新时间序列',
  29 + GET_LATEST_VALUE_WITH_TS: '获取带有时间戳的最新遥测',
  30 + },
  31 + OriginatorFieldsNameEnum: {
  32 + FIELDS_MAPPING: '字段映射',
  33 + },
  34 + OriginatorTelemetryFieldsNameEnum: {
  35 + LATEST_TS_KEY_NAMES: '时间序列键',
  36 + AGGREGATION: '数据聚合功能',
  37 + FETCH_MODE: '提取模式',
  38 + ORDER_BY: '升序',
  39 + LIMIT: '限制',
  40 + USE_METADATA_INTERVAL_PATTERNS: '使用间隔模式',
  41 + START_INTERVAL: '启动间隔',
  42 + START_INTERVAL_TIME_UNIT: '开始间隔时间单位',
  43 + END_INTERVAL: '结束间隔',
  44 + END_INTERVAL_TIME_UNIT: '结束间隔时间单位',
  45 + START_INTERVAL_PATTERN: '开始间隔模式',
  46 + END_INTERVAL_PATTERN: '结束间隔模式',
  47 + },
  48 + RelatedAttributesFieldsNameEnum: {
  49 + RELATIONS_QUERY: '关系查询',
  50 + ATTR_MAPPING: '属性映射',
  51 + TELEMETRY: '最新遥测',
  52 + },
  53 + RelatedDeviceAttributeFieldsNameEnum: {
  54 + DEVICE_RELATIONS_QUERY: '设备关系查询',
  55 + TELL_FAILURE_IF_ABSENT: '告知失败',
  56 + CLIENT_ATTRIBUTE_NAMES: '客户端属性',
  57 + SHARED_ATTRIBUTE_NAMES: '共享属性',
  58 + SERVER_ATTRIBUTE_NAMES: '服务器属性',
  59 + LATEST_TS_KEY_NAMES: '最新时间序列',
  60 + GET_LATEST_VALUE_WITH_TS: '获取带有时间戳的最新遥测',
  61 + FETCH_LAST_LEVEL_ONLY: '仅获取最后一级关联',
  62 + // DEVICE_RELATIONS_QUERY
  63 + DIRECTION: '方向',
  64 + MAX_LEVEL: '最大关系级别',
  65 + RELATION_TYPE: '关联类型',
  66 + DEVICE_TYPES: '设备类型',
  67 + },
  68 + TenantAttributesFieldsNameEnum: {
  69 + ATTR_MAPING: '属性映射',
  70 + TELEMETRY: '最新遥测',
  71 + },
  72 + TenantDetailsFieldsNameEnum: {
  73 + DETAILS_LIST: '将选定的详细信息添加到消息元数据',
  74 + ADD_TO_METADATA: '选择实体详细信息',
  75 + },
  76 +};
  1 +/**
  2 + *规则链 外部的 中文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + AlarmNoticeFieldsNameEnum: {
  7 + CONFIGURATION: '配置',
  8 + },
  9 + AwsSnsFieldsNameEnum: {
  10 + TOPIC_ARN_PATTERN: '主题ARN模式',
  11 + ACCESS_KEY_ID: 'AWS访问密钥ID',
  12 + SECRET_ACCESS_KEY: 'AWS秘密访问密钥',
  13 + REGION: 'AWS地区',
  14 + },
  15 + AwsSqsFieldsNameEnum: {
  16 + QUEUE_TYPE: '队列类型',
  17 + QUEUE_URL_PATTERN: '队列URL模式',
  18 + DELAY_SECONDS: '延迟(秒)',
  19 + MESSAGE_ATTRIBUTES: '消息属性',
  20 + ACCESS_KEY_ID: 'AWS访问密钥ID',
  21 + SECRET_ACCESS_KEY: 'AWS秘密访问密钥',
  22 + REGION: 'AWS地区',
  23 + },
  24 + AzureIotHubFieldsNameEnum: {
  25 + TOPIC_PATTERN: '话题',
  26 + HOST: '主机名',
  27 + PORT: '端口',
  28 + CONNECT_TIMEOUT_SEC: '连接超时秒',
  29 + CLIENT_ID: '设备ID',
  30 + CLEAN_SESSION: '清理会话',
  31 + SSL: '安全套接层',
  32 + CREDENTIALS: '证书',
  33 + TYPE: '证书类型',
  34 + SAS_KEY: 'sas密钥',
  35 + CA_CERT: 'CA证书文件',
  36 + CA_CERT_FILE_NAME: 'ca证书文件名',
  37 + PRIVATE_KEY: '客户端私钥文件',
  38 + PRIVATE_KEY_FILE_NAME: '私钥文件名',
  39 + CERT: '客户端证书文件',
  40 + CERT_FILE_NAME: '证书文件名',
  41 + PASSWORD: '私钥密码',
  42 + },
  43 + GcpPubsubFieldsNameEnum: {
  44 + PROJECT_ID: 'GCP项目ID',
  45 + TOPIC_NAME: '主题名称',
  46 + SERVICE_ACCOUNT_KEY: 'GCP服务帐户密钥文件',
  47 + SERVICE_ACCOUNT_KEY_FILE_NAME: '服务帐户密钥文件名',
  48 + MESSAGE_ATTRIBUTES: '消息属性',
  49 + },
  50 + KafkaFieldsNameEnum: {
  51 + TOPIC_PATTERN: '主题模式',
  52 + BOOTSTRAP_SERVERS: '引导服务器',
  53 + RETRIES: '失败时自动重试次数',
  54 + BATCH_SIZE: '生成以字节为单位的批大小',
  55 + LINGER: '本地缓冲时间(ms)',
  56 + BUFFER_MEMORY: '客户端缓冲区最大大小(字节)',
  57 + ACKS: '确认数量',
  58 + KEY_SERIALIZER: '密钥序列化程序',
  59 + VALUE_SERIALIZER: '值序列化程序',
  60 + OTHER_PROPERTIES: '其他财产',
  61 + ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS: '向Kafka记录头添加消息元数据键值对',
  62 + KAFKA_HEADERS_CHARSET: '字符集编码',
  63 + },
  64 + MqttFieldsNameEnum: {
  65 + TOPIC_PATTERN: '主题模式',
  66 + HOST: '主机',
  67 + PORT: '端口',
  68 + CONNECT_TIMEOUT_SEC: '连接超时(秒)',
  69 + CLIENT_ID: '客户端ID',
  70 + APPEND_CLIENT_ID_SUFFIX: '将服务ID作为后缀添加到客户端ID',
  71 + CLEAN_SESSION: '清洁会话',
  72 + SSL: '启用SSL',
  73 + CREDENTIALS: '凭证',
  74 +
  75 + TYPE: '凭证类型',
  76 + PASSWORD: '密码',
  77 + CA_CERT: '服务器CA证书文件',
  78 + CA_CERT_FILE_NAME: 'ca证书文件名',
  79 + PRIVATE_KEY: '客户端私钥文件',
  80 + PRIVATE_KEY_FILE_NAME: '私钥文件名',
  81 + CERT: '客户端证书文件',
  82 + CERT_FILE_NAME: '证书文件名',
  83 + USERNAME: '用户名',
  84 + },
  85 + RabbitmqFieldsNameEnum: {
  86 + EXCHANGE_NAME_PATTERN: 'Exchange名称模式',
  87 + ROUTING_KEY_PATTERN: '路由密钥模式',
  88 + MESSAGE_PROPERTIES: '消息属性',
  89 + HOST: '主机',
  90 + PORT: '端口',
  91 + VIRTUAL_HOST: '虚拟主机',
  92 + USERNAME: '用户名',
  93 + PASSWORD: '密码',
  94 + AUTOMATIC_RECOVERY_ENABLED: '自动恢复',
  95 + CONNECTION_TIMEOUT: '连接超时(秒)',
  96 + HANDSHAKE_TIMEOUT: '握手超时(ms)',
  97 + CLIENT_PROPERTIES: '客户机属性',
  98 + },
  99 + RestApiCallFieldsNameEnum: {
  100 + REST_ENDPOINT_URL_PATTERN: '端点URL模式',
  101 + REQUEST_METHOD: '请求方法',
  102 + USE_SIMPLE_CLIENT_HTTP_FACTORY: '使用简单的客户端HTTP工厂',
  103 + IGNORE_REQUEST_BODY: '无请求正文',
  104 + ENABLE_PROXY: '启用代理',
  105 + USE_SYSTEM_PROXY_PROPERTIES: '使用系统代理属性',
  106 + PROXY_SCHEME: '代理协议',
  107 + PROXY_HOST: '代理主机',
  108 + PROXY_PORT: '代理端口',
  109 + PROXY_USER: '代理用户',
  110 + PROXY_PASSWORD: '代码密码',
  111 + READ_TIMEOUT_MS: '读取超时(毫秒)',
  112 + MAX_PARALLEL_REQUESTS_COUNT: '最大并行请求数',
  113 + HEADERS: '头部',
  114 + USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE: '使用redis队列进行消息持久化',
  115 + TRIM_QUEUE: '修剪redis队列',
  116 + MAX_QUEUE_SIZE: 'Redis队列最大大小',
  117 + CREDENTIALS: '凭据',
  118 +
  119 + TYPE: '凭据类型',
  120 + PASSWORD: '密码',
  121 + CA_CERT: '服务器CA证书文件',
  122 + CA_CERT_FILE_NAME: 'ca证书文件名',
  123 + PRIVATE_KEY: '客户端私钥文件',
  124 + PRIVATE_KEY_FILE_NAME: '私钥文件名',
  125 + CERT: '客户端证书文件',
  126 + CERT_FILE_NAME: '证书文件名',
  127 + USERNAME: '用户名',
  128 + },
  129 + SendEmailFieldsNameEnum: {
  130 + USE_SYSTEM_SMTP_SETTINGS: '使用系统SMTP设置',
  131 + SMTP_PROTOCOL: '协议',
  132 + SMTP_HOST: 'SMTP主机',
  133 + SMTP_PORT: 'SMTP端口',
  134 + TIMEOUT: '超时(ms)',
  135 + ENABLE_TLS: '启用TLS',
  136 + TLS_VERSION: 'TLS 版本',
  137 + ENABLE_PROXY: '启用代理',
  138 + PROXY_HOST: '代理主机',
  139 + PROXY_PORT: '代理端口',
  140 + PROXY_USER: '代理用户',
  141 + PROXY_PASSWORD: '代理密码',
  142 + USERNAME: '用户名',
  143 + PASSWORD: '密码',
  144 + },
  145 + SendSMSFieldsNameEnum: {
  146 + NUMBERS_TO_TEMPLATE: '发送模板的电话号码',
  147 + SMS_MESSAGE_TEMPLATE: 'SMS消息模板',
  148 + USE_SYSTEM_SMS_SETTINGS: '用户系统短信提供商设置',
  149 + SMS_PROVIDER_CONFIGURATION: 'sms提供商配置',
  150 +
  151 + ACCESS_KEY_ID: 'AWS访问密钥ID',
  152 + SECRET_ACCESS_KEY: 'AWS访问密钥',
  153 + REGION: 'AWS地区',
  154 + TYPE: 'SMS服务商类型',
  155 + NUMBER_FROM: '发送方电话号码',
  156 + ACCOUNT_SID: 'Twilio账户SID',
  157 + ACCOUNT_TOKEN: 'Twilio账户令牌',
  158 + },
  159 +};
  1 +/**
  2 + *规则链 筛选器表单 中文配置文件
  3 + 目前共有11个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CheckAlarmStatusFieldNameEnum: {
  7 + ALARM_STATUS_LIST: '报警状态过滤器',
  8 + },
  9 + CheckExistenceFieldsNameEnum: {
  10 + MESSAGE_NAMES: '消息数据',
  11 + METADATA_NAMES: '消息元数据',
  12 + CHECK_ALL_KEYS: '检查所有选择的键是否都存在',
  13 + },
  14 + CheckRelationFieldsNameEnum: {
  15 + DIRECTION: '方向',
  16 + CHECK_FOR_SINGLE_ENTITY: '检查与特定实体的关系',
  17 + ENTITY_TYPE: '类型',
  18 + RELEATION_TYPE: '关联类型',
  19 + },
  20 + GpsGeofencingFilterFieldsNameEnum: {
  21 + LATITUDE_KEY_NAME: '纬度键名称',
  22 + LONGITUDE_KEY_NAME: '经度键名称',
  23 + PERIMETER_TYPE: '周长类型',
  24 + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA: '从消息元数据中获取周边信息',
  25 + CENTER_LATITUDE: '中心纬度',
  26 + CENTER_LONGITUDE: '中心经度',
  27 + RANGE: '范围',
  28 + RANGE_UNIT: '范围的单位',
  29 + PERIMETER_KEY_NAME: '周界密钥名称',
  30 + POLYGONS_DEFINITION: '多边形定义',
  31 + },
  32 + MessageTypeFieldsNameEnum: {
  33 + MESSAGE_TYPES: '消息类型筛选器',
  34 + },
  35 + OriginatorTypeFieldsNameEnum: {
  36 + ORIGINATOR_TYPES: '发起人类型过滤器',
  37 + },
  38 + ScriptFieldsNameEnum: {
  39 + JS_SCRIPT: '过滤器',
  40 + },
  41 + SwitchFieldsNameEnum: {
  42 + JS_SCRIPT: '过滤器',
  43 + },
  44 +};
  1 +/**
  2 + *规则链 Flow 中文配置文件
  3 + 目前共有4个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + CheckPointFieldsNameEnum: {
  7 + QUEUE_NAME: '队列名称',
  8 + },
  9 + RuleChainFieldsNameEnum: {
  10 + RULE_CHAIN_ID: '规则链',
  11 + },
  12 +};
  1 +/**
  2 + *规则链 变换 中文配置文件
  3 + 目前共有3个,分类按名称进行配置
  4 + */
  5 +export default {
  6 + ChangeOriginatorFieldsNameEnum: {
  7 + ORIGINATOR_SOURCE: '发起人来源',
  8 + RELATIONS_QUERY: '关系查询',
  9 + },
  10 + ScriptFieldsNameEnum: {
  11 + JS_SCRIPT: '变换',
  12 + },
  13 + ToEmailFieldsNameEnum: {
  14 + FROM_TEMPLATE: '来自模板',
  15 + TO_TEMPLATE: '到模板',
  16 + CC_TEMPLATE: '抄送模板',
  17 + BCC_TEMPLATE: '密件抄送模板',
  18 + SUBJECT_TEMPLATE: '主题模板',
  19 + MAIL_BODY_TYPE: '邮件正文类型',
  20 + IS_HTML_TEMPLATE: '动态邮件正文类型',
  21 + BODY_TEMPLATE: '正文模板',
  22 + },
  23 +};
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 // Assign to customer 5 // Assign to customer
2 export enum AssignToCustomerFieldsEnum { 6 export enum AssignToCustomerFieldsEnum {
3 CUSTOMER_NAME_PATTERN = 'customerNamePattern', 7 CUSTOMER_NAME_PATTERN = 'customerNamePattern',
@@ -6,9 +10,15 @@ export enum AssignToCustomerFieldsEnum { @@ -6,9 +10,15 @@ export enum AssignToCustomerFieldsEnum {
6 } 10 }
7 11
8 export enum AssignToCustomerFieldsNameEnum { 12 export enum AssignToCustomerFieldsNameEnum {
9 - CUSTOMER_NAME_PATTERN = 'Customer name pattern',  
10 - CREATE_CUSTOMER_IF_NOT_EXISTS = 'Create new customer if not exists',  
11 - CUSTOMER_CACHE_EXPIRATION = 'Customers cache expiration time(sec)', 13 + CUSTOMER_NAME_PATTERN = t(
  14 + 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN'
  15 + ),
  16 + CREATE_CUSTOMER_IF_NOT_EXISTS = t(
  17 + 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CREATE_CUSTOMER_IF_NOT_EXISTS'
  18 + ),
  19 + CUSTOMER_CACHE_EXPIRATION = t(
  20 + 'designer_form_label.actions.index.AssignToCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION'
  21 + ),
12 } 22 }
13 23
14 // clear alarm 24 // clear alarm
@@ -18,8 +28,10 @@ export enum ClearAlarmFieldsEnum { @@ -18,8 +28,10 @@ export enum ClearAlarmFieldsEnum {
18 } 28 }
19 29
20 export enum ClearAlarmFieldsNameEnum { 30 export enum ClearAlarmFieldsNameEnum {
21 - ALARM_TYPE = 'Alarm type',  
22 - ALARM_DETAILS_BUILD_JS = 'Alarm details builder', 31 + ALARM_TYPE = t('designer_form_label.actions.index.ClearAlarmFieldsNameEnum.ALARM_TYPE'),
  32 + ALARM_DETAILS_BUILD_JS = t(
  33 + 'designer_form_label.actions.index.ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS'
  34 + ),
23 } 35 }
24 36
25 // Create alarm 37 // Create alarm
@@ -37,16 +49,28 @@ export enum CreateAlarmFieldsEnum { @@ -37,16 +49,28 @@ export enum CreateAlarmFieldsEnum {
37 } 49 }
38 50
39 export enum CreateAlarmFieldsNameEnum { 51 export enum CreateAlarmFieldsNameEnum {
40 - ALARM_DETAILS_BUILD_JS = 'Alarm details builder',  
41 - USE_MESSAGE_ALARM_DATA = 'Use message alarm data',  
42 - OVERWRITE_ALARM_DETAILS = 'Overwrite alarm details',  
43 - ALARM_TYPE = 'Alarm type',  
44 - SEVERITY = 'Alarm severity pattern',  
45 - PROPAGATE = 'Propagate alarm to related entities',  
46 - RELATION_TYPES = 'Relation types to propagate',  
47 - PROPAGATE_TO_OWNER = 'Propagate alarm to entity owner (Customer or Tenant)',  
48 - PROPAGATE_TO_TENANT = 'Propagate alarm to Tenant',  
49 - DYNAMIC_SEVERITY = 'Use alarm severity pattern', 52 + ALARM_DETAILS_BUILD_JS = t(
  53 + 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS'
  54 + ),
  55 + USE_MESSAGE_ALARM_DATA = t(
  56 + 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.USE_MESSAGE_ALARM_DATA'
  57 + ),
  58 + OVERWRITE_ALARM_DETAILS = t(
  59 + 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.OVERWRITE_ALARM_DETAILS'
  60 + ),
  61 + ALARM_TYPE = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.ALARM_TYPE'),
  62 + SEVERITY = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.SEVERITY'),
  63 + PROPAGATE = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE'),
  64 + RELATION_TYPES = t('designer_form_label.actions.index.CreateAlarmFieldsNameEnum.RELATION_TYPES'),
  65 + PROPAGATE_TO_OWNER = t(
  66 + 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE_TO_OWNER'
  67 + ),
  68 + PROPAGATE_TO_TENANT = t(
  69 + 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.PROPAGATE_TO_TENANT'
  70 + ),
  71 + DYNAMIC_SEVERITY = t(
  72 + 'designer_form_label.actions.index.CreateAlarmFieldsNameEnum.DYNAMIC_SEVERITY'
  73 + ),
50 } 74 }
51 75
52 // Create relation 76 // Create relation
@@ -63,15 +87,27 @@ export enum CreateRelationFieldsEnum { @@ -63,15 +87,27 @@ export enum CreateRelationFieldsEnum {
63 } 87 }
64 88
65 export enum CreateRelationFieldsNameEnum { 89 export enum CreateRelationFieldsNameEnum {
66 - DIRECTION = '方向',  
67 - ENTITY_TYPE = '类型',  
68 - ENTITY_NAME_PATTERN = 'Name pattern',  
69 - ENTITY_TYPE_PATTERN = 'Type pattern',  
70 - RELATION_TYPE = 'Relation type pattern',  
71 - CREATE_ENTITY_IF_NOT_EXISTS = 'Create new entity if not exists',  
72 - REMOVE_CURRENT_RELATIONS = 'Remove current relations',  
73 - CHANGE_ORIGINATOR_TO_RELATED_ENTITY = 'Change originator to related entity',  
74 - ENTITY_CACHE_EXPIRATION = 'Entities cache expiration time(sec)', 90 + DIRECTION = t('designer_form_label.actions.index.CreateRelationFieldsNameEnum.DIRECTION'),
  91 + ENTITY_TYPE = t('designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_TYPE'),
  92 + ENTITY_NAME_PATTERN = t(
  93 + 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_NAME_PATTERN'
  94 + ),
  95 + ENTITY_TYPE_PATTERN = t(
  96 + 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_TYPE_PATTERN'
  97 + ),
  98 + RELATION_TYPE = t('designer_form_label.actions.index.CreateRelationFieldsNameEnum.RELATION_TYPE'),
  99 + CREATE_ENTITY_IF_NOT_EXISTS = t(
  100 + 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.CREATE_ENTITY_IF_NOT_EXISTS'
  101 + ),
  102 + REMOVE_CURRENT_RELATIONS = t(
  103 + 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.REMOVE_CURRENT_RELATIONS'
  104 + ),
  105 + CHANGE_ORIGINATOR_TO_RELATED_ENTITY = t(
  106 + 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.CHANGE_ORIGINATOR_TO_RELATED_ENTITY'
  107 + ),
  108 + ENTITY_CACHE_EXPIRATION = t(
  109 + 'designer_form_label.actions.index.CreateRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION'
  110 + ),
75 } 111 }
76 112
77 // Delay deprecated 113 // Delay deprecated
@@ -83,10 +119,18 @@ export enum DelayDeprecatedFieldsEnum { @@ -83,10 +119,18 @@ export enum DelayDeprecatedFieldsEnum {
83 } 119 }
84 120
85 export enum DelayDeprecatedFieldsNameEnum { 121 export enum DelayDeprecatedFieldsNameEnum {
86 - USE_METADATA_PERIOD_IN_SECONDS_PATTERNS = 'Use period in seconds pattern',  
87 - PERIOD_IN_SECONDS = 'Period in seconds',  
88 - PERIOD_IN_SECONDS_PATTERN = 'Period in seconds pattern',  
89 - MAX_PENDING_MSGS = 'Maximum pending messages', 122 + USE_METADATA_PERIOD_IN_SECONDS_PATTERNS = t(
  123 + 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.USE_METADATA_PERIOD_IN_SECONDS_PATTERNS'
  124 + ),
  125 + PERIOD_IN_SECONDS = t(
  126 + 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS'
  127 + ),
  128 + PERIOD_IN_SECONDS_PATTERN = t(
  129 + 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.PERIOD_IN_SECONDS_PATTERN'
  130 + ),
  131 + MAX_PENDING_MSGS = t(
  132 + 'designer_form_label.actions.index.DelayDeprecatedFieldsNameEnum.MAX_PENDING_MSGS'
  133 + ),
90 } 134 }
91 135
92 export enum DeleteRelationFieldsEnum { 136 export enum DeleteRelationFieldsEnum {
@@ -99,12 +143,18 @@ export enum DeleteRelationFieldsEnum { @@ -99,12 +143,18 @@ export enum DeleteRelationFieldsEnum {
99 } 143 }
100 144
101 export enum DeleteRelationFieldsNameEnum { 145 export enum DeleteRelationFieldsNameEnum {
102 - DELETE_FOR_SINGLE_ENTITY = 'Delete relation to specific entity',  
103 - DIRECTION = '方向',  
104 - ENTITY_TYPE = '类型',  
105 - ENTITY_NAME_PATTERN = 'Name pattern',  
106 - RELATION_TYPE = 'Relation type pattern',  
107 - ENTITY_CACHE_EXPIRATION = 'Entities cache expiration time(sec)', 146 + DELETE_FOR_SINGLE_ENTITY = t(
  147 + 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.DELETE_FOR_SINGLE_ENTITY'
  148 + ),
  149 + DIRECTION = t('designer_form_label.actions.index.DeleteRelationFieldsNameEnum.DIRECTION'),
  150 + ENTITY_TYPE = t('designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_TYPE'),
  151 + ENTITY_NAME_PATTERN = t(
  152 + 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_NAME_PATTERN'
  153 + ),
  154 + RELATION_TYPE = t('designer_form_label.actions.index.DeleteRelationFieldsNameEnum.RELATION_TYPE'),
  155 + ENTITY_CACHE_EXPIRATION = t(
  156 + 'designer_form_label.actions.index.DeleteRelationFieldsNameEnum.ENTITY_CACHE_EXPIRATION'
  157 + ),
108 } 158 }
109 159
110 // device profile 160 // device profile
@@ -114,8 +164,12 @@ export enum DeviceProfileFieldsEnum { @@ -114,8 +164,12 @@ export enum DeviceProfileFieldsEnum {
114 } 164 }
115 165
116 export enum DeviceProfileFieldsNameEnum { 166 export enum DeviceProfileFieldsNameEnum {
117 - PERSIST_ALARM_RULES_STATE = 'Persist state of alarm rules',  
118 - FETCH_ALARM_RULES_STATE_ON_START = 'Fetch state of alarm rules', 167 + PERSIST_ALARM_RULES_STATE = t(
  168 + 'designer_form_label.actions.index.DeviceProfileFieldsNameEnum.PERSIST_ALARM_RULES_STATE'
  169 + ),
  170 + FETCH_ALARM_RULES_STATE_ON_START = t(
  171 + 'designer_form_label.actions.index.DeviceProfileFieldsNameEnum.FETCH_ALARM_RULES_STATE_ON_START'
  172 + ),
119 } 173 }
120 174
121 // Generator 175 // Generator
@@ -128,11 +182,13 @@ export enum GeneratorFieldsEnum { @@ -128,11 +182,13 @@ export enum GeneratorFieldsEnum {
128 } 182 }
129 183
130 export enum GeneratorFieldsNameEnum { 184 export enum GeneratorFieldsNameEnum {
131 - MSG_COUNT = 'Message count(0 - unlimited)',  
132 - PERIOD_IN_SECONDS = 'Period in seconds',  
133 - JS_SCRIPT = 'Generate', 185 + MSG_COUNT = t('designer_form_label.actions.index.GeneratorFieldsNameEnum.MSG_COUNT'),
  186 + PERIOD_IN_SECONDS = t(
  187 + 'designer_form_label.actions.index.GeneratorFieldsNameEnum.PERIOD_IN_SECONDS'
  188 + ),
  189 + JS_SCRIPT = t('designer_form_label.actions.index.GeneratorFieldsNameEnum.JS_SCRIPT'),
134 // ORIGINATOR_ID = '资产', 190 // ORIGINATOR_ID = '资产',
135 - ORIGINATOR_TYPE = '类型', 191 + ORIGINATOR_TYPE = t('designer_form_label.actions.index.GeneratorFieldsNameEnum.ORIGINATOR_TYPE'),
136 } 192 }
137 193
138 // Gps geofencing events 194 // Gps geofencing events
@@ -154,20 +210,44 @@ export enum GpsGeofencingEventsFieldsEnum { @@ -154,20 +210,44 @@ export enum GpsGeofencingEventsFieldsEnum {
154 } 210 }
155 211
156 export enum GpsGeofencingEventsFieldsNameEnum { 212 export enum GpsGeofencingEventsFieldsNameEnum {
157 - LATITUDE_KEY_NAME = 'Latitude key name',  
158 - LONGITUDE_KEY_NAME = 'longitude key name',  
159 - PERIMETER_TYPE = 'Perimeter type',  
160 - FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = 'Fetch perimeter information from message metadata',  
161 - PERIMETER_KEY_NAME = 'Perimeter key name',  
162 - CENTER_LATITUDE = 'Center Latitude',  
163 - CENTER_LONGITUDE = 'Center Longitude',  
164 - RANGE = 'Range',  
165 - RANGE_UNIT = 'Range units',  
166 - POLYGONS_DEFINITION = 'Polygon definition',  
167 - MIN_INSIDE_DURATION = 'Minimal inside duration',  
168 - MIN_INSIDE_DURATION_TIME_UNIT = 'Minimal inside duration time unit',  
169 - MIN_OUTSIDE_DURATION = 'Minimal outside duration',  
170 - MIN_OUTSIDE_DURATION_TIME_UNIT = 'Minimal outside duration time unit', 213 + LATITUDE_KEY_NAME = t(
  214 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.LATITUDE_KEY_NAME'
  215 + ),
  216 + LONGITUDE_KEY_NAME = t(
  217 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.LONGITUDE_KEY_NAME'
  218 + ),
  219 + PERIMETER_TYPE = t(
  220 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.PERIMETER_TYPE'
  221 + ),
  222 + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = t(
  223 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA'
  224 + ),
  225 + PERIMETER_KEY_NAME = t(
  226 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.PERIMETER_KEY_NAME'
  227 + ),
  228 + CENTER_LATITUDE = t(
  229 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.CENTER_LATITUDE'
  230 + ),
  231 + CENTER_LONGITUDE = t(
  232 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.CENTER_LONGITUDE'
  233 + ),
  234 + RANGE = t('designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.RANGE'),
  235 + RANGE_UNIT = t('designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.RANGE_UNIT'),
  236 + POLYGONS_DEFINITION = t(
  237 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.POLYGONS_DEFINITION'
  238 + ),
  239 + MIN_INSIDE_DURATION = t(
  240 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION'
  241 + ),
  242 + MIN_INSIDE_DURATION_TIME_UNIT = t(
  243 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_INSIDE_DURATION_TIME_UNIT'
  244 + ),
  245 + MIN_OUTSIDE_DURATION = t(
  246 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION'
  247 + ),
  248 + MIN_OUTSIDE_DURATION_TIME_UNIT = t(
  249 + 'designer_form_label.actions.index.GpsGeofencingEventsFieldsNameEnum.MIN_OUTSIDE_DURATION_TIME_UNIT'
  250 + ),
171 } 251 }
172 252
173 // Log 253 // Log
@@ -176,7 +256,7 @@ export enum LogFieldsEnum { @@ -176,7 +256,7 @@ export enum LogFieldsEnum {
176 } 256 }
177 257
178 export enum LogFieldsNameEnum { 258 export enum LogFieldsNameEnum {
179 - JS_SCRIPT = 'To string', 259 + JS_SCRIPT = t('designer_form_label.actions.index.LogFieldsNameEnum.JS_SCRIPT'),
180 } 260 }
181 261
182 // Message Count 262 // Message Count
@@ -186,8 +266,10 @@ export enum MessageCountFieldsEnum { @@ -186,8 +266,10 @@ export enum MessageCountFieldsEnum {
186 } 266 }
187 267
188 export enum MessageCountFieldsNameEnum { 268 export enum MessageCountFieldsNameEnum {
189 - INTERVAL = 'Interval in seconds',  
190 - TELEMETRY_PREFIX = 'Output timeseries key prefix', 269 + INTERVAL = t('designer_form_label.actions.index.MessageCountFieldsNameEnum.INTERVAL'),
  270 + TELEMETRY_PREFIX = t(
  271 + 'designer_form_label.actions.index.MessageCountFieldsNameEnum.TELEMETRY_PREFIX'
  272 + ),
191 } 273 }
192 274
193 // Push to edge 275 // Push to edge
@@ -196,7 +278,7 @@ export enum PushToEdgeFieldsEnum { @@ -196,7 +278,7 @@ export enum PushToEdgeFieldsEnum {
196 } 278 }
197 279
198 export enum PushToEdgeFieldsNameEnum { 280 export enum PushToEdgeFieldsNameEnum {
199 - SCOPE = '设备属性范围', 281 + SCOPE = t('designer_form_label.actions.index.PushToEdgeFieldsNameEnum.SCOPE'),
200 } 282 }
201 // Rpc call reply 283 // Rpc call reply
202 export enum RpcCallReplyFieldsEnum { 284 export enum RpcCallReplyFieldsEnum {
@@ -204,7 +286,9 @@ export enum RpcCallReplyFieldsEnum { @@ -204,7 +286,9 @@ export enum RpcCallReplyFieldsEnum {
204 } 286 }
205 287
206 export enum RpcCallReplyFieldsNameEnum { 288 export enum RpcCallReplyFieldsNameEnum {
207 - REQUEST_ID_META_DATA_ATTRIBUTE = 'Request Id Metadata attribute name', 289 + REQUEST_ID_META_DATA_ATTRIBUTE = t(
  290 + 'designer_form_label.actions.index.RpcCallReplyFieldsNameEnum.REQUEST_ID_META_DATA_ATTRIBUTE'
  291 + ),
208 } 292 }
209 293
210 // Rpc call request 294 // Rpc call request
@@ -213,7 +297,9 @@ export enum RpcCallRequestFieldsEnum { @@ -213,7 +297,9 @@ export enum RpcCallRequestFieldsEnum {
213 } 297 }
214 298
215 export enum RpcCallRequestFieldsNameEnum { 299 export enum RpcCallRequestFieldsNameEnum {
216 - TIMEOUT_IN_SECONDS = 'Timeout in seconds', 300 + TIMEOUT_IN_SECONDS = t(
  301 + 'designer_form_label.actions.index.RpcCallRequestFieldsNameEnum.TIMEOUT_IN_SECONDS'
  302 + ),
217 } 303 }
218 304
219 // Save attribute 305 // Save attribute
@@ -223,8 +309,8 @@ export enum SaveAttributesFieldsEnum { @@ -223,8 +309,8 @@ export enum SaveAttributesFieldsEnum {
223 } 309 }
224 310
225 export enum SaveAttributesFieldsNameEnum { 311 export enum SaveAttributesFieldsNameEnum {
226 - NOTIFY_DEVICE = 'Notify Device',  
227 - SCOPE = '设备属性范围', 312 + NOTIFY_DEVICE = t('designer_form_label.actions.index.SaveAttributesFieldsNameEnum.NOTIFY_DEVICE'),
  313 + SCOPE = t('designer_form_label.actions.index.SaveAttributesFieldsNameEnum.SCOPE'),
228 } 314 }
229 315
230 // Save event 316 // Save event
@@ -233,7 +319,7 @@ export enum SaveEventFieldsEnum { @@ -233,7 +319,7 @@ export enum SaveEventFieldsEnum {
233 } 319 }
234 320
235 export enum SaveEventFieldsNameEnum { 321 export enum SaveEventFieldsNameEnum {
236 - CONFIGURATION = '配置', 322 + CONFIGURATION = t('designer_form_label.actions.index.SaveEventFieldsNameEnum.CONFIGURATION'),
237 } 323 }
238 324
239 // Save timeseries 325 // Save timeseries
@@ -244,9 +330,11 @@ export enum SaveTimeseriesFieldsEnum { @@ -244,9 +330,11 @@ export enum SaveTimeseriesFieldsEnum {
244 } 330 }
245 331
246 export enum SaveTimeseriesFieldsNameEnum { 332 export enum SaveTimeseriesFieldsNameEnum {
247 - DEFAULT_TTL = 'Default TTL in seconds',  
248 - SKIP_LATEST_PERSISTENCE = 'Skit latest persistence',  
249 - USE_SERVER_TS = 'Use server ts', 333 + DEFAULT_TTL = t('designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.DEFAULT_TTL'),
  334 + SKIP_LATEST_PERSISTENCE = t(
  335 + 'designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.SKIP_LATEST_PERSISTENCE'
  336 + ),
  337 + USE_SERVER_TS = t('designer_form_label.actions.index.SaveTimeseriesFieldsNameEnum.USE_SERVER_TS'),
250 } 338 }
251 339
252 // save to custom table 340 // save to custom table
@@ -256,8 +344,10 @@ export enum SaveToCustomTableFieldsEnum { @@ -256,8 +344,10 @@ export enum SaveToCustomTableFieldsEnum {
256 } 344 }
257 345
258 export enum SaveToCustomTableFieldsNameEnum { 346 export enum SaveToCustomTableFieldsNameEnum {
259 - FIELDS_MAPPING = 'Fields mapping',  
260 - TABLE_NAME = 'Custom table name', 347 + FIELDS_MAPPING = t(
  348 + 'designer_form_label.actions.index.SaveToCustomTableFieldsNameEnum.FIELDS_MAPPING'
  349 + ),
  350 + TABLE_NAME = t('designer_form_label.actions.index.SaveToCustomTableFieldsNameEnum.TABLE_NAME'),
261 } 351 }
262 352
263 // Unassign from customer 353 // Unassign from customer
@@ -267,6 +357,10 @@ export enum UnassignFromCustomerFieldsEnum { @@ -267,6 +357,10 @@ export enum UnassignFromCustomerFieldsEnum {
267 } 357 }
268 358
269 export enum UnassignFromCustomerFieldsNameEnum { 359 export enum UnassignFromCustomerFieldsNameEnum {
270 - CUSTOMER_NAME_PATTERN = 'Customer name pattern',  
271 - CUSTOMER_CACHE_EXPIRATION = 'Customer cache expiration time(sec)', 360 + CUSTOMER_NAME_PATTERN = t(
  361 + 'designer_form_label.actions.index.UnassignFromCustomerFieldsNameEnum.CUSTOMER_NAME_PATTERN'
  362 + ),
  363 + CUSTOMER_CACHE_EXPIRATION = t(
  364 + 'designer_form_label.actions.index.UnassignFromCustomerFieldsNameEnum.CUSTOMER_CACHE_EXPIRATION'
  365 + ),
272 } 366 }
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 export enum CommonFieldsEnum { 5 export enum CommonFieldsEnum {
2 NAME = 'name', 6 NAME = 'name',
3 DESCRIPTION = 'description', 7 DESCRIPTION = 'description',
@@ -5,9 +9,9 @@ export enum CommonFieldsEnum { @@ -5,9 +9,9 @@ export enum CommonFieldsEnum {
5 } 9 }
6 10
7 export enum CommonFieldsNameEnum { 11 export enum CommonFieldsNameEnum {
8 - NAME = '名称',  
9 - DESCRIPTION = '说明',  
10 - DEBUG_MODE = '调试模式', 12 + NAME = t('designer_form_label.common.index.CommonFieldsNameEnum.NAME'),
  13 + DESCRIPTION = t('designer_form_label.common.index.CommonFieldsNameEnum.DESCRIPTION'),
  14 + DEBUG_MODE = t('designer_form_label.common.index.CommonFieldsNameEnum.DEBUG_MODE'),
11 } 15 }
12 16
13 export const CommonFields = { ...CommonFieldsEnum }; 17 export const CommonFields = { ...CommonFieldsEnum };
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 // Enrichment Calculate delta 5 // Enrichment Calculate delta
2 export enum CalculateDeltaFieldsEnum { 6 export enum CalculateDeltaFieldsEnum {
3 INPUT_VALUE_KEY = 'inputValueKey', 7 INPUT_VALUE_KEY = 'inputValueKey',
@@ -10,13 +14,23 @@ export enum CalculateDeltaFieldsEnum { @@ -10,13 +14,23 @@ export enum CalculateDeltaFieldsEnum {
10 } 14 }
11 15
12 export enum CalculateDeltaFieldsNameEnum { 16 export enum CalculateDeltaFieldsNameEnum {
13 - INPUT_VALUE_KEY = 'Input value key',  
14 - OUTPUT_VALUE_KEY = 'Output value key',  
15 - ROUND = 'Decimals',  
16 - USE_CACHE = 'Use cache for latest value',  
17 - TELL_FAILURE_IF_DELTA_IS_NEGATIVE = 'Tell Failure if delta is negative',  
18 - ADD_PERIOD_BETWEEN_MSGS = 'Add period between messages',  
19 - PERIOD_VALUE_KEY = 'Period value key', 17 + INPUT_VALUE_KEY = t(
  18 + 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.INPUT_VALUE_KEY'
  19 + ),
  20 + OUTPUT_VALUE_KEY = t(
  21 + 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.OUTPUT_VALUE_KEY'
  22 + ),
  23 + ROUND = t('designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.ROUND'),
  24 + USE_CACHE = t('designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.USE_CACHE'),
  25 + TELL_FAILURE_IF_DELTA_IS_NEGATIVE = t(
  26 + 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.TELL_FAILURE_IF_DELTA_IS_NEGATIVE'
  27 + ),
  28 + ADD_PERIOD_BETWEEN_MSGS = t(
  29 + 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.ADD_PERIOD_BETWEEN_MSGS'
  30 + ),
  31 + PERIOD_VALUE_KEY = t(
  32 + 'designer_form_label.enrichments.index.CalculateDeltaFieldsNameEnum.PERIOD_VALUE_KEY'
  33 + ),
20 } 34 }
21 35
22 // Enrichment Customer Attributes 36 // Enrichment Customer Attributes
@@ -26,8 +40,10 @@ export enum CustomerAttributesFieldsEnum { @@ -26,8 +40,10 @@ export enum CustomerAttributesFieldsEnum {
26 } 40 }
27 41
28 export enum CustomerAttributesFieldsNameEnum { 42 export enum CustomerAttributesFieldsNameEnum {
29 - ATTR_MAPING = 'Attributes mapping',  
30 - TELEMETRY = 'Latest telemetry', 43 + ATTR_MAPING = t(
  44 + 'designer_form_label.enrichments.index.CustomerAttributesFieldsNameEnum.ATTR_MAPING'
  45 + ),
  46 + TELEMETRY = t('designer_form_label.enrichments.index.CustomerAttributesFieldsNameEnum.TELEMETRY'),
31 } 47 }
32 48
33 // Enrichment Customer details 49 // Enrichment Customer details
@@ -37,8 +53,12 @@ export enum CustomerDetailsFieldsEnum { @@ -37,8 +53,12 @@ export enum CustomerDetailsFieldsEnum {
37 } 53 }
38 54
39 export enum CustomerDetailsFieldsNameEnum { 55 export enum CustomerDetailsFieldsNameEnum {
40 - DETAILS_LIST = 'Select entity details',  
41 - ADD_TO_METADATA = 'Add selected details to message metadata', 56 + DETAILS_LIST = t(
  57 + 'designer_form_label.enrichments.index.CustomerDetailsFieldsNameEnum.DETAILS_LIST'
  58 + ),
  59 + ADD_TO_METADATA = t(
  60 + 'designer_form_label.enrichments.index.CustomerDetailsFieldsNameEnum.ADD_TO_METADATA'
  61 + ),
42 } 62 }
43 63
44 // Enrichment Originator attributes 64 // Enrichment Originator attributes
@@ -52,12 +72,24 @@ export enum OriginatorAttributesEnum { @@ -52,12 +72,24 @@ export enum OriginatorAttributesEnum {
52 } 72 }
53 73
54 export enum OriginatorAttributesNameEnum { 74 export enum OriginatorAttributesNameEnum {
55 - TELL_FAILURE_IF_ABSENT = 'Tell Failure',  
56 - CLIENT_ATTRIBUTE_NAMES = 'Client attributes',  
57 - SHARED_ATTRIBUTE_NAMES = 'Shared attributes',  
58 - SERVER_ATTRIBUTE_NAMES = 'Server attributes',  
59 - LATEST_TS_KEY_NAMES = 'Latest timeseries',  
60 - GET_LATEST_VALUE_WITH_TS = 'Fetch Latest telemetry with Timestamp', 75 + TELL_FAILURE_IF_ABSENT = t(
  76 + 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT'
  77 + ),
  78 + CLIENT_ATTRIBUTE_NAMES = t(
  79 + 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES'
  80 + ),
  81 + SHARED_ATTRIBUTE_NAMES = t(
  82 + 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES'
  83 + ),
  84 + SERVER_ATTRIBUTE_NAMES = t(
  85 + 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES'
  86 + ),
  87 + LATEST_TS_KEY_NAMES = t(
  88 + 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES'
  89 + ),
  90 + GET_LATEST_VALUE_WITH_TS = t(
  91 + 'designer_form_label.enrichments.index.OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS'
  92 + ),
61 } 93 }
62 94
63 // Enrichment Originator Fields 95 // Enrichment Originator Fields
@@ -66,7 +98,9 @@ export enum OriginatorFieldsEnum { @@ -66,7 +98,9 @@ export enum OriginatorFieldsEnum {
66 } 98 }
67 99
68 export enum OriginatorFieldsNameEnum { 100 export enum OriginatorFieldsNameEnum {
69 - FIELDS_MAPPING = 'Fields mapping', 101 + FIELDS_MAPPING = t(
  102 + 'designer_form_label.enrichments.index.OriginatorFieldsNameEnum.FIELDS_MAPPING'
  103 + ),
70 } 104 }
71 105
72 // Enrichment originator telemetry 106 // Enrichment originator telemetry
@@ -86,18 +120,38 @@ export enum OriginatorTelemetryFieldsEnum { @@ -86,18 +120,38 @@ export enum OriginatorTelemetryFieldsEnum {
86 } 120 }
87 121
88 export enum OriginatorTelemetryFieldsNameEnum { 122 export enum OriginatorTelemetryFieldsNameEnum {
89 - LATEST_TS_KEY_NAMES = 'Timeseries key',  
90 - AGGREGATION = '数据聚合功能',  
91 - FETCH_MODE = 'Fetch Mode',  
92 - ORDER_BY = 'Order by',  
93 - LIMIT = 'Limit',  
94 - USE_METADATA_INTERVAL_PATTERNS = 'Use interval patterns',  
95 - START_INTERVAL = 'Start Interval',  
96 - START_INTERVAL_TIME_UNIT = 'Start Interval Time Unit',  
97 - END_INTERVAL = 'End Interval',  
98 - END_INTERVAL_TIME_UNIT = 'End Interval Time Unit',  
99 - START_INTERVAL_PATTERN = 'startIntervalPattern',  
100 - END_INTERVAL_PATTERN = 'endIntervalPattern', 123 + LATEST_TS_KEY_NAMES = t(
  124 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.LATEST_TS_KEY_NAMES'
  125 + ),
  126 + AGGREGATION = t(
  127 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.AGGREGATION'
  128 + ),
  129 + FETCH_MODE = t(
  130 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.FETCH_MODE'
  131 + ),
  132 + ORDER_BY = t('designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.ORDER_BY'),
  133 + LIMIT = t('designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.LIMIT'),
  134 + USE_METADATA_INTERVAL_PATTERNS = t(
  135 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.USE_METADATA_INTERVAL_PATTERNS'
  136 + ),
  137 + START_INTERVAL = t(
  138 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL'
  139 + ),
  140 + START_INTERVAL_TIME_UNIT = t(
  141 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL_TIME_UNIT'
  142 + ),
  143 + END_INTERVAL = t(
  144 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL'
  145 + ),
  146 + END_INTERVAL_TIME_UNIT = t(
  147 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL_TIME_UNIT'
  148 + ),
  149 + START_INTERVAL_PATTERN = t(
  150 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.START_INTERVAL_PATTERN'
  151 + ),
  152 + END_INTERVAL_PATTERN = t(
  153 + 'designer_form_label.enrichments.index.OriginatorTelemetryFieldsNameEnum.END_INTERVAL_PATTERN'
  154 + ),
101 } 155 }
102 156
103 // Enrichment Related attributes 157 // Enrichment Related attributes
@@ -108,9 +162,13 @@ export enum RelatedAttributesFieldsEnum { @@ -108,9 +162,13 @@ export enum RelatedAttributesFieldsEnum {
108 } 162 }
109 163
110 export enum RelatedAttributesFieldsNameEnum { 164 export enum RelatedAttributesFieldsNameEnum {
111 - RELATIONS_QUERY = 'Relations query',  
112 - ATTR_MAPPING = 'Attributes mapping',  
113 - TELEMETRY = 'Latest telemetry', 165 + RELATIONS_QUERY = t(
  166 + 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.RELATIONS_QUERY'
  167 + ),
  168 + ATTR_MAPPING = t(
  169 + 'designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.ATTR_MAPPING'
  170 + ),
  171 + TELEMETRY = t('designer_form_label.enrichments.index.RelatedAttributesFieldsNameEnum.TELEMETRY'),
114 } 172 }
115 173
116 // Enrichment Related device Attributes 174 // Enrichment Related device Attributes
@@ -132,20 +190,44 @@ export enum RelatedDeviceAttributeFieldsEnum { @@ -132,20 +190,44 @@ export enum RelatedDeviceAttributeFieldsEnum {
132 } 190 }
133 191
134 export enum RelatedDeviceAttributeFieldsNameEnum { 192 export enum RelatedDeviceAttributeFieldsNameEnum {
135 - DEVICE_RELATIONS_QUERY = 'deviceRelationsQuery',  
136 - TELL_FAILURE_IF_ABSENT = 'Tell Failure',  
137 - CLIENT_ATTRIBUTE_NAMES = 'Client attributes',  
138 - SHARED_ATTRIBUTE_NAMES = 'Shared attributes',  
139 - SERVER_ATTRIBUTE_NAMES = 'Server attributes',  
140 - LATEST_TS_KEY_NAMES = 'Latest timeseries',  
141 - GET_LATEST_VALUE_WITH_TS = 'Fetch Latest telemetry with Timestamp',  
142 - FETCH_LAST_LEVEL_ONLY = '仅获取最后一级关联', 193 + DEVICE_RELATIONS_QUERY = t(
  194 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DEVICE_RELATIONS_QUERY'
  195 + ),
  196 + TELL_FAILURE_IF_ABSENT = t(
  197 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.TELL_FAILURE_IF_ABSENT'
  198 + ),
  199 + CLIENT_ATTRIBUTE_NAMES = t(
  200 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.CLIENT_ATTRIBUTE_NAMES'
  201 + ),
  202 + SHARED_ATTRIBUTE_NAMES = t(
  203 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.SHARED_ATTRIBUTE_NAMES'
  204 + ),
  205 + SERVER_ATTRIBUTE_NAMES = t(
  206 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.SERVER_ATTRIBUTE_NAMES'
  207 + ),
  208 + LATEST_TS_KEY_NAMES = t(
  209 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.LATEST_TS_KEY_NAMES'
  210 + ),
  211 + GET_LATEST_VALUE_WITH_TS = t(
  212 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.GET_LATEST_VALUE_WITH_TS'
  213 + ),
  214 + FETCH_LAST_LEVEL_ONLY = t(
  215 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.FETCH_LAST_LEVEL_ONLY'
  216 + ),
143 217
144 // DEVICE_RELATIONS_QUERY 218 // DEVICE_RELATIONS_QUERY
145 - DIRECTION = '方向',  
146 - MAX_LEVEL = 'Max relation level',  
147 - RELATION_TYPE = '关联类型',  
148 - DEVICE_TYPES = '设备类型', 219 + DIRECTION = t(
  220 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DIRECTION'
  221 + ),
  222 + MAX_LEVEL = t(
  223 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.MAX_LEVEL'
  224 + ),
  225 + RELATION_TYPE = t(
  226 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.RELATION_TYPE'
  227 + ),
  228 + DEVICE_TYPES = t(
  229 + 'designer_form_label.enrichments.index.RelatedDeviceAttributeFieldsNameEnum.DEVICE_TYPES'
  230 + ),
149 } 231 }
150 232
151 // Tenant attributes 233 // Tenant attributes
@@ -155,8 +237,10 @@ export enum TenantAttributesFieldsEnum { @@ -155,8 +237,10 @@ export enum TenantAttributesFieldsEnum {
155 } 237 }
156 238
157 export enum TenantAttributesFieldsNameEnum { 239 export enum TenantAttributesFieldsNameEnum {
158 - ATTR_MAPING = 'attrMapping',  
159 - TELEMETRY = 'Latest telemetry', 240 + ATTR_MAPING = t(
  241 + 'designer_form_label.enrichments.index.TenantAttributesFieldsNameEnum.ATTR_MAPING'
  242 + ),
  243 + TELEMETRY = t('designer_form_label.enrichments.index.TenantAttributesFieldsNameEnum.TELEMETRY'),
160 } 244 }
161 245
162 // Enrichment Tenant details 246 // Enrichment Tenant details
@@ -166,6 +250,10 @@ export enum TenantDetailsFieldsEnum { @@ -166,6 +250,10 @@ export enum TenantDetailsFieldsEnum {
166 } 250 }
167 251
168 export enum TenantDetailsFieldsNameEnum { 252 export enum TenantDetailsFieldsNameEnum {
169 - DETAILS_LIST = 'Add selected details to message metadata',  
170 - ADD_TO_METADATA = 'Select entity details', 253 + DETAILS_LIST = t(
  254 + 'designer_form_label.enrichments.index.TenantDetailsFieldsNameEnum.DETAILS_LIST'
  255 + ),
  256 + ADD_TO_METADATA = t(
  257 + 'designer_form_label.enrichments.index.TenantDetailsFieldsNameEnum.ADD_TO_METADATA'
  258 + ),
171 } 259 }
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 // Alarm notice 5 // Alarm notice
2 export enum AlarmNoticeFieldsEnum { 6 export enum AlarmNoticeFieldsEnum {
3 CONFIGURATION = 'CONFIGURATION', 7 CONFIGURATION = 'CONFIGURATION',
4 } 8 }
5 9
6 export enum AlarmNoticeFieldsNameEnum { 10 export enum AlarmNoticeFieldsNameEnum {
7 - CONFIGURATION = '配置', 11 + CONFIGURATION = t('designer_form_label.externals.index.AlarmNoticeFieldsNameEnum.CONFIGURATION'),
8 } 12 }
9 13
10 // aws sns 14 // aws sns
@@ -16,10 +20,14 @@ export enum AwsSnsFieldsEnum { @@ -16,10 +20,14 @@ export enum AwsSnsFieldsEnum {
16 } 20 }
17 21
18 export enum AwsSnsFieldsNameEnum { 22 export enum AwsSnsFieldsNameEnum {
19 - TOPIC_ARN_PATTERN = 'Topic ARN pattern',  
20 - ACCESS_KEY_ID = 'AWS Access Key ID',  
21 - SECRET_ACCESS_KEY = 'AWS Secret Access Key',  
22 - REGION = 'AWS Region', 23 + TOPIC_ARN_PATTERN = t(
  24 + 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.TOPIC_ARN_PATTERN'
  25 + ),
  26 + ACCESS_KEY_ID = t('designer_form_label.externals.index.AwsSnsFieldsNameEnum.ACCESS_KEY_ID'),
  27 + SECRET_ACCESS_KEY = t(
  28 + 'designer_form_label.externals.index.AwsSnsFieldsNameEnum.SECRET_ACCESS_KEY'
  29 + ),
  30 + REGION = t('designer_form_label.externals.index.AwsSnsFieldsNameEnum.REGION'),
23 } 31 }
24 32
25 // Aws sqs 33 // Aws sqs
@@ -34,13 +42,19 @@ export enum AwsSqsFieldsEnum { @@ -34,13 +42,19 @@ export enum AwsSqsFieldsEnum {
34 } 42 }
35 43
36 export enum AwsSqsFieldsNameEnum { 44 export enum AwsSqsFieldsNameEnum {
37 - QUEUE_TYPE = 'Queue type',  
38 - QUEUE_URL_PATTERN = 'Queue URL pattern',  
39 - DELAY_SECONDS = 'Delay(seconds)',  
40 - MESSAGE_ATTRIBUTES = 'Message attributes',  
41 - ACCESS_KEY_ID = 'AWS Access Key ID',  
42 - SECRET_ACCESS_KEY = 'AWS Secret Access Key',  
43 - REGION = 'AWS Region', 45 + QUEUE_TYPE = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.QUEUE_TYPE'),
  46 + QUEUE_URL_PATTERN = t(
  47 + 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.QUEUE_URL_PATTERN'
  48 + ),
  49 + DELAY_SECONDS = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.DELAY_SECONDS'),
  50 + MESSAGE_ATTRIBUTES = t(
  51 + 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.MESSAGE_ATTRIBUTES'
  52 + ),
  53 + ACCESS_KEY_ID = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.ACCESS_KEY_ID'),
  54 + SECRET_ACCESS_KEY = t(
  55 + 'designer_form_label.externals.index.AwsSqsFieldsNameEnum.SECRET_ACCESS_KEY'
  56 + ),
  57 + REGION = t('designer_form_label.externals.index.AwsSqsFieldsNameEnum.REGION'),
44 } 58 }
45 59
46 // Azure iot hub 60 // Azure iot hub
@@ -66,24 +80,32 @@ export enum AzureIotHubFieldsEnum { @@ -66,24 +80,32 @@ export enum AzureIotHubFieldsEnum {
66 } 80 }
67 81
68 export enum AzureIotHubFieldsNameEnum { 82 export enum AzureIotHubFieldsNameEnum {
69 - TOPIC_PATTERN = 'Topic',  
70 - HOST = 'Hostname',  
71 - PORT = 'port',  
72 - CONNECT_TIMEOUT_SEC = 'connectTimeoutSec',  
73 - CLIENT_ID = 'Device ID',  
74 - CLEAN_SESSION = 'cleanSession',  
75 - SSL = 'ssl',  
76 - CREDENTIALS = 'credentials', 83 + TOPIC_PATTERN = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.TOPIC_PATTERN'),
  84 + HOST = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.HOST'),
  85 + PORT = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PORT'),
  86 + CONNECT_TIMEOUT_SEC = t(
  87 + 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CONNECT_TIMEOUT_SEC'
  88 + ),
  89 + CLIENT_ID = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CLIENT_ID'),
  90 + CLEAN_SESSION = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CLEAN_SESSION'),
  91 + SSL = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.SSL'),
  92 + CREDENTIALS = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CREDENTIALS'),
77 93
78 - TYPE = 'Credentials type',  
79 - SAS_KEY = 'sasKey',  
80 - CA_CERT = 'CA certificate file',  
81 - CA_CERT_FILE_NAME = 'caCertFileName',  
82 - PRIVATE_KEY = 'Client private key file',  
83 - PRIVATE_KEY_FILE_NAME = 'privateKeyFileName',  
84 - CERT = 'Client certificate file',  
85 - CERT_FILE_NAME = 'certFileName',  
86 - PASSWORD = 'Private key password', 94 + TYPE = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.TYPE'),
  95 + SAS_KEY = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.SAS_KEY'),
  96 + CA_CERT = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CA_CERT'),
  97 + CA_CERT_FILE_NAME = t(
  98 + 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CA_CERT_FILE_NAME'
  99 + ),
  100 + PRIVATE_KEY = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PRIVATE_KEY'),
  101 + PRIVATE_KEY_FILE_NAME = t(
  102 + 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PRIVATE_KEY_FILE_NAME'
  103 + ),
  104 + CERT = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CERT'),
  105 + CERT_FILE_NAME = t(
  106 + 'designer_form_label.externals.index.AzureIotHubFieldsNameEnum.CERT_FILE_NAME'
  107 + ),
  108 + PASSWORD = t('designer_form_label.externals.index.AzureIotHubFieldsNameEnum.PASSWORD'),
87 } 109 }
88 110
89 // GCP pubsub 111 // GCP pubsub
@@ -96,11 +118,17 @@ export enum GcpPubsubFieldsEnum { @@ -96,11 +118,17 @@ export enum GcpPubsubFieldsEnum {
96 } 118 }
97 119
98 export enum GcpPubsubFieldsNameEnum { 120 export enum GcpPubsubFieldsNameEnum {
99 - PROJECT_ID = 'GCP project ID',  
100 - TOPIC_NAME = 'Topic name',  
101 - SERVICE_ACCOUNT_KEY = 'GCP service account key file',  
102 - SERVICE_ACCOUNT_KEY_FILE_NAME = 'serviceAccountKeyFileName',  
103 - MESSAGE_ATTRIBUTES = 'Message attributes', 121 + PROJECT_ID = t('designer_form_label.externals.index.GcpPubsubFieldsNameEnum.PROJECT_ID'),
  122 + TOPIC_NAME = t('designer_form_label.externals.index.GcpPubsubFieldsNameEnum.TOPIC_NAME'),
  123 + SERVICE_ACCOUNT_KEY = t(
  124 + 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY'
  125 + ),
  126 + SERVICE_ACCOUNT_KEY_FILE_NAME = t(
  127 + 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.SERVICE_ACCOUNT_KEY_FILE_NAME'
  128 + ),
  129 + MESSAGE_ATTRIBUTES = t(
  130 + 'designer_form_label.externals.index.GcpPubsubFieldsNameEnum.MESSAGE_ATTRIBUTES'
  131 + ),
104 } 132 }
105 133
106 // Kafka 134 // Kafka
@@ -120,18 +148,24 @@ export enum KafkaFieldsEnum { @@ -120,18 +148,24 @@ export enum KafkaFieldsEnum {
120 } 148 }
121 149
122 export enum KafkaFieldsNameEnum { 150 export enum KafkaFieldsNameEnum {
123 - TOPIC_PATTERN = 'Topic pattern',  
124 - BOOTSTRAP_SERVERS = 'Bootstrap servers',  
125 - RETRIES = 'Automatically retry times if fails',  
126 - BATCH_SIZE = 'Produces batch size in bytes',  
127 - LINGER = 'Time to buffer locally(ms)',  
128 - BUFFER_MEMORY = 'Client buffer max size in bytes',  
129 - ACKS = 'Number of acknowledgments',  
130 - KEY_SERIALIZER = 'Key serializer',  
131 - VALUE_SERIALIZER = 'Value serializer',  
132 - OTHER_PROPERTIES = 'Other properties',  
133 - ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS = 'Add Message metadata key-value pairs to Kafka record headers',  
134 - KAFKA_HEADERS_CHARSET = 'Charset encoding', 151 + TOPIC_PATTERN = t('designer_form_label.externals.index.KafkaFieldsNameEnum.TOPIC_PATTERN'),
  152 + BOOTSTRAP_SERVERS = t(
  153 + 'designer_form_label.externals.index.KafkaFieldsNameEnum.BOOTSTRAP_SERVERS'
  154 + ),
  155 + RETRIES = t('designer_form_label.externals.index.KafkaFieldsNameEnum.RETRIES'),
  156 + BATCH_SIZE = t('designer_form_label.externals.index.KafkaFieldsNameEnum.BATCH_SIZE'),
  157 + LINGER = t('designer_form_label.externals.index.KafkaFieldsNameEnum.LINGER'),
  158 + BUFFER_MEMORY = t('designer_form_label.externals.index.KafkaFieldsNameEnum.BUFFER_MEMORY'),
  159 + ACKS = t('designer_form_label.externals.index.KafkaFieldsNameEnum.ACKS'),
  160 + KEY_SERIALIZER = t('designer_form_label.externals.index.KafkaFieldsNameEnum.KEY_SERIALIZER'),
  161 + VALUE_SERIALIZER = t('designer_form_label.externals.index.KafkaFieldsNameEnum.VALUE_SERIALIZER'),
  162 + OTHER_PROPERTIES = t('designer_form_label.externals.index.KafkaFieldsNameEnum.OTHER_PROPERTIES'),
  163 + ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS = t(
  164 + 'designer_form_label.externals.index.KafkaFieldsNameEnum.ADD_METADATA_KEY_VALUES_AS_KAFKA_HEADERS'
  165 + ),
  166 + KAFKA_HEADERS_CHARSET = t(
  167 + 'designer_form_label.externals.index.KafkaFieldsNameEnum.KAFKA_HEADERS_CHARSET'
  168 + ),
135 } 169 }
136 170
137 // Mqtt 171 // Mqtt
@@ -158,25 +192,31 @@ export enum MqttFieldsEnum { @@ -158,25 +192,31 @@ export enum MqttFieldsEnum {
158 } 192 }
159 193
160 export enum MqttFieldsNameEnum { 194 export enum MqttFieldsNameEnum {
161 - TOPIC_PATTERN = 'Topic pattern',  
162 - HOST = 'Hose',  
163 - PORT = 'Port',  
164 - CONNECT_TIMEOUT_SEC = 'Connection timeout(sec)',  
165 - CLIENT_ID = 'Client ID',  
166 - APPEND_CLIENT_ID_SUFFIX = 'Add Service ID as suffix to Client ID',  
167 - CLEAN_SESSION = 'Clean session',  
168 - SSL = 'Enable SSL',  
169 - CREDENTIALS = 'credentials', 195 + TOPIC_PATTERN = t('designer_form_label.externals.index.MqttFieldsNameEnum.TOPIC_PATTERN'),
  196 + HOST = t('designer_form_label.externals.index.MqttFieldsNameEnum.HOST'),
  197 + PORT = t('designer_form_label.externals.index.MqttFieldsNameEnum.PORT'),
  198 + CONNECT_TIMEOUT_SEC = t(
  199 + 'designer_form_label.externals.index.MqttFieldsNameEnum.CONNECT_TIMEOUT_SEC'
  200 + ),
  201 + CLIENT_ID = t('designer_form_label.externals.index.MqttFieldsNameEnum.CLIENT_ID'),
  202 + APPEND_CLIENT_ID_SUFFIX = t(
  203 + 'designer_form_label.externals.index.MqttFieldsNameEnum.APPEND_CLIENT_ID_SUFFIX'
  204 + ),
  205 + CLEAN_SESSION = t('designer_form_label.externals.index.MqttFieldsNameEnum.CLEAN_SESSION'),
  206 + SSL = t('designer_form_label.externals.index.MqttFieldsNameEnum.SSL'),
  207 + CREDENTIALS = t('designer_form_label.externals.index.MqttFieldsNameEnum.CREDENTIALS'),
170 208
171 - TYPE = 'Credentials type',  
172 - PASSWORD = 'Password',  
173 - CA_CERT = 'Server CA certificate file',  
174 - CA_CERT_FILE_NAME = 'caCertFileName',  
175 - PRIVATE_KEY = 'Client private key file',  
176 - PRIVATE_KEY_FILE_NAME = 'privateKeyFileName',  
177 - CERT = 'Client certificate file',  
178 - CERT_FILE_NAME = 'certFileName',  
179 - USERNAME = 'Username', 209 + TYPE = t('designer_form_label.externals.index.MqttFieldsNameEnum.TYPE'),
  210 + PASSWORD = t('designer_form_label.externals.index.MqttFieldsNameEnum.PASSWORD'),
  211 + CA_CERT = t('designer_form_label.externals.index.MqttFieldsNameEnum.CA_CERT'),
  212 + CA_CERT_FILE_NAME = t('designer_form_label.externals.index.MqttFieldsNameEnum.CA_CERT_FILE_NAME'),
  213 + PRIVATE_KEY = t('designer_form_label.externals.index.MqttFieldsNameEnum.PRIVATE_KEY'),
  214 + PRIVATE_KEY_FILE_NAME = t(
  215 + 'designer_form_label.externals.index.MqttFieldsNameEnum.PRIVATE_KEY_FILE_NAME'
  216 + ),
  217 + CERT = t('designer_form_label.externals.index.MqttFieldsNameEnum.CERT'),
  218 + CERT_FILE_NAME = t('designer_form_label.externals.index.MqttFieldsNameEnum.CERT_FILE_NAME'),
  219 + USERNAME = t('designer_form_label.externals.index.MqttFieldsNameEnum.USERNAME'),
180 } 220 }
181 221
182 // Rabbitmq 222 // Rabbitmq
@@ -196,18 +236,32 @@ export enum RabbitmqFieldsEnum { @@ -196,18 +236,32 @@ export enum RabbitmqFieldsEnum {
196 } 236 }
197 237
198 export enum RabbitmqFieldsNameEnum { 238 export enum RabbitmqFieldsNameEnum {
199 - EXCHANGE_NAME_PATTERN = 'Exchange name pattern',  
200 - ROUTING_KEY_PATTERN = 'Routing key pattern',  
201 - MESSAGE_PROPERTIES = 'Message properties',  
202 - HOST = 'Host',  
203 - PORT = 'Port',  
204 - VIRTUAL_HOST = 'Virtual host',  
205 - USERNAME = 'Username',  
206 - PASSWORD = 'Password',  
207 - AUTOMATIC_RECOVERY_ENABLED = 'Automatic recovery',  
208 - CONNECTION_TIMEOUT = 'Connection timeout(ms)',  
209 - HANDSHAKE_TIMEOUT = 'Handshake timeout(ms)',  
210 - CLIENT_PROPERTIES = 'Client properties', 239 + EXCHANGE_NAME_PATTERN = t(
  240 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.EXCHANGE_NAME_PATTERN'
  241 + ),
  242 + ROUTING_KEY_PATTERN = t(
  243 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.ROUTING_KEY_PATTERN'
  244 + ),
  245 + MESSAGE_PROPERTIES = t(
  246 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.MESSAGE_PROPERTIES'
  247 + ),
  248 + HOST = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.HOST'),
  249 + PORT = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.PORT'),
  250 + VIRTUAL_HOST = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.VIRTUAL_HOST'),
  251 + USERNAME = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.USERNAME'),
  252 + PASSWORD = t('designer_form_label.externals.index.RabbitmqFieldsNameEnum.PASSWORD'),
  253 + AUTOMATIC_RECOVERY_ENABLED = t(
  254 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.AUTOMATIC_RECOVERY_ENABLED'
  255 + ),
  256 + CONNECTION_TIMEOUT = t(
  257 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.CONNECTION_TIMEOUT'
  258 + ),
  259 + HANDSHAKE_TIMEOUT = t(
  260 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.HANDSHAKE_TIMEOUT'
  261 + ),
  262 + CLIENT_PROPERTIES = t(
  263 + 'designer_form_label.externals.index.RabbitmqFieldsNameEnum.CLIENT_PROPERTIES'
  264 + ),
211 } 265 }
212 266
213 // Rest api call 267 // Rest api call
@@ -243,34 +297,60 @@ export enum RestApiCallFieldsEnum { @@ -243,34 +297,60 @@ export enum RestApiCallFieldsEnum {
243 } 297 }
244 298
245 export enum RestApiCallFieldsNameEnum { 299 export enum RestApiCallFieldsNameEnum {
246 - REST_ENDPOINT_URL_PATTERN = 'Endpoint URL pattern',  
247 - REQUEST_METHOD = 'Request method',  
248 - USE_SIMPLE_CLIENT_HTTP_FACTORY = 'Use simple client HTTP factory',  
249 - IGNORE_REQUEST_BODY = 'Without request body',  
250 - ENABLE_PROXY = 'Enable proxy',  
251 - USE_SYSTEM_PROXY_PROPERTIES = 'Use system proxy properties',  
252 - PROXY_SCHEME = 'Proxy scheme',  
253 - PROXY_HOST = 'Proxy host',  
254 - PROXY_PORT = 'Proxy port',  
255 - PROXY_USER = 'Proxy user',  
256 - PROXY_PASSWORD = 'Proxy password',  
257 - READ_TIMEOUT_MS = 'Read timeout in millis',  
258 - MAX_PARALLEL_REQUESTS_COUNT = 'Max number of parallel request',  
259 - HEADERS = 'Header',  
260 - USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE = 'Use redis queue for message persistence',  
261 - TRIM_QUEUE = 'Trim redis queue',  
262 - MAX_QUEUE_SIZE = 'Redis queue max size',  
263 - CREDENTIALS = 'Credentials', 300 + REST_ENDPOINT_URL_PATTERN = t(
  301 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.REST_ENDPOINT_URL_PATTERN'
  302 + ),
  303 + REQUEST_METHOD = t(
  304 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.REQUEST_METHOD'
  305 + ),
  306 + USE_SIMPLE_CLIENT_HTTP_FACTORY = t(
  307 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_SIMPLE_CLIENT_HTTP_FACTORY'
  308 + ),
  309 + IGNORE_REQUEST_BODY = t(
  310 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.IGNORE_REQUEST_BODY'
  311 + ),
  312 + ENABLE_PROXY = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.ENABLE_PROXY'),
  313 + USE_SYSTEM_PROXY_PROPERTIES = t(
  314 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_SYSTEM_PROXY_PROPERTIES'
  315 + ),
  316 + PROXY_SCHEME = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_SCHEME'),
  317 + PROXY_HOST = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_HOST'),
  318 + PROXY_PORT = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_PORT'),
  319 + PROXY_USER = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_USER'),
  320 + PROXY_PASSWORD = t(
  321 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PROXY_PASSWORD'
  322 + ),
  323 + READ_TIMEOUT_MS = t(
  324 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.READ_TIMEOUT_MS'
  325 + ),
  326 + MAX_PARALLEL_REQUESTS_COUNT = t(
  327 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.MAX_PARALLEL_REQUESTS_COUNT'
  328 + ),
  329 + HEADERS = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.HEADERS'),
  330 + USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE = t(
  331 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.USE_REDIS_QUEUE_FOR_MSG_PERSISTENCE'
  332 + ),
  333 + TRIM_QUEUE = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.TRIM_QUEUE'),
  334 + MAX_QUEUE_SIZE = t(
  335 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.MAX_QUEUE_SIZE'
  336 + ),
  337 + CREDENTIALS = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.CREDENTIALS'),
264 338
265 - TYPE = 'Credentials type',  
266 - PASSWORD = 'Password',  
267 - CA_CERT = 'Server CA certificate file',  
268 - CA_CERT_FILE_NAME = 'caCertFileName',  
269 - PRIVATE_KEY = 'Client private key file',  
270 - PRIVATE_KEY_FILE_NAME = 'privateKeyFileName',  
271 - CERT = 'Client certificate file',  
272 - CERT_FILE_NAME = 'certFileName',  
273 - USERNAME = 'Username', 339 + TYPE = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.TYPE'),
  340 + PASSWORD = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PASSWORD'),
  341 + CA_CERT = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.CA_CERT'),
  342 + CA_CERT_FILE_NAME = t(
  343 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CA_CERT_FILE_NAME'
  344 + ),
  345 + PRIVATE_KEY = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.PRIVATE_KEY'),
  346 + PRIVATE_KEY_FILE_NAME = t(
  347 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.PRIVATE_KEY_FILE_NAME'
  348 + ),
  349 + CERT = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.CERT'),
  350 + CERT_FILE_NAME = t(
  351 + 'designer_form_label.externals.index.RestApiCallFieldsNameEnum.CERT_FILE_NAME'
  352 + ),
  353 + USERNAME = t('designer_form_label.externals.index.RestApiCallFieldsNameEnum.USERNAME'),
274 } 354 }
275 355
276 // send email 356 // send email
@@ -292,20 +372,22 @@ export enum SendEmailFieldsEnum { @@ -292,20 +372,22 @@ export enum SendEmailFieldsEnum {
292 } 372 }
293 373
294 export enum SendEmailFieldsNameEnum { 374 export enum SendEmailFieldsNameEnum {
295 - USE_SYSTEM_SMTP_SETTINGS = 'Use system SMTP settings',  
296 - SMTP_PROTOCOL = 'Protocol',  
297 - SMTP_HOST = 'SMTP host',  
298 - SMTP_PORT = 'SMTP port',  
299 - TIMEOUT = 'Timeout ms',  
300 - ENABLE_TLS = 'Enable TLS',  
301 - TLS_VERSION = 'TLS version',  
302 - ENABLE_PROXY = 'Enable proxy',  
303 - PROXY_HOST = 'Proxy host',  
304 - PROXY_PORT = 'Proxy port',  
305 - PROXY_USER = 'Proxy user',  
306 - PROXY_PASSWORD = 'Proxy password',  
307 - USERNAME = 'Username',  
308 - PASSWORD = 'Password', 375 + USE_SYSTEM_SMTP_SETTINGS = t(
  376 + 'designer_form_label.externals.index.SendEmailFieldsNameEnum.USE_SYSTEM_SMTP_SETTINGS'
  377 + ),
  378 + SMTP_PROTOCOL = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_PROTOCOL'),
  379 + SMTP_HOST = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_HOST'),
  380 + SMTP_PORT = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.SMTP_PORT'),
  381 + TIMEOUT = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.TIMEOUT'),
  382 + ENABLE_TLS = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.ENABLE_TLS'),
  383 + TLS_VERSION = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.TLS_VERSION'),
  384 + ENABLE_PROXY = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.ENABLE_PROXY'),
  385 + PROXY_HOST = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_HOST'),
  386 + PROXY_PORT = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_PORT'),
  387 + PROXY_USER = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_USER'),
  388 + PROXY_PASSWORD = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PROXY_PASSWORD'),
  389 + USERNAME = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.USERNAME'),
  390 + PASSWORD = t('designer_form_label.externals.index.SendEmailFieldsNameEnum.PASSWORD'),
309 } 391 }
310 392
311 export enum SendSMSFieldsEnum { 393 export enum SendSMSFieldsEnum {
@@ -324,16 +406,26 @@ export enum SendSMSFieldsEnum { @@ -324,16 +406,26 @@ export enum SendSMSFieldsEnum {
324 } 406 }
325 407
326 export enum SendSMSFieldsNameEnum { 408 export enum SendSMSFieldsNameEnum {
327 - NUMBERS_TO_TEMPLATE = 'Phone Numbers To Template',  
328 - SMS_MESSAGE_TEMPLATE = 'SMS message Template',  
329 - USE_SYSTEM_SMS_SETTINGS = 'User system SMS provider settings',  
330 - SMS_PROVIDER_CONFIGURATION = 'smsProviderConfiguration', 409 + NUMBERS_TO_TEMPLATE = t(
  410 + 'designer_form_label.externals.index.SendSMSFieldsNameEnum.NUMBERS_TO_TEMPLATE'
  411 + ),
  412 + SMS_MESSAGE_TEMPLATE = t(
  413 + 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SMS_MESSAGE_TEMPLATE'
  414 + ),
  415 + USE_SYSTEM_SMS_SETTINGS = t(
  416 + 'designer_form_label.externals.index.SendSMSFieldsNameEnum.USE_SYSTEM_SMS_SETTINGS'
  417 + ),
  418 + SMS_PROVIDER_CONFIGURATION = t(
  419 + 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SMS_PROVIDER_CONFIGURATION'
  420 + ),
331 421
332 - ACCESS_KEY_ID = 'AWS访问密钥ID',  
333 - SECRET_ACCESS_KEY = 'AWS访问密钥',  
334 - REGION = 'AWS地区',  
335 - TYPE = 'SMS服务商类型',  
336 - NUMBER_FROM = '发送方电话号码',  
337 - ACCOUNT_SID = 'Twilio账户SID',  
338 - ACCOUNT_TOKEN = 'Twilio账户令牌', 422 + ACCESS_KEY_ID = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCESS_KEY_ID'),
  423 + SECRET_ACCESS_KEY = t(
  424 + 'designer_form_label.externals.index.SendSMSFieldsNameEnum.SECRET_ACCESS_KEY'
  425 + ),
  426 + REGION = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.REGION'),
  427 + TYPE = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.TYPE'),
  428 + NUMBER_FROM = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.NUMBER_FROM'),
  429 + ACCOUNT_SID = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCOUNT_SID'),
  430 + ACCOUNT_TOKEN = t('designer_form_label.externals.index.SendSMSFieldsNameEnum.ACCOUNT_TOKEN'),
339 } 431 }
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 // Filter Check Alarm Status Fields 5 // Filter Check Alarm Status Fields
2 export enum CheckAlarmStatusFieldEnum { 6 export enum CheckAlarmStatusFieldEnum {
3 ALARM_STATUS_LIST = 'alarmStatusList', 7 ALARM_STATUS_LIST = 'alarmStatusList',
4 } 8 }
5 9
6 export enum CheckAlarmStatusFieldNameEnum { 10 export enum CheckAlarmStatusFieldNameEnum {
7 - ALARM_STATUS_LIST = 'Alarm status filter', 11 + ALARM_STATUS_LIST = t(
  12 + 'designer_form_label.filters.index.CheckAlarmStatusFieldNameEnum.ALARM_STATUS_LIST'
  13 + ),
8 } 14 }
9 15
10 // Filter CHeck Existence Fields 16 // Filter CHeck Existence Fields
@@ -15,9 +21,13 @@ export enum CheckExistenceFieldsEnum { @@ -15,9 +21,13 @@ export enum CheckExistenceFieldsEnum {
15 } 21 }
16 22
17 export enum CheckExistenceFieldsNameEnum { 23 export enum CheckExistenceFieldsNameEnum {
18 - MESSAGE_NAMES = '消息数据',  
19 - METADATA_NAMES = '消息元数据',  
20 - CHECK_ALL_KEYS = '检查所有选择的键是否都存在', 24 + MESSAGE_NAMES = t('designer_form_label.filters.index.CheckExistenceFieldsNameEnum.MESSAGE_NAMES'),
  25 + METADATA_NAMES = t(
  26 + 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.METADATA_NAMES'
  27 + ),
  28 + CHECK_ALL_KEYS = t(
  29 + 'designer_form_label.filters.index.CheckExistenceFieldsNameEnum.CHECK_ALL_KEYS'
  30 + ),
21 } 31 }
22 32
23 // Filter Check Relation Fields 33 // Filter Check Relation Fields
@@ -30,10 +40,14 @@ export enum CheckRelationFieldsEnum { @@ -30,10 +40,14 @@ export enum CheckRelationFieldsEnum {
30 } 40 }
31 41
32 export enum CheckRelationFieldsNameEnum { 42 export enum CheckRelationFieldsNameEnum {
33 - DIRECTION = '方向',  
34 - CHECK_FOR_SINGLE_ENTITY = 'Check relation to specific entity',  
35 - ENTITY_TYPE = '类型',  
36 - RELEATION_TYPE = '关联类型', 43 + DIRECTION = t('designer_form_label.filters.index.CheckRelationFieldsNameEnum.DIRECTION'),
  44 + CHECK_FOR_SINGLE_ENTITY = t(
  45 + 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.CHECK_FOR_SINGLE_ENTITY'
  46 + ),
  47 + ENTITY_TYPE = t('designer_form_label.filters.index.CheckRelationFieldsNameEnum.ENTITY_TYPE'),
  48 + RELEATION_TYPE = t(
  49 + 'designer_form_label.filters.index.CheckRelationFieldsNameEnum.RELEATION_TYPE'
  50 + ),
37 } 51 }
38 52
39 // Filter Gps geofencing filter 53 // Filter Gps geofencing filter
@@ -51,16 +65,32 @@ export enum GpsGeofencingFilterFieldsEnum { @@ -51,16 +65,32 @@ export enum GpsGeofencingFilterFieldsEnum {
51 } 65 }
52 66
53 export enum GpsGeofencingFilterFieldsNameEnum { 67 export enum GpsGeofencingFilterFieldsNameEnum {
54 - LATITUDE_KEY_NAME = 'Latitude Key Name',  
55 - LONGITUDE_KEY_NAME = 'Longitude Key Name',  
56 - PERIMETER_TYPE = 'Perimeter Type',  
57 - FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = 'Fetch perimeter information from message metadata',  
58 - CENTER_LATITUDE = 'Center latitude',  
59 - CENTER_LONGITUDE = 'Center longitude',  
60 - RANGE = 'Range',  
61 - RANGE_UNIT = 'Range unit',  
62 - PERIMETER_KEY_NAME = 'Perimeter key name',  
63 - POLYGONS_DEFINITION = 'Polygons definition', 68 + LATITUDE_KEY_NAME = t(
  69 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.LATITUDE_KEY_NAME'
  70 + ),
  71 + LONGITUDE_KEY_NAME = t(
  72 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.LONGITUDE_KEY_NAME'
  73 + ),
  74 + PERIMETER_TYPE = t(
  75 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.PERIMETER_TYPE'
  76 + ),
  77 + FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA = t(
  78 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.FETCH_PERIMETER_INFO_FROM_MESSAGE_METADATA'
  79 + ),
  80 + CENTER_LATITUDE = t(
  81 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.CENTER_LATITUDE'
  82 + ),
  83 + CENTER_LONGITUDE = t(
  84 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.CENTER_LONGITUDE'
  85 + ),
  86 + RANGE = t('designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.RANGE'),
  87 + RANGE_UNIT = t('designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.RANGE_UNIT'),
  88 + PERIMETER_KEY_NAME = t(
  89 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.PERIMETER_KEY_NAME'
  90 + ),
  91 + POLYGONS_DEFINITION = t(
  92 + 'designer_form_label.filters.index.GpsGeofencingFilterFieldsNameEnum.POLYGONS_DEFINITION'
  93 + ),
64 } 94 }
65 95
66 // Filter Message Type 96 // Filter Message Type
@@ -69,7 +99,7 @@ export enum MessageTypeFieldsEnum { @@ -69,7 +99,7 @@ export enum MessageTypeFieldsEnum {
69 } 99 }
70 100
71 export enum MessageTypeFieldsNameEnum { 101 export enum MessageTypeFieldsNameEnum {
72 - MESSAGE_TYPES = 'Message Types Filter', 102 + MESSAGE_TYPES = t('designer_form_label.filters.index.MessageTypeFieldsNameEnum.MESSAGE_TYPES'),
73 } 103 }
74 104
75 // Filter Originator Type 105 // Filter Originator Type
@@ -78,7 +108,9 @@ export enum OriginatorTypeFieldsEnum { @@ -78,7 +108,9 @@ export enum OriginatorTypeFieldsEnum {
78 } 108 }
79 109
80 export enum OriginatorTypeFieldsNameEnum { 110 export enum OriginatorTypeFieldsNameEnum {
81 - ORIGINATOR_TYPES = 'Originator types filter', 111 + ORIGINATOR_TYPES = t(
  112 + 'designer_form_label.filters.index.OriginatorTypeFieldsNameEnum.ORIGINATOR_TYPES'
  113 + ),
82 } 114 }
83 115
84 // Filter Script 116 // Filter Script
@@ -87,7 +119,7 @@ export enum ScriptFieldsEnum { @@ -87,7 +119,7 @@ export enum ScriptFieldsEnum {
87 } 119 }
88 120
89 export enum ScriptFieldsNameEnum { 121 export enum ScriptFieldsNameEnum {
90 - JS_SCRIPT = 'Filter', 122 + JS_SCRIPT = t('designer_form_label.filters.index.ScriptFieldsNameEnum.JS_SCRIPT'),
91 } 123 }
92 124
93 // Filter Switch 125 // Filter Switch
@@ -96,5 +128,5 @@ export enum SwitchFieldsEnum { @@ -96,5 +128,5 @@ export enum SwitchFieldsEnum {
96 } 128 }
97 129
98 export enum SwitchFieldsNameEnum { 130 export enum SwitchFieldsNameEnum {
99 - JS_SCRIPT = 'Filter', 131 + JS_SCRIPT = t('designer_form_label.filters.index.SwitchFieldsNameEnum.JS_SCRIPT'),
100 } 132 }
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 export enum CheckPointFieldsEnum { 5 export enum CheckPointFieldsEnum {
2 QUEUE_NAME = 'queueName', 6 QUEUE_NAME = 'queueName',
3 } 7 }
4 -  
5 export enum CheckPointFieldsNameEnum { 8 export enum CheckPointFieldsNameEnum {
6 - QUEUE_NAME = '队列名称', 9 + QUEUE_NAME = t('designer_form_label.flows.index.CheckPointFieldsNameEnum.QUEUE_NAME'),
7 } 10 }
8 11
9 export enum RuleChainFieldsEnum { 12 export enum RuleChainFieldsEnum {
@@ -11,5 +14,5 @@ export enum RuleChainFieldsEnum { @@ -11,5 +14,5 @@ export enum RuleChainFieldsEnum {
11 } 14 }
12 15
13 export enum RuleChainFieldsNameEnum { 16 export enum RuleChainFieldsNameEnum {
14 - RULE_CHAIN_ID = '规则链', 17 + RULE_CHAIN_ID = t('designer_form_label.flows.index.RuleChainFieldsNameEnum.RULE_CHAIN_ID'),
15 } 18 }
  1 +import { useI18n } from '/@/hooks/web/useI18n';
  2 +
  3 +const { t } = useI18n() as any; //加载国际化
  4 +
1 // Change originator 5 // Change originator
2 export enum ChangeOriginatorFieldsEnum { 6 export enum ChangeOriginatorFieldsEnum {
3 ORIGINATOR_SOURCE = 'originatorSource', 7 ORIGINATOR_SOURCE = 'originatorSource',
@@ -5,8 +9,12 @@ export enum ChangeOriginatorFieldsEnum { @@ -5,8 +9,12 @@ export enum ChangeOriginatorFieldsEnum {
5 } 9 }
6 10
7 export enum ChangeOriginatorFieldsNameEnum { 11 export enum ChangeOriginatorFieldsNameEnum {
8 - ORIGINATOR_SOURCE = 'Originator source',  
9 - RELATIONS_QUERY = 'Relations Query', 12 + ORIGINATOR_SOURCE = t(
  13 + 'designer_form_label.transformations.index.ChangeOriginatorFieldsNameEnum.ORIGINATOR_SOURCE'
  14 + ),
  15 + RELATIONS_QUERY = t(
  16 + 'designer_form_label.transformations.index.ChangeOriginatorFieldsNameEnum.RELATIONS_QUERY'
  17 + ),
10 } 18 }
11 19
12 export enum ScriptFieldsEnum { 20 export enum ScriptFieldsEnum {
@@ -14,7 +22,7 @@ export enum ScriptFieldsEnum { @@ -14,7 +22,7 @@ export enum ScriptFieldsEnum {
14 } 22 }
15 23
16 export enum ScriptFieldsNameEnum { 24 export enum ScriptFieldsNameEnum {
17 - JS_SCRIPT = 'Transform', 25 + JS_SCRIPT = t('designer_form_label.transformations.index.ScriptFieldsNameEnum.JS_SCRIPT'),
18 } 26 }
19 27
20 export enum ToEmailFieldsEnum { 28 export enum ToEmailFieldsEnum {
@@ -29,12 +37,22 @@ export enum ToEmailFieldsEnum { @@ -29,12 +37,22 @@ export enum ToEmailFieldsEnum {
29 } 37 }
30 38
31 export enum ToEmailFieldsNameEnum { 39 export enum ToEmailFieldsNameEnum {
32 - FROM_TEMPLATE = 'From Template',  
33 - TO_TEMPLATE = 'To Template',  
34 - CC_TEMPLATE = 'Cc Template',  
35 - BCC_TEMPLATE = 'Bcc Template',  
36 - SUBJECT_TEMPLATE = 'Subject Template',  
37 - MAIL_BODY_TYPE = 'Mail body type',  
38 - IS_HTML_TEMPLATE = 'Dynamic mail body type',  
39 - BODY_TEMPLATE = 'Body Template', 40 + FROM_TEMPLATE = t(
  41 + 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.FROM_TEMPLATE'
  42 + ),
  43 + TO_TEMPLATE = t('designer_form_label.transformations.index.ToEmailFieldsNameEnum.TO_TEMPLATE'),
  44 + CC_TEMPLATE = t('designer_form_label.transformations.index.ToEmailFieldsNameEnum.CC_TEMPLATE'),
  45 + BCC_TEMPLATE = t('designer_form_label.transformations.index.ToEmailFieldsNameEnum.BCC_TEMPLATE'),
  46 + SUBJECT_TEMPLATE = t(
  47 + 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.SUBJECT_TEMPLATE'
  48 + ),
  49 + MAIL_BODY_TYPE = t(
  50 + 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.MAIL_BODY_TYPE'
  51 + ),
  52 + IS_HTML_TEMPLATE = t(
  53 + 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.IS_HTML_TEMPLATE'
  54 + ),
  55 + BODY_TEMPLATE = t(
  56 + 'designer_form_label.transformations.index.ToEmailFieldsNameEnum.BODY_TEMPLATE'
  57 + ),
40 } 58 }
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.ASSIGN_TO_CUSTOMER); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.ASSIGN_TO_CUSTOMER);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface AssignToCustomerDataType { 10 export interface AssignToCustomerDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const AssignToCustomerConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const AssignToCustomerConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbAssignToCustomerNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbAssignToCustomerNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'assign to customer', 18 + name: t('designer_config.actions.index.assignToCustomer.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.assignToCustomer.details'),
  22 + description: t('designer_config.actions.index.assignToCustomer.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CLEAR_ALARM); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CLEAR_ALARM);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface ClearAlarmDataType { 10 export interface ClearAlarmDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const ClearAlarmConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const ClearAlarmConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbClearAlarmNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbClearAlarmNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'clear alarm', 18 + name: t('designer_config.actions.index.clearAlarm.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.clearAlarm.details'),
  22 + description: t('designer_config.actions.index.clearAlarm.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Cleared', 'False', 'Failure'], 25 relationTypes: ['Cleared', 'False', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.COPY_TO_VIEW); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.COPY_TO_VIEW);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CopyToViewDataType { 10 export interface CopyToViewDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const CopyToViewConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const CopyToViewConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbCopyAttributesToEntityViewNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbCopyAttributesToEntityViewNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'copy to view', 18 + name: t('designer_config.actions.index.copyToView.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.copyToView.details'),
  22 + description: t('designer_config.actions.index.copyToView.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_ALARM); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_ALARM);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CreateAlarmDataType { 10 export interface CreateAlarmDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const CreateAlarmConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const CreateAlarmConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbCreateAlarmNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbCreateAlarmNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'create alarm', 18 + name: t('designer_config.actions.index.createAlarm.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.createAlarm.details'),
  22 + description: t('designer_config.actions.index.createAlarm.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Created', 'Updated', 'False', 'Failure'], 25 relationTypes: ['Created', 'Updated', 'False', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_RELATION); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.CREATE_RELATION);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CreateRelationDataType { 10 export interface CreateRelationDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const CreateRelationConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const CreateRelationConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbCreateRelationNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbCreateRelationNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'create relation', 18 + name: t('designer_config.actions.index.createRelation.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.createRelation.details'),
  22 + description: t('designer_config.actions.index.createRelation.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELAY_DEPRECATED); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELAY_DEPRECATED);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface DelayDeprecatedDataType { 10 export interface DelayDeprecatedDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const DelayDeprecatedConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const DelayDeprecatedConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.delay.TbMsgDelayNode', 16 clazz: 'org.thingsboard.rule.engine.delay.TbMsgDelayNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'delay (deprecated)', 18 + name: t('designer_config.actions.index.delay.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.delay.details'),
  22 + description: t('designer_config.actions.index.delay.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELETE_RELATION); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DELETE_RELATION);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface DeleteRelationDataType { 11 export interface DeleteRelationDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,13 +16,11 @@ export const DeleteRelationConfig: NodeItemConfigType = { @@ -13,13 +16,11 @@ export const DeleteRelationConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbDeleteRelationNode', 17 clazz: 'org.thingsboard.rule.engine.action.TbDeleteRelationNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 18 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'delete relation', 19 + name: t('designer_config.actions.index.deleteRelation.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.deleteRelation.details'),
  23 + description: t('designer_config.actions.index.deleteRelation.description'),
23 inEnabled: true, 24 inEnabled: true,
24 outEnabled: true, 25 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 26 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DEVICE_PROFILE); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.DEVICE_PROFILE);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface DeviceProfileDataType { 11 export interface DeviceProfileDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,12 +16,11 @@ export const DeviceProfileConfig: NodeItemConfigType = { @@ -13,12 +16,11 @@ export const DeviceProfileConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.profile.TbDeviceProfileNode', 17 clazz: 'org.thingsboard.rule.engine.profile.TbDeviceProfileNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 18 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'device profile', 19 + name: t('designer_config.actions.index.deviceProfile.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.deviceProfile.details'),
  23 + description: t('designer_config.actions.index.deviceProfile.description'),
22 inEnabled: true, 24 inEnabled: true,
23 outEnabled: true, 25 outEnabled: true,
24 relationTypes: [ 26 relationTypes: [
@@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.GENERATOR); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.GENERATOR);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface GeneratorDataType { 11 export interface GeneratorDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,12 +16,11 @@ export const GeneratorConfig: NodeItemConfigType = { @@ -13,12 +16,11 @@ export const GeneratorConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.debug.TbMsgGeneratorNode', 17 clazz: 'org.thingsboard.rule.engine.debug.TbMsgGeneratorNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 18 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'generator', 19 + name: t('designer_config.actions.index.generator.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 21 nodeDefinition: {
19 - details:  
20 - 'Generates messages with configurable period. Javascript function used for message generation.',  
21 - description: 'Periodically generates messages', 22 + details: t('designer_config.actions.index.generator.details'),
  23 + description: t('designer_config.actions.index.generator.description'),
22 inEnabled: false, 24 inEnabled: false,
23 outEnabled: true, 25 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 26 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.GPS_GEOFENCING_EVENTS); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.GPS_GEOFENCING_EVENTS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface GpsGeofencingEventsDataType { 10 export interface GpsGeofencingEventsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const GpsGeofencingEventsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const GpsGeofencingEventsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.geo.TbGpsGeofencingActionNode', 16 clazz: 'org.thingsboard.rule.engine.geo.TbGpsGeofencingActionNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'gps geofencing events', 18 + name: t('designer_config.actions.index.gpsGeofencingEvents.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.gpsGeofencingEvents.details'),
  22 + description: t('designer_config.actions.index.gpsGeofencingEvents.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Entered', 'Left', 'Inside', 'Outside', 'Failure'], 25 relationTypes: ['Success', 'Entered', 'Left', 'Inside', 'Outside', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.LOG); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.LOG);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface LogDataType { 10 export interface LogDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const LogConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const LogConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbLogNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbLogNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'log', 18 + name: t('designer_config.actions.index.log.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.log.details'),
  22 + description: t('designer_config.actions.index.log.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.MESSAGE_COUNT); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.MESSAGE_COUNT);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface MessageCountDataType { 11 export interface MessageCountDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,12 +16,11 @@ export const MessageCountConfig: NodeItemConfigType = { @@ -13,12 +16,11 @@ export const MessageCountConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbMsgCountNode', 17 clazz: 'org.thingsboard.rule.engine.action.TbMsgCountNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 18 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'message count', 19 + name: t('designer_config.actions.index.messageCount.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.messageCount.details'),
  23 + description: t('designer_config.actions.index.messageCount.description'),
22 inEnabled: true, 24 inEnabled: true,
23 outEnabled: true, 25 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 26 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.PUSH_TO_EDGE); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.PUSH_TO_EDGE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface PushToEdgeDataType { 10 export interface PushToEdgeDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const PushToEdgeConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const PushToEdgeConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.edge.TbMsgPushToEdgeNode', 16 clazz: 'org.thingsboard.rule.engine.edge.TbMsgPushToEdgeNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'push to edge', 18 + name: t('designer_config.actions.index.pushToEdge.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.pushToEdge.details'),
  22 + description: t('designer_config.actions.index.pushToEdge.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REPLY); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REPLY);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface RpcCallReplyDataType { 10 export interface RpcCallReplyDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const RpcCallReplyConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const RpcCallReplyConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode', 16 clazz: 'org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'rpc call reply', 18 + name: t('designer_config.actions.index.rpcCallReply.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.rpcCallReply.details'),
  22 + description: t('designer_config.actions.index.rpcCallReply.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REQUEST); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.RPC_CALL_REQUEST);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface RpcCallRequestDataType { 10 export interface RpcCallRequestDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const RpcCallRequestConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const RpcCallRequestConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode', 16 clazz: 'org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'rpc call request', 18 + name: t('designer_config.actions.index.rpcCallRequest.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.rpcCallRequest.details'),
  22 + description: t('designer_config.actions.index.rpcCallRequest.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_ATTRIBUTES); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SaveAttributesDataType { 10 export interface SaveAttributesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const SaveAttributesConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const SaveAttributesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode', 16 clazz: 'org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'save attributes', 18 + name: t('designer_config.actions.index.saveAttributes.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.saveAttributes.details'),
  22 + description: t('designer_config.actions.index.saveAttributes.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_EVENT); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_EVENT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SaveEventDataType { 10 export interface SaveEventDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const SaveEventConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const SaveEventConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.yunteng.event.TkMsgEventNode', 16 clazz: 'org.thingsboard.rule.engine.yunteng.event.TkMsgEventNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'save event', 18 + name: t('designer_config.actions.index.saveEvent.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details: "Saves entity event . Expects messages with 'POST_EVENT_REQUEST' message type",  
20 - description: 'Saves device event data', 21 + details: t('designer_config.actions.index.saveEvent.details'),
  22 + description: t('designer_config.actions.index.saveEvent.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TIMESERIES); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TIMESERIES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SaveTimeseriesDataType { 10 export interface SaveTimeseriesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const SaveTimeseriesConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const SaveTimeseriesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode', 16 clazz: 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'save timeseries', 18 + name: t('designer_config.actions.index.saveTimeseries.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.saveTimeseries.details'),
  22 + description: t('designer_config.actions.index.saveTimeseries.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TO_CUSTOM_TABLE); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SAVE_TO_CUSTOM_TABLE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SaveToCustomTableDataType { 10 export interface SaveToCustomTableDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const SaveToCustomTableConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const SaveToCustomTableConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbSaveToCustomCassandraTableNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbSaveToCustomCassandraTableNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'save to custom table', 18 + name: t('designer_config.actions.index.saveToCustomTable.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.saveToCustomTable.details'),
  22 + description: t('designer_config.actions.index.saveToCustomTable.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_END); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_END);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SynchronizationEndDataType { 10 export interface SynchronizationEndDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const SynchronizationEndConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const SynchronizationEndConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.transaction.TbSynchronizationEndNode', 16 clazz: 'org.thingsboard.rule.engine.transaction.TbSynchronizationEndNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'synchronization end', 18 + name: t('designer_config.actions.index.synchronizationEnd.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details: '',  
20 - description: 'This Node is now deprecated. Use "Checkpoint" instead.', 21 + details: t('designer_config.actions.index.synchronizationEnd.details'),
  22 + description: t('designer_config.actions.index.synchronizationEnd.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_START); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.SYNCHRONIZATION_START);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SynchronizationStartDataType { 10 export interface SynchronizationStartDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const SynchronizationStartConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const SynchronizationStartConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.transaction.TbSynchronizationBeginNode', 16 clazz: 'org.thingsboard.rule.engine.transaction.TbSynchronizationBeginNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'synchronization start', 18 + name: t('designer_config.actions.index.synchronizationStart.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.synchronizationStart.details'),
  22 + description: t('designer_config.actions.index.synchronizationStart.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ActionCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ActionCategoryComponentEnum.UNASSIGN_FROM_CUSTOMER); 7 const keys = useCreateNodeKey(ActionCategoryComponentEnum.UNASSIGN_FROM_CUSTOMER);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface UnassignFromCustomerDataType { 10 export interface UnassignFromCustomerDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const UnassignFromCustomerConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const UnassignFromCustomerConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.action.TbUnassignFromCustomerNode', 16 clazz: 'org.thingsboard.rule.engine.action.TbUnassignFromCustomerNode',
15 categoryType: RuleNodeTypeEnum.ACTION, 17 categoryType: RuleNodeTypeEnum.ACTION,
16 - name: 'unassign from customer', 18 + name: t('designer_config.actions.index.unassigFromCustomer.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.actions.index.unassigFromCustomer.details'),
  22 + description: t('designer_config.actions.index.unassigFromCustomer.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -22,13 +22,15 @@ import { SynchronizationStartConfig } from './SynchronizationStart'; @@ -22,13 +22,15 @@ import { SynchronizationStartConfig } from './SynchronizationStart';
22 import { SynchronizationEndConfig } from './SynchronizationEnd'; 22 import { SynchronizationEndConfig } from './SynchronizationEnd';
23 import { SaveAttributesConfig } from './SaveAttributes'; 23 import { SaveAttributesConfig } from './SaveAttributes';
24 import { CreateRelationConfig } from './CreateRelation'; 24 import { CreateRelationConfig } from './CreateRelation';
  25 +import { useI18n } from '/@/hooks/web/useI18n';
25 26
  27 +const { t } = useI18n(); //加载国际化
26 export const ActionCategoryConfig: CategoryConfigType = { 28 export const ActionCategoryConfig: CategoryConfigType = {
27 category: RuleNodeTypeEnum.ACTION, 29 category: RuleNodeTypeEnum.ACTION,
28 - title: '动作', 30 + title: t('designer_config.actions.index.title'),
29 backgroundColor: '#f1928f', 31 backgroundColor: '#f1928f',
30 icon: 'material-symbols:flash-on', 32 icon: 'material-symbols:flash-on',
31 - description: '执行特别动作', 33 + description: t('designer_config.actions.index.description'),
32 }; 34 };
33 35
34 export const ActionComponents: NodeItemConfigType[] = [ 36 export const ActionComponents: NodeItemConfigType[] = [
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CALCULATE_DELTA); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CALCULATE_DELTA);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CalculateDeltaDataType { 10 export interface CalculateDeltaDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const CalculateDeltaConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const CalculateDeltaConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.CalculateDeltaNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.CalculateDeltaNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'calculate delta', 18 + name: t('designer_config.enrichments.index.calculateDelta.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - "Calculates delta and period based on the previous time-series reading and current data. Delta calculation is done in scope of the message originator, e.g. device, asset or customer. If there is input key, the output relation will be 'Success' unless delta is negative and corresponding configuration parameter is set. If there is no input value key in the incoming message, the output relation will be 'Other'.",  
21 - description:  
22 - "Calculates and adds 'delta' value into message based on the incoming and previous value", 21 + details: t('designer_config.enrichments.index.calculateDelta.details'),
  22 + description: t('designer_config.enrichments.index.calculateDelta.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure', 'Other'], 25 relationTypes: ['Success', 'Failure', 'Other'],
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 import { NodeData } from '../../../types/node'; 5 import { NodeData } from '../../../types/node';
6 import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; 6 import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';
7 import { ref, unref } from 'vue'; 7 import { ref, unref } from 'vue';
8 - import { NodeBindDataFieldEnum } from '../../../enum/node'; 8 + // import { NodeBindDataFieldEnum } from '../../../enum/node';//之前导入的
  9 + import { CustomerAttributesFieldsEnum } from '../../../enum/formField/enrichment'; //ft修改属性集客户端属性点击切换Latest telemetry, Source telemetry未切换
9 10
10 defineProps<{ 11 defineProps<{
11 config: NodeData; 12 config: NodeData;
@@ -23,13 +24,13 @@ @@ -23,13 +24,13 @@
23 await validate(); 24 await validate();
24 const value = getFieldsValue() || {}; 25 const value = getFieldsValue() || {};
25 const attrMapping = unref(attributeControlElRef)?.getFieldsValue(); 26 const attrMapping = unref(attributeControlElRef)?.getFieldsValue();
26 - return { ...value, [NodeBindDataFieldEnum.ATTR_MAPING]: attrMapping }; 27 + return { ...value, [CustomerAttributesFieldsEnum.ATTR_MAPING]: attrMapping }; //ft修改枚举导入
27 }; 28 };
28 29
29 const setValue: CreateModalDefineExposeType['setFieldsValue'] = (value) => { 30 const setValue: CreateModalDefineExposeType['setFieldsValue'] = (value) => {
30 resetFields(); 31 resetFields();
31 setFieldsValue(value); 32 setFieldsValue(value);
32 - unref(attributeControlElRef)?.setFieldsValue(value?.[NodeBindDataFieldEnum.ATTR_MAPING]); 33 + unref(attributeControlElRef)?.setFieldsValue(value?.[CustomerAttributesFieldsEnum.ATTR_MAPING]); //ft修改枚举导入
33 }; 34 };
34 35
35 defineExpose({ 36 defineExpose({
@@ -41,10 +42,13 @@ @@ -41,10 +42,13 @@
41 <template> 42 <template>
42 <BasicForm @register="register"> 43 <BasicForm @register="register">
43 <template #attrMapping="{ field, model }"> 44 <template #attrMapping="{ field, model }">
  45 + <!-- ft修改枚举导入 -->
44 <AttributeConfiguration 46 <AttributeConfiguration
45 v-model:value="model[field]" 47 v-model:value="model[field]"
46 ref="attributeControlElRef" 48 ref="attributeControlElRef"
47 - :keyLabel="`Source ${model[NodeBindDataFieldEnum.TELEMETRY] ? 'telemetry' : 'attribute'}`" 49 + :keyLabel="`Source ${
  50 + model[CustomerAttributesFieldsEnum.TELEMETRY] ? 'telemetry' : 'attribute'
  51 + }`"
48 valueLabel="Target attribute" 52 valueLabel="Target attribute"
49 > 53 >
50 <template #afterForm> 54 <template #afterForm>
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_ATTRIBUTES); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CustomerAttributesDataType { 10 export interface CustomerAttributesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const CustomerAttributesConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const CustomerAttributesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetCustomerAttributeNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetCustomerAttributeNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'customer attributes', 18 + name: t('designer_config.enrichments.index.customerAttributes.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'If Attributes enrichment configured, server scope attributes are added into Message metadata. If Latest Telemetry enrichment configured, latest telemetry added into metadata. To access those attributes in other nodes this template can be used <code>metadata.temperature</code>.',  
21 - description: 'Add Originators Customer Attributes or Latest Telemetry into Message Metadata', 21 + details: t('designer_config.enrichments.index.customerAttributes.details'),
  22 + description: t('designer_config.enrichments.index.customerAttributes.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -10,6 +10,7 @@ export const formSchemas: FormSchema[] = [ @@ -10,6 +10,7 @@ export const formSchemas: FormSchema[] = [
10 field: CustomerDetailsFieldsEnum.DETAILS_LIST, 10 field: CustomerDetailsFieldsEnum.DETAILS_LIST,
11 component: 'Select', 11 component: 'Select',
12 label: CustomerDetailsFieldsNameEnum.DETAILS_LIST, 12 label: CustomerDetailsFieldsNameEnum.DETAILS_LIST,
  13 + required: true, //ft修改为必传
13 componentProps: { 14 componentProps: {
14 mode: 'multiple', 15 mode: 'multiple',
15 options: Object.keys(DetailsListEnum).map((item) => ({ 16 options: Object.keys(DetailsListEnum).map((item) => ({
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_DETAILS); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.CUSTOMER_DETAILS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CustomerDetailsDataType { 10 export interface CustomerDetailsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const CustomerDetailsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const CustomerDetailsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetCustomerDetailsNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetCustomerDetailsNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'customer details', 18 + name: t('designer_config.enrichments.index.customerDetails.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 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 Customer, 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 Customer details to the message body or metadata', 21 + details: t('designer_config.enrichments.index.customerDetails.details'),
  22 + description: t('designer_config.enrichments.index.customerDetails.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_ATTRIBUTES); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface OriginatorAttributesDataType { 10 export interface OriginatorAttributesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const OriginatorAttributesConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const OriginatorAttributesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetAttributesNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetAttributesNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'originator attributes', 18 + name: t('designer_config.enrichments.index.originatorAttributes.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'If Attributes enrichment configured, <b>CLIENT/SHARED/SERVER</b> attributes are added into Message metadata with specific prefix: <i>cs/shared/ss</i>. Latest telemetry value added into metadata without prefix. To access those attributes in other nodes this template can be used <code>metadata.cs_temperature</code> or <code>metadata.shared_limit</code> ',  
21 - description: 'Add Message Originator Attributes or Latest Telemetry into Message Metadata', 21 + details: t('designer_config.enrichments.index.originatorAttributes.details'),
  22 + description: t('designer_config.enrichments.index.originatorAttributes.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 import { NodeData } from '../../../types/node'; 5 import { NodeData } from '../../../types/node';
6 import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; 6 import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';
7 import { ref, unref } from 'vue'; 7 import { ref, unref } from 'vue';
8 - import { NodeBindDataFieldEnum } from '../../../enum/node'; 8 + // import { NodeBindDataFieldEnum } from '../../../enum/node';
  9 + import { OriginatorFieldsEnum } from '../../../enum/formField/enrichment'; //ft修改枚举导入
9 10
10 defineProps<{ 11 defineProps<{
11 config: NodeData; 12 config: NodeData;
@@ -23,13 +24,13 @@ @@ -23,13 +24,13 @@
23 await validate(); 24 await validate();
24 const value = getFieldsValue() || {}; 25 const value = getFieldsValue() || {};
25 const fieldsMapping = unref(fieldControlElRef)?.getFieldsValue(); 26 const fieldsMapping = unref(fieldControlElRef)?.getFieldsValue();
26 - return { ...value, [NodeBindDataFieldEnum.FIELDS_MAPPING]: fieldsMapping }; 27 + return { ...value, [OriginatorFieldsEnum.FIELDS_MAPPING]: fieldsMapping }; //ft修改枚举导入
27 }; 28 };
28 29
29 const setValue: CreateModalDefineExposeType['setFieldsValue'] = (value) => { 30 const setValue: CreateModalDefineExposeType['setFieldsValue'] = (value) => {
30 resetFields(); 31 resetFields();
31 setFieldsValue(value); 32 setFieldsValue(value);
32 - unref(fieldControlElRef)?.setFieldsValue(value?.[NodeBindDataFieldEnum.FIELDS_MAPPING]); 33 + unref(fieldControlElRef)?.setFieldsValue(value?.[OriginatorFieldsEnum.FIELDS_MAPPING]); //ft修改枚举导入
33 }; 34 };
34 35
35 defineExpose({ 36 defineExpose({
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_FIELDS); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_FIELDS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface OriginatorFieldsDataType { 10 export interface OriginatorFieldsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const OriginatorFieldsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const OriginatorFieldsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetOriginatorFieldsNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetOriginatorFieldsNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'originator fields', 18 + name: t('designer_config.enrichments.index.originatorFields.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'Will fetch fields values specified in mapping. If specified field is not part of originator fields it will be ignored.',  
21 - description: 'Add Message Originator fields values into Message Metadata', 21 + details: t('designer_config.enrichments.index.originatorFields.details'),
  22 + description: t('designer_config.enrichments.index.originatorFields.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_TELEMETRY); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.ORIGINATOR_TELEMETRY);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface OriginatorTelemetryDataType { 10 export interface OriginatorTelemetryDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const OriginatorTelemetryConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const OriginatorTelemetryConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTelemetryNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTelemetryNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'originator telemetry', 18 + name: t('designer_config.enrichments.index.originatorTelemetry.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'The node allows you to select fetch mode: <b>FIRST/LAST/ALL</b> to fetch telemetry of certain time range that are added into Message metadata without any prefix. If selected fetch mode <b>ALL</b> Telemetry will be added like array into Message Metadata where <b>key</b> is Timestamp and <b>value</b> is value of Telemetry.</br>If selected fetch mode <b>FIRST</b> or <b>LAST</b> Telemetry will be added like string without Timestamp.</br>Also, the rule node allows you to select telemetry sampling order: <b>ASC</b> or <b>DESC</b>. </br>Aggregation feature allows you to fetch aggregated telemetry as a single value by <b>AVG, COUNT, SUM, MIN, MAX, NONE</b>. </br><b>Note</b>: The maximum size of the fetched array is 1000 records.\n ',  
21 - description:  
22 - 'Add Message Originator Telemetry for selected time range into Message Metadata\n', 21 + details: t('designer_config.enrichments.index.originatorTelemetry.details'),
  22 + description: t('designer_config.enrichments.index.originatorTelemetry.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_ATTRIBUTES); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface RelatedAttributesDataType { 10 export interface RelatedAttributesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const RelatedAttributesConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const RelatedAttributesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetRelatedAttributeNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetRelatedAttributeNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'related attributes', 18 + name: t('designer_config.enrichments.index.relatedAttributes.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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 for attributes enrichment, other entities are discarded. If Attributes enrichment configured, server scope attributes are added into Message metadata. If Latest Telemetry enrichment configured, latest telemetry added into metadata. To access those attributes in other nodes this template can be used <code>metadata.temperature</code>.',  
21 - description:  
22 - 'Add Originators Related Entity Attributes or Latest Telemetry into Message Metadata', 21 + details: t('designer_config.enrichments.index.relatedAttributes.details'),
  22 + description: t('designer_config.enrichments.index.relatedAttributes.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_DEVICE_ATTRIBUTES); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.RELATED_DEVICE_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface RelatedDeviceAttributesDataType { 10 export interface RelatedDeviceAttributesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,13 +15,11 @@ export const RelatedDeviceAttributesConfig: NodeItemConfigType = { @@ -13,13 +15,11 @@ export const RelatedDeviceAttributesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetDeviceAttrNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetDeviceAttrNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'related device attributes', 18 + name: t('designer_config.enrichments.index.relatedDeviceAttributes.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'If Attributes enrichment configured, <b>CLIENT/SHARED/SERVER</b> attributes are added into Message metadata with specific prefix: <i>cs/shared/ss</i>. Latest telemetry value added into metadata without prefix. To access those attributes in other nodes this template can be used <code>metadata.cs_temperature</code> or <code>metadata.shared_limit</code> ',  
21 - description:  
22 - 'Add Originators Related Device Attributes and Latest Telemetry value into Message Metadata', 21 + details: t('designer_config.enrichments.index.relatedDeviceAttributes.details'),
  22 + description: t('designer_config.enrichments.index.relatedDeviceAttributes.description'),
23 inEnabled: true, 23 inEnabled: true,
24 outEnabled: true, 24 outEnabled: true,
25 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 import { NodeData } from '../../../types/node'; 5 import { NodeData } from '../../../types/node';
6 import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration'; 6 import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';
7 import { ref, unref } from 'vue'; 7 import { ref, unref } from 'vue';
8 - import { NodeBindDataFieldEnum } from '../../../enum/node'; 8 + // import { NodeBindDataFieldEnum } from '../../../enum/node';
  9 + import { CustomerAttributesFieldsEnum } from '../../../enum/formField/enrichment'; //ft修改枚举导入
9 10
10 defineProps<{ 11 defineProps<{
11 config: NodeData; 12 config: NodeData;
@@ -23,13 +24,13 @@ @@ -23,13 +24,13 @@
23 await validate(); 24 await validate();
24 const value = getFieldsValue() || {}; 25 const value = getFieldsValue() || {};
25 const attrMapping = unref(attributeControlElRef)?.getFieldsValue(); 26 const attrMapping = unref(attributeControlElRef)?.getFieldsValue();
26 - return { ...value, [NodeBindDataFieldEnum.ATTR_MAPING]: attrMapping }; 27 + return { ...value, [CustomerAttributesFieldsEnum.ATTR_MAPING]: attrMapping }; //ft修改枚举导入
27 }; 28 };
28 29
29 const setValue: CreateModalDefineExposeType['setFieldsValue'] = (value) => { 30 const setValue: CreateModalDefineExposeType['setFieldsValue'] = (value) => {
30 resetFields(); 31 resetFields();
31 setFieldsValue(value); 32 setFieldsValue(value);
32 - unref(attributeControlElRef)?.setFieldsValue(value?.[NodeBindDataFieldEnum.ATTR_MAPING]); 33 + unref(attributeControlElRef)?.setFieldsValue(value?.[CustomerAttributesFieldsEnum.ATTR_MAPING]); //ft修改枚举导入
33 }; 34 };
34 35
35 defineExpose({ 36 defineExpose({
@@ -44,7 +45,9 @@ @@ -44,7 +45,9 @@
44 <AttributeConfiguration 45 <AttributeConfiguration
45 v-model:value="model[field]" 46 v-model:value="model[field]"
46 ref="attributeControlElRef" 47 ref="attributeControlElRef"
47 - :keyLabel="`Source ${model[NodeBindDataFieldEnum.TELEMETRY] ? 'telemetry' : 'attribute'}`" 48 + :keyLabel="`Source ${
  49 + model[CustomerAttributesFieldsEnum.TELEMETRY] ? 'telemetry' : 'attribute'
  50 + }`"
48 valueLabel="Target attribute" 51 valueLabel="Target attribute"
49 > 52 >
50 <template #afterForm> 53 <template #afterForm>
@@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_ATTRIBUTES); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_ATTRIBUTES);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface TenantAttributesDataType { 10 export interface TenantAttributesDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const TenantAttributesConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const TenantAttributesConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTenantAttributeNode', 16 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTenantAttributeNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 17 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'tenant attributes', 18 + name: t('designer_config.enrichments.index.tenantAttributes.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'If Attributes enrichment configured, server scope attributes are added into Message metadata. If Latest Telemetry enrichment configured, latest telemetry added into metadata. To access those attributes in other nodes this template can be used <code>metadata.temperature</code>.',  
21 - description: 'Add Originators Tenant Attributes or Latest Telemetry into Message Metadata', 21 + details: t('designer_config.enrichments.index.tenantAttributes.details'),
  22 + description: t('designer_config.enrichments.index.tenantAttributes.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,12 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_DETAILS); 7 const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_DETAILS);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface TenantDetailsDataType { 11 export interface TenantDetailsDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,12 +16,11 @@ export const TenantDetailsConfig: NodeItemConfigType = { @@ -13,12 +16,11 @@ export const TenantDetailsConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTenantDetailsNode', 17 clazz: 'org.thingsboard.rule.engine.metadata.TbGetTenantDetailsNode',
15 categoryType: RuleNodeTypeEnum.ENRICHMENT, 18 categoryType: RuleNodeTypeEnum.ENRICHMENT,
16 - name: 'tenant details', 19 + name: t('designer_config.enrichments.index.tenantDetails.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.enrichments.index.tenantDetails.details'),
  23 + description: t('designer_config.enrichments.index.tenantDetails.description'),
22 inEnabled: true, 24 inEnabled: true,
23 outEnabled: true, 25 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 26 relationTypes: ['Success', 'Failure'],
@@ -10,13 +10,15 @@ import { RelatedAttributesConfig } from './RelatedAttributes'; @@ -10,13 +10,15 @@ import { RelatedAttributesConfig } from './RelatedAttributes';
10 import { TenantDetailsConfig } from './TenantDetails'; 10 import { TenantDetailsConfig } from './TenantDetails';
11 import { OriginatorAttributesConfig } from './OriginatorAttributes'; 11 import { OriginatorAttributesConfig } from './OriginatorAttributes';
12 import { CustomerDetailsConfig } from './CustomerDetails'; 12 import { CustomerDetailsConfig } from './CustomerDetails';
  13 +import { useI18n } from '/@/hooks/web/useI18n';
13 14
  15 +const { t } = useI18n(); //加载国际化
14 export const EnrichmentCategoryConfig: CategoryConfigType = { 16 export const EnrichmentCategoryConfig: CategoryConfigType = {
15 category: RuleNodeTypeEnum.ENRICHMENT, 17 category: RuleNodeTypeEnum.ENRICHMENT,
16 - title: '属性集', 18 + title: t('designer_config.enrichments.index.title'),
17 backgroundColor: '#cdf14e', 19 backgroundColor: '#cdf14e',
18 icon: 'ic:round-playlist-add', 20 icon: 'ic:round-playlist-add',
19 - description: '向消息元数据中添加附加信息', 21 + description: t('designer_config.enrichments.index.description'),
20 }; 22 };
21 23
22 export const EnrichmentComponents: NodeItemConfigType[] = [ 24 export const EnrichmentComponents: NodeItemConfigType[] = [
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.ALARM_NOTICE); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.ALARM_NOTICE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface AlarmNoticeDataType { 10 export interface AlarmNoticeDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const AlarmNoticeConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const AlarmNoticeConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.notice.AlarmNoticeNode', 16 clazz: 'org.thingsboard.rule.engine.notice.AlarmNoticeNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'alarm notice', 18 + name: t('designer_config.externals.index.alarmNotice.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details: 'notice method include sms,email and so on.',  
20 - description: 'while device alarm, notice some people.', 21 + details: t('designer_config.externals.index.alarmNotice.details'),
  22 + description: t('designer_config.externals.index.alarmNotice.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SNS); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SNS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface AwsSnsDataType { 10 export interface AwsSnsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const AwsSnsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const AwsSnsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.aws.sns.TbSnsNode', 16 clazz: 'org.thingsboard.rule.engine.aws.sns.TbSnsNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'aws sns', 18 + name: t('designer_config.externals.index.awsSns.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.awsSns.details'),
  22 + description: t('designer_config.externals.index.awsSns.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SQS); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AWS_SQS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface AwsSqsDataType { 10 export interface AwsSqsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const AwsSqsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const AwsSqsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.aws.sqs.TbSqsNode', 16 clazz: 'org.thingsboard.rule.engine.aws.sqs.TbSqsNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'aws sqs', 18 + name: t('designer_config.externals.index.awsSqs.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.awsSqs.details'),
  22 + description: t('designer_config.externals.index.awsSqs.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AZURE_IOT_HUB); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.AZURE_IOT_HUB);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface AzureIotHubDataType { 10 export interface AzureIotHubDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const AzureIotHubConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const AzureIotHubConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.mqtt.azure.TbAzureIotHubNode', 16 clazz: 'org.thingsboard.rule.engine.mqtt.azure.TbAzureIotHubNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'azure iot hub', 18 + name: t('designer_config.externals.index.azureIotHub.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.azureIotHub.details'),
  22 + description: t('designer_config.externals.index.azureIotHub.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.GCP_PUBSUB); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.GCP_PUBSUB);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface GcpPubsubDataType { 10 export interface GcpPubsubDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const GcpPubsubConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const GcpPubsubConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.gcp.pubsub.TbPubSubNode', 16 clazz: 'org.thingsboard.rule.engine.gcp.pubsub.TbPubSubNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'gcp pubsub', 18 + name: t('designer_config.externals.index.gcpPubsub.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.gcpPubsub.details'),
  22 + description: t('designer_config.externals.index.gcpPubsub.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.KAFKA); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.KAFKA);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface KafkaDataType { 10 export interface KafkaDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const KafkaConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const KafkaConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.kafka.TbKafkaNode', 16 clazz: 'org.thingsboard.rule.engine.kafka.TbKafkaNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'kafka', 18 + name: t('designer_config.externals.index.kafka.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.kafka.details'),
  22 + description: t('designer_config.externals.index.kafka.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.MQTT); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.MQTT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface MqttDataType { 10 export interface MqttDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const MqttConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const MqttConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.mqtt.TbMqttNode', 16 clazz: 'org.thingsboard.rule.engine.mqtt.TbMqttNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'mqtt', 18 + name: t('designer_config.externals.index.mqtt.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.mqtt.details'),
  22 + description: t('designer_config.externals.index.mqtt.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,12 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.RABBITMQ); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.RABBITMQ);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface RabbitmqDataType { 11 export interface RabbitmqDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,11 +16,11 @@ export const RabbitmqConfig: NodeItemConfigType = { @@ -13,11 +16,11 @@ export const RabbitmqConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.rabbitmq.TbRabbitMqNode', 17 clazz: 'org.thingsboard.rule.engine.rabbitmq.TbRabbitMqNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 18 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'rabbitmq', 19 + name: t('designer_config.externals.index.rabbitmq.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 21 nodeDefinition: {
19 - details: 'Will publish message payload to RabbitMQ queue.',  
20 - description: 'Publish messages to the RabbitMQ', 22 + details: t('designer_config.externals.index.rabbitmq.details'),
  23 + description: t('designer_config.externals.index.rabbitmq.description'),
21 inEnabled: true, 24 inEnabled: true,
22 outEnabled: true, 25 outEnabled: true,
23 relationTypes: ['Success', 'Failure'], 26 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.REST_API_CALL); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.REST_API_CALL);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface RestApiCallDataType { 10 export interface RestApiCallDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const RestApiCallConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const RestApiCallConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.rest.TbRestApiCallNode', 16 clazz: 'org.thingsboard.rule.engine.rest.TbRestApiCallNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'rest api call', 18 + name: t('designer_config.externals.index.restApiCall.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.restApiCall.details'),
  22 + description: t('designer_config.externals.index.restApiCall.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_EMAIL); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_EMAIL);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SendEmailDataType { 10 export interface SendEmailDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const SendEmailConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const SendEmailConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.mail.TbSendEmailNode', 16 clazz: 'org.thingsboard.rule.engine.mail.TbSendEmailNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'send email', 18 + name: t('designer_config.externals.index.sendEmail.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.sendEmail.details'),
  22 + description: t('designer_config.externals.index.sendEmail.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { ExternalCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_SMS); 7 const keys = useCreateNodeKey(ExternalCategoryComponentEnum.SEND_SMS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SendSmsDataType { 10 export interface SendSmsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const SendSmsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const SendSmsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.sms.TbSendSmsNode', 16 clazz: 'org.thingsboard.rule.engine.sms.TbSendSmsNode',
15 categoryType: RuleNodeTypeEnum.EXTERNAL, 17 categoryType: RuleNodeTypeEnum.EXTERNAL,
16 - name: 'send sms', 18 + name: t('designer_config.externals.index.sendSms.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.externals.index.sendSms.details'),
  22 + description: t('designer_config.externals.index.sendSms.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -11,13 +11,15 @@ import { AwsSnsConfig } from './AwsSns'; @@ -11,13 +11,15 @@ import { AwsSnsConfig } from './AwsSns';
11 import { SendEmailConfig } from './SendEmail'; 11 import { SendEmailConfig } from './SendEmail';
12 import { RabbitmqConfig } from './Rabbitmq'; 12 import { RabbitmqConfig } from './Rabbitmq';
13 import { AwsSqsConfig } from './AwsSqs'; 13 import { AwsSqsConfig } from './AwsSqs';
  14 +import { useI18n } from '/@/hooks/web/useI18n';
14 15
  16 +const { t } = useI18n(); //加载国际化
15 export const ExternalCategoryConfig: CategoryConfigType = { 17 export const ExternalCategoryConfig: CategoryConfigType = {
16 category: RuleNodeTypeEnum.EXTERNAL, 18 category: RuleNodeTypeEnum.EXTERNAL,
17 - title: '外部的', 19 + title: t('designer_config.externals.index.title'),
18 backgroundColor: '#fbc766', 20 backgroundColor: '#fbc766',
19 icon: 'material-symbols:cloud-upload', 21 icon: 'material-symbols:cloud-upload',
20 - description: '与外部系统交互', 22 + description: t('designer_config.externals.index.description'),
21 }; 23 };
22 24
23 export const ExternalComponents: NodeItemConfigType[] = [ 25 export const ExternalComponents: NodeItemConfigType[] = [
@@ -3,9 +3,11 @@ import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; @@ -3,9 +3,11 @@ import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
5 import { AlarmStatus } from '/@/enums/alarmEnum'; 5 import { AlarmStatus } from '/@/enums/alarmEnum';
  6 +import { useI18n } from '/@/hooks/web/useI18n';
6 7
7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_ALARM_STATUS); 8 const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_ALARM_STATUS);
8 9
  10 +const { t } = useI18n(); //加载国际化
9 export interface CheckAlarmStatusDataType { 11 export interface CheckAlarmStatusDataType {
10 alarmStatusList: AlarmStatus[]; 12 alarmStatusList: AlarmStatus[];
11 } 13 }
@@ -14,13 +16,12 @@ export const CheckAlarmStatusConfig: NodeItemConfigType = { @@ -14,13 +16,12 @@ export const CheckAlarmStatusConfig: NodeItemConfigType = {
14 ...keys, 16 ...keys,
15 clazz: 'org.thingsboard.rule.engine.filter.TbCheckAlarmStatusNode', 17 clazz: 'org.thingsboard.rule.engine.filter.TbCheckAlarmStatusNode',
16 categoryType: RuleNodeTypeEnum.FILTER, 18 categoryType: RuleNodeTypeEnum.FILTER,
17 - name: 'check alarm status', 19 + name: t('designer_config.filters.index.checkAlarmStatus.name'),
18 configurationDescriptor: { 20 configurationDescriptor: {
19 nodeDefinition: { 21 nodeDefinition: {
20 icon: 'material-symbols:filter-list', 22 icon: 'material-symbols:filter-list',
21 - details:  
22 - 'If the alarm status matches the specified one - msg is success if does not match - msg is failure.',  
23 - description: 'Checks alarm status.', 23 + details: t('designer_config.filters.index.checkAlarmStatus.details'),
  24 + description: t('designer_config.filters.index.checkAlarmStatus.description'),
24 inEnabled: true, 25 inEnabled: true,
25 outEnabled: true, 26 outEnabled: true,
26 relationTypes: ['True', 'False', 'Failure'], 27 relationTypes: ['True', 'False', 'Failure'],
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_EXISTENCE_FIELDS); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_EXISTENCE_FIELDS);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CheckExistenceFieldsDataType { 10 export interface CheckExistenceFieldsDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const CheckExistenceFieldsConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const CheckExistenceFieldsConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbCheckMessageNode', 16 clazz: 'org.thingsboard.rule.engine.filter.TbCheckMessageNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'check existence fields', 18 + name: t('designer_config.filters.index.checkExistenceFields.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - "If selected checkbox 'Check that all selected keys are present'\" and all keys in message data and metadata are exist - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.\nElse if the checkbox is not selected, and at least one of the keys from data or metadata of the message exists - send Message via <b>True</b> chain, otherwise, <b>False</b> chain is used. ",  
21 - description: 'Checks the existence of the selected keys from message data and metadata.', 21 + details: t('designer_config.filters.index.checkExistenceFields.details'),
  22 + description: t('designer_config.filters.index.checkExistenceFields.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['True', 'False', 'Failure'], 25 relationTypes: ['True', 'False', 'Failure'],
@@ -98,6 +98,7 @@ export const formSchemas: FormSchema[] = [ @@ -98,6 +98,7 @@ export const formSchemas: FormSchema[] = [
98 }, 98 },
99 }; 99 };
100 }, 100 },
  101 + ifShow: ({ values }) => values[CheckRelationFieldsEnum.CHECK_FOR_SINGLE_ENTITY],
101 }, 102 },
102 { 103 {
103 field: CheckRelationFieldsEnum.ENTITY_ID, 104 field: CheckRelationFieldsEnum.ENTITY_ID,
@@ -110,6 +111,7 @@ export const formSchemas: FormSchema[] = [ @@ -110,6 +111,7 @@ export const formSchemas: FormSchema[] = [
110 111
111 return getEntityIdSelect(entityType); 112 return getEntityIdSelect(entityType);
112 }, 113 },
  114 + ifShow: ({ values }) => values[CheckRelationFieldsEnum.CHECK_FOR_SINGLE_ENTITY],
113 }, 115 },
114 { 116 {
115 field: CheckRelationFieldsEnum.RELEATION_TYPE, 117 field: CheckRelationFieldsEnum.RELEATION_TYPE,
@@ -2,9 +2,12 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_RELATION); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.CHECK_RELATION);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface CheckRelationDataType { 11 export interface CheckRelationDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,13 +16,11 @@ export const CheckRelationConfig: NodeItemConfigType = { @@ -13,13 +16,11 @@ export const CheckRelationConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbCheckRelationNode', 17 clazz: 'org.thingsboard.rule.engine.filter.TbCheckRelationNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 18 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'check relation', 19 + name: t('designer_config.filters.index.checkRelation.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 21 nodeDefinition: {
19 - details:  
20 - 'If at least one relation exists - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.',  
21 - description:  
22 - "Checks the relation from the selected entity to the originator of the message by type and direction if 'Check for single entity' is set to true, otherwise rule node will check if exist any relation to the originator of the message by type and direction.", 22 + details: t('designer_config.filters.index.checkRelation.details'),
  23 + description: t('designer_config.filters.index.checkRelation.description'),
23 inEnabled: true, 24 inEnabled: true,
24 outEnabled: true, 25 outEnabled: true,
25 relationTypes: ['True', 'False', 'Failure'], 26 relationTypes: ['True', 'False', 'Failure'],
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.GPS_GEOFENCING_FILTER); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.GPS_GEOFENCING_FILTER);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface GpsGeofencingFilterDataType { 10 export interface GpsGeofencingFilterDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const GpsGeofencingFilterConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const GpsGeofencingFilterConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.geo.TbGpsGeofencingFilterNode', 16 clazz: 'org.thingsboard.rule.engine.geo.TbGpsGeofencingFilterNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'gps geofencing filter', 18 + name: t('designer_config.filters.index.gpsGeofencingFilter.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - "Extracts latitude and longitude parameters from incoming message and returns 'True' if they are inside configured perimeters, 'False' otherwise.",  
21 - description: 'Filter incoming messages by GPS based geofencing', 21 + details: t('designer_config.filters.index.gpsGeofencingFilter.details'),
  22 + description: t('designer_config.filters.index.gpsGeofencingFilter.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['True', 'False', 'Failure'], 25 relationTypes: ['True', 'False', 'Failure'],
@@ -2,9 +2,12 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,12 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.MESSAGE_TYPE); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.MESSAGE_TYPE);
7 8
  9 +const { t } = useI18n(); //加载国际化
  10 +
8 export interface MessageTypeDataType { 11 export interface MessageTypeDataType {
9 someConfiguration?: Recordable; 12 someConfiguration?: Recordable;
10 } 13 }
@@ -13,12 +16,11 @@ export const MessageTypeConfig: NodeItemConfigType = { @@ -13,12 +16,11 @@ export const MessageTypeConfig: NodeItemConfigType = {
13 ...keys, 16 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbMsgTypeFilterNode', 17 clazz: 'org.thingsboard.rule.engine.filter.TbMsgTypeFilterNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 18 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'message type', 19 + name: t('designer_config.filters.index.messageType.name'),
17 configurationDescriptor: { 20 configurationDescriptor: {
18 nodeDefinition: { 21 nodeDefinition: {
19 - details:  
20 - 'If incoming MessageType is expected - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.',  
21 - description: 'Filter incoming messages by Message Type', 22 + details: t('designer_config.filters.index.messageType.details'),
  23 + description: t('designer_config.filters.index.messageType.description'),
22 inEnabled: true, 24 inEnabled: true,
23 outEnabled: true, 25 outEnabled: true,
24 relationTypes: ['True', 'False', 'Failure'], 26 relationTypes: ['True', 'False', 'Failure'],
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.MESSAGE_TYPE_SWITCH); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.MESSAGE_TYPE_SWITCH);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface MessageTypeSwitchDataType { 10 export interface MessageTypeSwitchDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const MessageTypeSwitchConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const MessageTypeSwitchConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode', 16 clazz: 'org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'message type switch', 18 + name: t('designer_config.filters.index.messageTypeSwitch.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'Sends messages with message types <b>"Post attributes", "Post telemetry", "RPC Request"</b> etc. via corresponding chain, otherwise <b>Other</b> chain is used.',  
21 - description: 'Route incoming messages by Message Type', 21 + details: t('designer_config.filters.index.messageTypeSwitch.details'),
  22 + description: t('designer_config.filters.index.messageTypeSwitch.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: [ 25 relationTypes: [
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.ORIGINATOR_TYPE); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.ORIGINATOR_TYPE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface OriginatorTypeDataType { 10 export interface OriginatorTypeDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const OriginatorTypeConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const OriginatorTypeConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbOriginatorTypeFilterNode', 16 clazz: 'org.thingsboard.rule.engine.filter.TbOriginatorTypeFilterNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'originator type', 18 + name: t('designer_config.filters.index.originatorType.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - 'If Originator Type of incoming message is expected - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.',  
21 - description: 'Filter incoming messages by message Originator Type', 21 + details: t('designer_config.filters.index.originatorType.details'),
  22 + description: t('designer_config.filters.index.originatorType.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['True', 'False', 'Failure'], 25 relationTypes: ['True', 'False', 'Failure'],
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.ORIGINATOR_TYPE_SWITCH); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.ORIGINATOR_TYPE_SWITCH);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface OriginatorTypeSwitchDataType { 10 export interface OriginatorTypeSwitchDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const OriginatorTypeSwitchConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const OriginatorTypeSwitchConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbOriginatorTypeSwitchNode', 16 clazz: 'org.thingsboard.rule.engine.filter.TbOriginatorTypeSwitchNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'originator type switch', 18 + name: t('designer_config.filters.index.originatorTypeSwitch.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - "Routes messages to chain according to the originator type ('Device', 'Asset', etc.).",  
21 - description: 'Route incoming messages by Message Originator Type', 21 + details: t('designer_config.filters.index.originatorTypeSwitch.details'),
  22 + description: t('designer_config.filters.index.originatorTypeSwitch.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: [ 25 relationTypes: [
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.SCENE_REACT); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.SCENE_REACT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SceneReactDataType { 10 export interface SceneReactDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,11 +15,11 @@ export const SceneReactConfig: NodeItemConfigType = { @@ -13,11 +15,11 @@ export const SceneReactConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.yunteng.scene.TbSceneReactNode', 16 clazz: 'org.thingsboard.rule.engine.yunteng.scene.TbSceneReactNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'scene react', 18 + name: t('designer_config.filters.index.sceneReact.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details: '基于业务场景,实现设备的交互控制。',  
20 - description: '基于业务场景,实现设备的交互控制。', 21 + details: t('designer_config.filters.index.sceneReact.details'),
  22 + description: t('designer_config.filters.index.sceneReact.description'),
21 inEnabled: true, 23 inEnabled: true,
22 outEnabled: true, 24 outEnabled: true,
23 relationTypes: ['Message', 'Alarm Created', 'Alarm Updated', 'RPC Request', 'Failure'], 25 relationTypes: ['Message', 'Alarm Created', 'Alarm Updated', 'RPC Request', 'Failure'],
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.SCRIPT); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.SCRIPT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface ScriptDataType { 10 export interface ScriptDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const ScriptConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const ScriptConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbJsFilterNode', 16 clazz: 'org.thingsboard.rule.engine.filter.TbJsFilterNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'script', 18 + name: t('designer_config.filters.index.script.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - "Evaluate incoming Message with configured JS condition. If <b>True</b> - send Message via <b>True</b> chain, otherwise <b>False</b> chain is used.Message payload can be accessed via <code>msg</code> property. For example <code>msg.temperature < 10;</code><br/>Message metadata can be accessed via <code>metadata</code> property. For example <code>metadata.customerName === 'John';</code><br/>Message type can be accessed via <code>msgType</code> property.",  
21 - description: 'Filter incoming messages using JS script', 21 + details: t('designer_config.filters.index.script.details'),
  22 + description: t('designer_config.filters.index.script.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['True', 'False', 'Failure'], 25 relationTypes: ['True', 'False', 'Failure'],
@@ -16,8 +16,7 @@ export const formSchemas: FormSchema[] = [ @@ -16,8 +16,7 @@ export const formSchemas: FormSchema[] = [
16 javaScriptEditorProps: { 16 javaScriptEditorProps: {
17 height: 230, 17 height: 230,
18 functionName: 'Switch', 18 functionName: 'Switch',
19 - scriptType: 'switch',  
20 - paramsName: ['msg', 'metadata', 'mstType'], 19 + paramsName: ['msg', 'metadata', 'msgType'],
21 }, 20 },
22 }, 21 },
23 renderComponentContent: () => { 22 renderComponentContent: () => {
@@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FilterCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FilterCategoryComponentEnum.SWITCH); 7 const keys = useCreateNodeKey(FilterCategoryComponentEnum.SWITCH);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface SwitchDataType { 10 export interface SwitchDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const SwitchConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const SwitchConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.filter.TbJsSwitchNode', 16 clazz: 'org.thingsboard.rule.engine.filter.TbJsSwitchNode',
15 categoryType: RuleNodeTypeEnum.FILTER, 17 categoryType: RuleNodeTypeEnum.FILTER,
16 - name: 'switch', 18 + name: t('designer_config.filters.index.switch.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 20 nodeDefinition: {
19 - details:  
20 - "Node executes configured JS script. Script should return array of next Chain names where Message should be routed. If Array is empty - message not routed to next Node. Message payload can be accessed via <code>msg</code> property. For example <code>msg.temperature < 10;</code><br/>Message metadata can be accessed via <code>metadata</code> property. For example <code>metadata.customerName === 'John';</code><br/>Message type can be accessed via <code>msgType</code> property.",  
21 - description: 'Route incoming Message to one or multiple output chains', 21 + details: t('designer_config.filters.index.switch.details'),
  22 + description: t('designer_config.filters.index.switch.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Failure'], 25 relationTypes: ['Failure'],
@@ -11,13 +11,15 @@ import { MessageTypeSwitchConfig } from './MessageTypeSwitch'; @@ -11,13 +11,15 @@ import { MessageTypeSwitchConfig } from './MessageTypeSwitch';
11 import { SwitchConfig } from './Switch'; 11 import { SwitchConfig } from './Switch';
12 import { GpsGeofencingFilterConfig } from './GpsGeofencingFilter'; 12 import { GpsGeofencingFilterConfig } from './GpsGeofencingFilter';
13 import { CheckAlarmStatusConfig } from './CheckAlarmStatus'; 13 import { CheckAlarmStatusConfig } from './CheckAlarmStatus';
  14 +import { useI18n } from '/@/hooks/web/useI18n';
14 15
  16 +const { t } = useI18n(); //加载国际化
15 export const FilterCategoryConfig: CategoryConfigType = { 17 export const FilterCategoryConfig: CategoryConfigType = {
16 category: RuleNodeTypeEnum.FILTER, 18 category: RuleNodeTypeEnum.FILTER,
17 - title: '筛选器', 19 + title: t('designer_config.filters.index.title'),
18 icon: 'material-symbols:filter-list', 20 icon: 'material-symbols:filter-list',
19 backgroundColor: '#ede550', 21 backgroundColor: '#ede550',
20 - description: '使用配置条件筛选传入消息', 22 + description: t('designer_config.filters.index.description'),
21 }; 23 };
22 24
23 export const FilterComponents: NodeItemConfigType[] = [ 25 export const FilterComponents: NodeItemConfigType[] = [
@@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FlowCategoryComponentEnum.ACKNOWLEDGE); 7 const keys = useCreateNodeKey(FlowCategoryComponentEnum.ACKNOWLEDGE);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface AcknowledgeDataType { 10 export interface AcknowledgeDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const AcknowledgeConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const AcknowledgeConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.flow.TbAckNode', 16 clazz: 'org.thingsboard.rule.engine.flow.TbAckNode',
15 categoryType: RuleNodeTypeEnum.FLOW, 17 categoryType: RuleNodeTypeEnum.FLOW,
16 - name: 'acknowledge', 18 + name: t('designer_config.flows.index.acknowledge.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.flows.index.acknowledge.details'),
  22 + description: t('designer_config.flows.index.acknowledge.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],
@@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category'; @@ -2,9 +2,11 @@ import { FlowCategoryComponentEnum } from '../../../enum/category';
2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey'; 2 import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
3 import type { NodeItemConfigType } from '../../../types/node'; 3 import type { NodeItemConfigType } from '../../../types/node';
4 import { RuleNodeTypeEnum } from '../../index.type'; 4 import { RuleNodeTypeEnum } from '../../index.type';
  5 +import { useI18n } from '/@/hooks/web/useI18n';
5 6
6 const keys = useCreateNodeKey(FlowCategoryComponentEnum.CHECKPOINT); 7 const keys = useCreateNodeKey(FlowCategoryComponentEnum.CHECKPOINT);
7 8
  9 +const { t } = useI18n(); //加载国际化
8 export interface CheckpointDataType { 10 export interface CheckpointDataType {
9 someConfiguration?: Recordable; 11 someConfiguration?: Recordable;
10 } 12 }
@@ -13,12 +15,11 @@ export const CheckpointConfig: NodeItemConfigType = { @@ -13,12 +15,11 @@ export const CheckpointConfig: NodeItemConfigType = {
13 ...keys, 15 ...keys,
14 clazz: 'org.thingsboard.rule.engine.flow.TbCheckpointNode', 16 clazz: 'org.thingsboard.rule.engine.flow.TbCheckpointNode',
15 categoryType: RuleNodeTypeEnum.FLOW, 17 categoryType: RuleNodeTypeEnum.FLOW,
16 - name: 'checkpoint', 18 + name: t('designer_config.flows.index.checkpoint.name'),
17 configurationDescriptor: { 19 configurationDescriptor: {
18 nodeDefinition: { 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('designer_config.flows.index.checkpoint.details'),
  22 + description: t('designer_config.flows.index.checkpoint.description'),
22 inEnabled: true, 23 inEnabled: true,
23 outEnabled: true, 24 outEnabled: true,
24 relationTypes: ['Success', 'Failure'], 25 relationTypes: ['Success', 'Failure'],