Showing
4 changed files
with
37 additions
and
36 deletions
... | ... | @@ -32,7 +32,7 @@ export const CoapSchemas: FormSchema[] = [ |
32 | 32 | { |
33 | 33 | field: 'coapDeviceType', |
34 | 34 | component: 'Select', |
35 | - label: 'CoAP类型', | |
35 | + label: 'CoAP 设备类型', | |
36 | 36 | defaultValue: 'DEFAULT', |
37 | 37 | componentProps: { |
38 | 38 | options: [ |
... | ... | @@ -45,7 +45,7 @@ export const CoapSchemas: FormSchema[] = [ |
45 | 45 | { |
46 | 46 | field: 'transportPayloadType', |
47 | 47 | component: 'Select', |
48 | - label: '设备消息', | |
48 | + label: 'CoAP 设备消息 Payload', | |
49 | 49 | defaultValue: 'JSON', |
50 | 50 | componentProps: { |
51 | 51 | options: [ |
... | ... | @@ -59,14 +59,14 @@ export const CoapSchemas: FormSchema[] = [ |
59 | 59 | { |
60 | 60 | field: 'powerMode', |
61 | 61 | component: 'Select', |
62 | - label: '模式', | |
62 | + label: 'Power Saving Mode', | |
63 | 63 | defaultValue: 'DRX', |
64 | 64 | componentProps: { |
65 | 65 | options: [ |
66 | - { label: 'Power Saving Mode', value: 'PSM' }, | |
67 | - { label: 'Discontinuous Reception', value: 'DRX' }, | |
66 | + { label: 'Power Saving Mode (PSM)', value: 'PSM' }, | |
67 | + { label: 'Discontinuous Reception (DRX)', value: 'DRX' }, | |
68 | 68 | { |
69 | - label: 'Extended Discontinuous Reception', | |
69 | + label: 'Extended Discontinuous Reception (eDRX)', | |
70 | 70 | value: 'E_DRX', |
71 | 71 | }, |
72 | 72 | ], |
... | ... | @@ -76,7 +76,7 @@ export const CoapSchemas: FormSchema[] = [ |
76 | 76 | { |
77 | 77 | field: 'psmActivityTimer', |
78 | 78 | component: 'InputNumber', |
79 | - label: 'Timer', | |
79 | + label: 'PSM Activity Timer', | |
80 | 80 | required: true, |
81 | 81 | defaultValue: '10', |
82 | 82 | componentProps: { |
... | ... | @@ -132,7 +132,7 @@ export const CoapSchemas: FormSchema[] = [ |
132 | 132 | { |
133 | 133 | field: 'pagingTransmissionWindow', |
134 | 134 | component: 'InputNumber', |
135 | - label: 'Paging', | |
135 | + label: 'Paging Transmission Window', | |
136 | 136 | required: true, |
137 | 137 | defaultValue: '10', |
138 | 138 | componentProps: { |
... | ... | @@ -159,7 +159,7 @@ export const CoapSchemas: FormSchema[] = [ |
159 | 159 | }, |
160 | 160 | { |
161 | 161 | field: 'deviceTelemetryProtoSchema', |
162 | - label: '遥测数据', | |
162 | + label: '遥测数据 proto schema', | |
163 | 163 | colProps: { span: 22 }, |
164 | 164 | component: 'InputTextArea', |
165 | 165 | componentProps: { |
... | ... | @@ -189,7 +189,7 @@ export const CoapSchemas: FormSchema[] = [ |
189 | 189 | }, |
190 | 190 | { |
191 | 191 | field: 'deviceAttributesProtoSchema', |
192 | - label: 'Attributes', | |
192 | + label: 'Attributes proto schema', | |
193 | 193 | colProps: { span: 22 }, |
194 | 194 | component: 'InputTextArea', |
195 | 195 | componentProps: { |
... | ... | @@ -211,7 +211,7 @@ export const CoapSchemas: FormSchema[] = [ |
211 | 211 | }, |
212 | 212 | { |
213 | 213 | field: 'deviceRpcRequestProtoSchema', |
214 | - label: 'RPC 请求 ', | |
214 | + label: 'RPC 请求 proto schema', | |
215 | 215 | colProps: { span: 22 }, |
216 | 216 | component: 'InputTextArea', |
217 | 217 | componentProps: { |
... | ... | @@ -234,7 +234,7 @@ export const CoapSchemas: FormSchema[] = [ |
234 | 234 | }, |
235 | 235 | { |
236 | 236 | field: 'deviceRpcResponseProtoSchema', |
237 | - label: 'RPC 响应', | |
237 | + label: 'RPC 响应 proto schema', | |
238 | 238 | colProps: { span: 22 }, |
239 | 239 | component: 'InputTextArea', |
240 | 240 | componentProps: { | ... | ... |
... | ... | @@ -20,7 +20,7 @@ export const MqttSchemas: FormSchema[] = [ |
20 | 20 | { |
21 | 21 | field: 'deviceTelemetryTopic', |
22 | 22 | component: 'Input', |
23 | - label: '筛选器', | |
23 | + label: '遥测数据 topic 筛选器', | |
24 | 24 | required: true, |
25 | 25 | defaultValue: 'v1/devices/me/telemetry', |
26 | 26 | componentProps: { |
... | ... | @@ -32,7 +32,7 @@ export const MqttSchemas: FormSchema[] = [ |
32 | 32 | field: 'deviceAttributesTopic', |
33 | 33 | component: 'Input', |
34 | 34 | required: true, |
35 | - label: 'topic filter', | |
35 | + label: 'Attributes topic filter', | |
36 | 36 | defaultValue: 'v1/devices/me/attributes', |
37 | 37 | componentProps: { |
38 | 38 | placeholder: '请输入Attributes topic 筛选器', |
... | ... | @@ -42,22 +42,13 @@ export const MqttSchemas: FormSchema[] = [ |
42 | 42 | { |
43 | 43 | field: 'desc', |
44 | 44 | component: 'InputTextArea', |
45 | - label: '描述', | |
46 | - defaultValue: `支持单[+]和多级[#]通配符。[+] is suitable for any topic filter level。例如: | |
47 | - v1/devices/+/telemetry or | |
48 | - +/devices/+/attributes。[#]可以替换 topic filter 本身,并且必须是 topic 的最后一个符号。例如:# or v1/devices/me/#。 | |
49 | - `, | |
50 | - componentProps: { | |
51 | - autoSize: { | |
52 | - maxRows: 10, | |
53 | - }, | |
54 | - }, | |
55 | - colProps: { span: 23 }, | |
45 | + label: '', | |
46 | + slot: 'descSlot', | |
56 | 47 | }, |
57 | 48 | { |
58 | 49 | field: 'transportPayloadType', |
59 | 50 | component: 'Select', |
60 | - label: '设备信息', | |
51 | + label: 'MQTT 设备 Payload', | |
61 | 52 | defaultValue: 'JSON', |
62 | 53 | componentProps: { |
63 | 54 | options: [ |
... | ... | @@ -89,7 +80,7 @@ export const MqttSchemas: FormSchema[] = [ |
89 | 80 | }, |
90 | 81 | { |
91 | 82 | field: 'deviceTelemetryProtoSchema', |
92 | - label: '遥测数据', | |
83 | + label: '遥测数据 proto schema', | |
93 | 84 | colProps: { span: 23 }, |
94 | 85 | component: 'InputTextArea', |
95 | 86 | componentProps: { |
... | ... | @@ -118,7 +109,7 @@ export const MqttSchemas: FormSchema[] = [ |
118 | 109 | }, |
119 | 110 | { |
120 | 111 | field: 'deviceAttributesProtoSchema', |
121 | - label: 'Attributes', | |
112 | + label: 'Attributes proto schema', | |
122 | 113 | colProps: { span: 23 }, |
123 | 114 | component: 'InputTextArea', |
124 | 115 | componentProps: { |
... | ... | @@ -139,7 +130,7 @@ export const MqttSchemas: FormSchema[] = [ |
139 | 130 | }, |
140 | 131 | { |
141 | 132 | field: 'deviceRpcRequestProtoSchema', |
142 | - label: 'RPC 请求 ', | |
133 | + label: 'RPC 请求 proto schema', | |
143 | 134 | colProps: { span: 23 }, |
144 | 135 | component: 'InputTextArea', |
145 | 136 | componentProps: { |
... | ... | @@ -161,7 +152,7 @@ export const MqttSchemas: FormSchema[] = [ |
161 | 152 | }, |
162 | 153 | { |
163 | 154 | field: 'deviceRpcResponseProtoSchema', |
164 | - label: 'RPC 响应', | |
155 | + label: 'RPC 响应 proto schema', | |
165 | 156 | colProps: { span: 23 }, |
166 | 157 | component: 'InputTextArea', |
167 | 158 | componentProps: { | ... | ... |
... | ... | @@ -9,7 +9,17 @@ |
9 | 9 | " |
10 | 10 | > |
11 | 11 | <div style="margin-top: 1.2vh"> |
12 | - <BasicForm :showResetButton="false" :showSubmitButton="false" @register="register" /> | |
12 | + <BasicForm :showResetButton="false" :showSubmitButton="false" @register="register"> | |
13 | + <template #descSlot> | |
14 | + <div style="width: 47rem; margin-left: 2rem"> | |
15 | + <p> | |
16 | + 支持单[+]和多级[#]通配符。 [+] is suitable for any topic filter | |
17 | + level。例如:v1/devices/+/telemetry or +/devices/+/attributes。 [#]可以替换 topic | |
18 | + filter 本身,并且必须是 topic 的最后一个符号。例如:# or v1/devices/me/#。 | |
19 | + </p> | |
20 | + </div> | |
21 | + </template> | |
22 | + </BasicForm> | |
13 | 23 | </div> |
14 | 24 | </div> |
15 | 25 | </template> |
... | ... | @@ -51,7 +61,7 @@ |
51 | 61 | }); |
52 | 62 | |
53 | 63 | const [register, { validate, resetFields, setFieldsValue }] = useForm({ |
54 | - labelWidth: 80, | |
64 | + labelWidth: 180, | |
55 | 65 | schemas: MqttSchemas, |
56 | 66 | actionColOptions: { |
57 | 67 | span: 14, |
... | ... | @@ -131,7 +141,7 @@ |
131 | 141 | }); |
132 | 142 | </script> |
133 | 143 | <style lang="less" scoped> |
134 | - :deep(.ant-row) { | |
135 | - column-gap: 33px !important; | |
136 | - } | |
144 | + // :deep(.ant-row) { | |
145 | + // column-gap: 33px !important; | |
146 | + // } | |
137 | 147 | </style> | ... | ... |