Showing
18 changed files
with
48 additions
and
12 deletions
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | 目前共有22个,分类按名称进行配置 |
4 | 4 | */ |
5 | 5 | export default { |
6 | + title: 'Action', | |
7 | + description: 'Perform special actions', | |
6 | 8 | assignToCustomer: { |
7 | 9 | name: 'assign to customer', |
8 | 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.`, | ... | ... |
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | 目前共有10个,分类按名称进行配置 |
4 | 4 | */ |
5 | 5 | export default { |
6 | + title: 'Enrichment', | |
7 | + description: 'Add additional information to message metadata', | |
6 | 8 | calculateDelta: { |
7 | 9 | name: 'calculate delta', |
8 | 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'.`, | ... | ... |
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | 目前共有4个,分类按名称进行配置 |
4 | 4 | */ |
5 | 5 | export default { |
6 | + title: 'Flow', | |
7 | + description: 'Organizes message flow', | |
6 | 8 | acknowledge: { |
7 | 9 | name: 'acknowledge', |
8 | 10 | details: `After acknowledgement, the message is pushed to related rule nodes. Useful if you don't care what happens to this message next.`, | ... | ... |
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | 目前共有3个,分类按名称进行配置 |
4 | 4 | */ |
5 | 5 | export default { |
6 | + title: 'Transform', | |
7 | + description: 'Change message Payload and metadata', | |
6 | 8 | changeOriginator: { |
7 | 9 | name: 'change originator', |
8 | 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.`, | ... | ... |
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | 目前共有10个,分类按名称进行配置 |
4 | 4 | */ |
5 | 5 | export default { |
6 | + title: '属性集', | |
7 | + description: '向消息元数据中添加附加信息', | |
6 | 8 | calculateDelta: { |
7 | 9 | name: '计算增量', |
8 | 10 | details: `该节点可以在规则中获取上一次遥测的值,以此可以实现二次遥测的差。比如一个设备,一天上传一次数据,如果你要对比今天和昨天的数据,并将两者数据差保存到数据库,就能够使用该节点。增量计算是在消息发起者的范围内完成的,例如设备、资产或客户。如果有输入键,则输出关系将为“成功”,除非增量为负并且设置了相应的配置参数。如果传入消息中没有输入值键,则输出关系将为“其他”。`, | ... | ... |
... | ... | @@ -22,13 +22,15 @@ import { SynchronizationStartConfig } from './SynchronizationStart'; |
22 | 22 | import { SynchronizationEndConfig } from './SynchronizationEnd'; |
23 | 23 | import { SaveAttributesConfig } from './SaveAttributes'; |
24 | 24 | import { CreateRelationConfig } from './CreateRelation'; |
25 | +import { useI18n } from '/@/hooks/web/useI18n'; | |
25 | 26 | |
27 | +const { t } = useI18n(); //加载国际化 | |
26 | 28 | export const ActionCategoryConfig: CategoryConfigType = { |
27 | 29 | category: RuleNodeTypeEnum.ACTION, |
28 | - title: '动作', | |
30 | + title: t('designer_config.actions.index.title'), | |
29 | 31 | backgroundColor: '#f1928f', |
30 | 32 | icon: 'material-symbols:flash-on', |
31 | - description: '执行特别动作', | |
33 | + description: t('designer_config.actions.index.description'), | |
32 | 34 | }; |
33 | 35 | |
34 | 36 | export const ActionComponents: NodeItemConfigType[] = [ | ... | ... |
... | ... | @@ -10,13 +10,15 @@ import { RelatedAttributesConfig } from './RelatedAttributes'; |
10 | 10 | import { TenantDetailsConfig } from './TenantDetails'; |
11 | 11 | import { OriginatorAttributesConfig } from './OriginatorAttributes'; |
12 | 12 | import { CustomerDetailsConfig } from './CustomerDetails'; |
13 | +import { useI18n } from '/@/hooks/web/useI18n'; | |
13 | 14 | |
15 | +const { t } = useI18n(); //加载国际化 | |
14 | 16 | export const EnrichmentCategoryConfig: CategoryConfigType = { |
15 | 17 | category: RuleNodeTypeEnum.ENRICHMENT, |
16 | - title: '属性集', | |
18 | + title: t('designer_config.enrichments.index.title'), | |
17 | 19 | backgroundColor: '#cdf14e', |
18 | 20 | icon: 'ic:round-playlist-add', |
19 | - description: '向消息元数据中添加附加信息', | |
21 | + description: t('designer_config.enrichments.index.description'), | |
20 | 22 | }; |
21 | 23 | |
22 | 24 | export const EnrichmentComponents: NodeItemConfigType[] = [ | ... | ... |
... | ... | @@ -11,13 +11,15 @@ import { AwsSnsConfig } from './AwsSns'; |
11 | 11 | import { SendEmailConfig } from './SendEmail'; |
12 | 12 | import { RabbitmqConfig } from './Rabbitmq'; |
13 | 13 | import { AwsSqsConfig } from './AwsSqs'; |
14 | +import { useI18n } from '/@/hooks/web/useI18n'; | |
14 | 15 | |
16 | +const { t } = useI18n(); //加载国际化 | |
15 | 17 | export const ExternalCategoryConfig: CategoryConfigType = { |
16 | 18 | category: RuleNodeTypeEnum.EXTERNAL, |
17 | - title: '外部的', | |
19 | + title: t('designer_config.externals.index.title'), | |
18 | 20 | backgroundColor: '#fbc766', |
19 | 21 | icon: 'material-symbols:cloud-upload', |
20 | - description: '与外部系统交互', | |
22 | + description: t('designer_config.externals.index.description'), | |
21 | 23 | }; |
22 | 24 | |
23 | 25 | export const ExternalComponents: NodeItemConfigType[] = [ | ... | ... |
... | ... | @@ -11,13 +11,15 @@ import { MessageTypeSwitchConfig } from './MessageTypeSwitch'; |
11 | 11 | import { SwitchConfig } from './Switch'; |
12 | 12 | import { GpsGeofencingFilterConfig } from './GpsGeofencingFilter'; |
13 | 13 | import { CheckAlarmStatusConfig } from './CheckAlarmStatus'; |
14 | +import { useI18n } from '/@/hooks/web/useI18n'; | |
14 | 15 | |
16 | +const { t } = useI18n(); //加载国际化 | |
15 | 17 | export const FilterCategoryConfig: CategoryConfigType = { |
16 | 18 | category: RuleNodeTypeEnum.FILTER, |
17 | - title: '筛选器', | |
19 | + title: t('designer_config.filters.index.title'), | |
18 | 20 | icon: 'material-symbols:filter-list', |
19 | 21 | backgroundColor: '#ede550', |
20 | - description: '使用配置条件筛选传入消息', | |
22 | + description: t('designer_config.filters.index.description'), | |
21 | 23 | }; |
22 | 24 | |
23 | 25 | export const FilterComponents: NodeItemConfigType[] = [ | ... | ... |
... | ... | @@ -4,13 +4,15 @@ import { AcknowledgeConfig } from './Acknowledge'; |
4 | 4 | import { CheckpointConfig } from './Checkpoint'; |
5 | 5 | import { RuleChainConfig } from './RuleChain'; |
6 | 6 | import { OutputConfig } from './Output'; |
7 | +import { useI18n } from '/@/hooks/web/useI18n'; | |
7 | 8 | |
9 | +const { t } = useI18n(); //加载国际化 | |
8 | 10 | export const FlowCategoryConfig: CategoryConfigType = { |
9 | 11 | category: RuleNodeTypeEnum.FLOW, |
10 | - title: 'Flow', | |
12 | + title: t('designer_config.flows.index.title'), | |
11 | 13 | backgroundColor: '#d6c4f1', |
12 | 14 | icon: 'material-symbols:settings-ethernet', |
13 | - description: 'Organizes message flow', | |
15 | + description: t('designer_config.flows.index.description'), | |
14 | 16 | }; |
15 | 17 | |
16 | 18 | export const FlowComponents: NodeItemConfigType[] = [ | ... | ... |
... | ... | @@ -3,13 +3,15 @@ import { RuleNodeTypeEnum } from '../index.type'; |
3 | 3 | import { ChangeOriginatorConfig } from './ChangeOriginator'; |
4 | 4 | import { ScriptConfig } from './Script'; |
5 | 5 | import { ToEmailConfig } from './ToEmail'; |
6 | +import { useI18n } from '/@/hooks/web/useI18n'; | |
6 | 7 | |
8 | +const { t } = useI18n(); //加载国际化 | |
7 | 9 | export const TransformationCategoryConfig: CategoryConfigType = { |
8 | 10 | category: RuleNodeTypeEnum.TRANSFORMATION, |
9 | - title: '变换', | |
11 | + title: t('designer_config.transformations.index.title'), | |
10 | 12 | backgroundColor: '#79cef1', |
11 | 13 | icon: 'ic:outline-transform', |
12 | - description: '更改消息 Payload 和元数据', | |
14 | + description: t('designer_config.transformations.index.description'), | |
13 | 15 | }; |
14 | 16 | |
15 | 17 | export const TransformationComponents: NodeItemConfigType[] = [ | ... | ... |