create.config.ts
2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import {
OriginatorAttributesEnum,
OriginatorAttributesNameEnum,
} from '../../../enum/formField/enrichment';
import { FormSchema } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
export const formSchemas: FormSchema[] = [
// {
// field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT,
// component: 'Checkbox',
// label: t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT),
// renderComponentContent: () => ({
// default: () =>
// 'If at least one selected key doesn\'t exist the outbound message will report "Failure".',
// }),
// },
// {
// field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES,
// component: 'Select',
// label: t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES),
// helpMessage: [
// `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`,
// ],
// componentProps: {
// mode: 'tags',
// open: false,
// placeholder: `请输入${t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)}`,
// },
// },
// {
// field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES,
// component: 'Select',
// label: t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES),
// helpMessage: [
// `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`,
// ],
// componentProps: {
// mode: 'tags',
// open: false,
// placeholder: `请输入${t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)}`,
// },
// },
// {
// field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES,
// component: 'Select',
// label: t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES),
// helpMessage: [
// `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`,
// ],
// componentProps: {
// mode: 'tags',
// open: false,
// placeholder: `请输入${t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)}`,
// },
// },
{
field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES,
component: 'Select',
label: t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES),
required: true,
helpMessage: [
`Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`,
],
componentProps: {
mode: 'tags',
open: false,
placeholder: `请输入${t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES)}`,
},
},
{
field: OriginatorAttributesEnum.GET_LATEST_VALUE_WITH_TS,
component: 'Checkbox',
label: t(OriginatorAttributesNameEnum.GET_LATEST_VALUE_WITH_TS),
renderComponentContent: () => ({
default: () =>
'如果选中,最新的遥测值将添加到带有时间戳的出站消息元数据中, 例如: "temp": "{"ts":1574329385897, "value":42}"',
}),
},
];