Commit 0e93740e1fdeebe8c95b5cf394a9ae0c4febf263
Merge branch 'fix/rule-chain-field' into 'main_dev'
fix: 隐藏规则链节点和修改字段 See merge request yunteng/thingskit-front!1053
Showing
10 changed files
with
32 additions
and
31 deletions
... | ... | @@ -50,11 +50,11 @@ export default { |
50 | 50 | ENTITY_CACHE_EXPIRATION: '实体缓存过期时间(秒)', |
51 | 51 | }, |
52 | 52 | DeviceProfileFieldsNameEnum: { |
53 | - PERSIST_ALARM_RULES_STATE: '坚持报警规则的状态', | |
54 | - FETCH_ALARM_RULES_STATE_ON_START: '获取报警规则的状态', | |
53 | + PERSIST_ALARM_RULES_STATE: '保持告警规则的状态', | |
54 | + FETCH_ALARM_RULES_STATE_ON_START: '获取告警规则的状态', | |
55 | 55 | }, |
56 | 56 | GeneratorFieldsNameEnum: { |
57 | - MSG_COUNT: '邮件计数(0-无限制)', | |
57 | + MSG_COUNT: '消息计数(0-无限制)', | |
58 | 58 | PERIOD_IN_SECONDS: '周期(秒)', |
59 | 59 | JS_SCRIPT: '产生', |
60 | 60 | // ORIGINATOR_ID = '资产', |
... | ... | @@ -102,7 +102,7 @@ export default { |
102 | 102 | SaveTimeseriesFieldsNameEnum: { |
103 | 103 | DEFAULT_TTL: '默认TTL(秒)', |
104 | 104 | SKIP_LATEST_PERSISTENCE: '滑雪最新坚持', |
105 | - USE_SERVER_TS: '使用服务器ts', | |
105 | + USE_SERVER_TS: '使用服务器时间戳', | |
106 | 106 | }, |
107 | 107 | SaveToCustomTableFieldsNameEnum: { |
108 | 108 | FIELDS_MAPPING: '字段映射', | ... | ... |
... | ... | @@ -12,12 +12,12 @@ export default { |
12 | 12 | }, |
13 | 13 | ToEmailFieldsNameEnum: { |
14 | 14 | FROM_TEMPLATE: '来自模板', |
15 | - TO_TEMPLATE: '到模板', | |
15 | + TO_TEMPLATE: '发送到Email', | |
16 | 16 | CC_TEMPLATE: '抄送模板', |
17 | 17 | BCC_TEMPLATE: '密件抄送模板', |
18 | 18 | SUBJECT_TEMPLATE: '主题模板', |
19 | 19 | MAIL_BODY_TYPE: '邮件正文类型', |
20 | 20 | IS_HTML_TEMPLATE: '动态邮件正文类型', |
21 | - BODY_TEMPLATE: '正文模板', | |
21 | + BODY_TEMPLATE: '内容模板', | |
22 | 22 | }, |
23 | 23 | }; | ... | ... |
... | ... | @@ -42,7 +42,7 @@ export const formSchemas: FormSchema[] = [ |
42 | 42 | scriptType: 'json', |
43 | 43 | paramsName: ['msg', 'metadata', 'msgType'], |
44 | 44 | }, |
45 | - buttonName: 'Test details function', | |
45 | + buttonName: '测试详情函数', | |
46 | 46 | }, |
47 | 47 | }, |
48 | 48 | { |
... | ... | @@ -74,6 +74,7 @@ export const formSchemas: FormSchema[] = [ |
74 | 74 | helpMessage: [ |
75 | 75 | 'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)', |
76 | 76 | ], |
77 | + ifShow: ({ model }) => model[CreateAlarmFieldsEnum.DYNAMIC_SEVERITY], | |
77 | 78 | componentProps: { |
78 | 79 | placeholder: `请输入${t(CreateAlarmFieldsNameEnum.SEVERITY)}`, |
79 | 80 | }, |
... | ... | @@ -92,6 +93,7 @@ export const formSchemas: FormSchema[] = [ |
92 | 93 | component: 'Select', |
93 | 94 | label: t(CreateAlarmFieldsNameEnum.RELATION_TYPES), |
94 | 95 | show: ({ model }) => !model[CreateAlarmFieldsEnum.USE_MESSAGE_ALARM_DATA], |
96 | + ifShow: ({ model }) => model[CreateAlarmFieldsEnum.PROPAGATE], | |
95 | 97 | componentProps: { |
96 | 98 | open: false, |
97 | 99 | mode: 'tags', | ... | ... |
... | ... | @@ -31,8 +31,7 @@ export const formSchemas: FormSchema[] = [ |
31 | 31 | component: 'Checkbox', |
32 | 32 | label: t(SaveTimeseriesFieldsNameEnum.USE_SERVER_TS), |
33 | 33 | renderComponentContent: () => ({ |
34 | - default: () => | |
35 | - 'Enable this setting 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).', | |
34 | + default: () => '启用此设置可以使用消息处理的时间戳,而不是消息中的时间戳。', | |
36 | 35 | }), |
37 | 36 | }, |
38 | 37 | ]; | ... | ... |
1 | 1 | import type { CategoryConfigType, NodeItemConfigType } from '../../types/node'; |
2 | 2 | import { RuleNodeTypeEnum } from '../index.type'; |
3 | 3 | import { CreateAlarmConfig } from './CreateAlarm'; |
4 | -import { PushToEdgeConfig } from './PushToEdge'; | |
4 | +// import { PushToEdgeConfig } from './PushToEdge'; | |
5 | 5 | import { GeneratorConfig } from './Generator'; |
6 | 6 | import { AssignToCustomerConfig } from './AssignToCustomer'; |
7 | 7 | import { UnassignFromCustomerConfig } from './UnassignFromCustomer'; |
... | ... | @@ -9,19 +9,19 @@ import { SaveTimeseriesConfig } from './SaveTimeseries'; |
9 | 9 | import { GpsGeofencingEventsConfig } from './GpsGeofencingEvents'; |
10 | 10 | import { DeviceProfileConfig } from './DeviceProfile'; |
11 | 11 | import { RpcCallReplyConfig } from './RpcCallReply'; |
12 | -import { CopyToViewConfig } from './CopyToView'; | |
12 | +// import { CopyToViewConfig } from './CopyToView'; | |
13 | 13 | import { LogConfig } from './Log'; |
14 | 14 | import { SaveToCustomTableConfig } from './SaveToCustomTable'; |
15 | 15 | import { ClearAlarmConfig } from './ClearAlarm'; |
16 | -import { DeleteRelationConfig } from './DeleteRelation'; | |
16 | +// import { DeleteRelationConfig } from './DeleteRelation'; | |
17 | 17 | import { DelayDeprecatedConfig } from './DelayDeprecated'; |
18 | 18 | import { MessageCountConfig } from './MessageCount'; |
19 | 19 | import { SaveEventConfig } from './SaveEvent'; |
20 | 20 | import { RpcCallRequestConfig } from './RpcCallRequest'; |
21 | 21 | import { SynchronizationStartConfig } from './SynchronizationStart'; |
22 | 22 | import { SynchronizationEndConfig } from './SynchronizationEnd'; |
23 | -import { SaveAttributesConfig } from './SaveAttributes'; | |
24 | -import { CreateRelationConfig } from './CreateRelation'; | |
23 | +// import { SaveAttributesConfig } from './SaveAttributes'; | |
24 | +// import { CreateRelationConfig } from './CreateRelation'; | |
25 | 25 | import { useI18n } from '/@/hooks/web/useI18n'; |
26 | 26 | |
27 | 27 | const { t } = useI18n(); // 加载国际化 |
... | ... | @@ -36,20 +36,20 @@ export const ActionCategoryConfig: CategoryConfigType = { |
36 | 36 | export const ActionComponents: NodeItemConfigType[] = [ |
37 | 37 | AssignToCustomerConfig, |
38 | 38 | ClearAlarmConfig, |
39 | - CopyToViewConfig, | |
39 | + // CopyToViewConfig, | |
40 | 40 | CreateAlarmConfig, |
41 | - CreateRelationConfig, | |
42 | - DeleteRelationConfig, | |
41 | + // CreateRelationConfig, | |
42 | + // DeleteRelationConfig, | |
43 | 43 | DelayDeprecatedConfig, |
44 | 44 | DeviceProfileConfig, |
45 | 45 | GeneratorConfig, |
46 | 46 | GpsGeofencingEventsConfig, |
47 | 47 | LogConfig, |
48 | 48 | MessageCountConfig, |
49 | - PushToEdgeConfig, | |
49 | + // PushToEdgeConfig, | |
50 | 50 | RpcCallReplyConfig, |
51 | 51 | RpcCallRequestConfig, |
52 | - SaveAttributesConfig, | |
52 | + // SaveAttributesConfig, | |
53 | 53 | SaveEventConfig, |
54 | 54 | SaveTimeseriesConfig, |
55 | 55 | SaveToCustomTableConfig, | ... | ... |
... | ... | @@ -2,15 +2,15 @@ import type { CategoryConfigType, NodeItemConfigType } from '../../types/node'; |
2 | 2 | import { RuleNodeTypeEnum } from '../index.type'; |
3 | 3 | import { AlarmNoticeConfig } from './AlarmNotice'; |
4 | 4 | import { MqttConfig } from './Mqtt'; |
5 | -import { GcpPubsubConfig } from './GcpPubsub'; | |
5 | +// import { GcpPubsubConfig } from './GcpPubsub'; | |
6 | 6 | import { SendSmsConfig } from './SendSms'; |
7 | -import { AzureIotHubConfig } from './AzureIotHub'; | |
7 | +// import { AzureIotHubConfig } from './AzureIotHub'; | |
8 | 8 | import { RestApiCallConfig } from './RestApiCall'; |
9 | 9 | import { KafkaConfig } from './Kafka'; |
10 | -import { AwsSnsConfig } from './AwsSns'; | |
10 | +// import { AwsSnsConfig } from './AwsSns'; | |
11 | 11 | import { SendEmailConfig } from './SendEmail'; |
12 | 12 | import { RabbitmqConfig } from './Rabbitmq'; |
13 | -import { AwsSqsConfig } from './AwsSqs'; | |
13 | +// import { AwsSqsConfig } from './AwsSqs'; | |
14 | 14 | import { useI18n } from '/@/hooks/web/useI18n'; |
15 | 15 | |
16 | 16 | const { t } = useI18n(); // 加载国际化 |
... | ... | @@ -24,10 +24,10 @@ export const ExternalCategoryConfig: CategoryConfigType = { |
24 | 24 | |
25 | 25 | export const ExternalComponents: NodeItemConfigType[] = [ |
26 | 26 | AlarmNoticeConfig, |
27 | - AwsSnsConfig, | |
28 | - AwsSqsConfig, | |
29 | - AzureIotHubConfig, | |
30 | - GcpPubsubConfig, | |
27 | + // AwsSnsConfig, | |
28 | + // AwsSqsConfig, | |
29 | + // AzureIotHubConfig, | |
30 | + // GcpPubsubConfig, | |
31 | 31 | KafkaConfig, |
32 | 32 | MqttConfig, |
33 | 33 | RabbitmqConfig, | ... | ... |
... | ... | @@ -96,7 +96,7 @@ export const formSchemas: FormSchema[] = [ |
96 | 96 | { |
97 | 97 | field: ToEmailFieldsEnum.BODY_TEMPLATE, |
98 | 98 | component: 'InputTextArea', |
99 | - label: t(ToEmailFieldsEnum.BODY_TEMPLATE), | |
99 | + label: t(ToEmailFieldsNameEnum.BODY_TEMPLATE), | |
100 | 100 | componentProps: { |
101 | 101 | placeholder: `请输入${t(ToEmailFieldsNameEnum.BODY_TEMPLATE)}`, |
102 | 102 | autoSize: { minRows: 3 }, | ... | ... |