...
|
...
|
@@ -29,32 +29,392 @@ export const serverSchemas: FormSchema[] = [ |
29
|
29
|
defaultValue: 123,
|
30
|
30
|
colProps: { span: 8 },
|
31
|
31
|
},
|
|
32
|
+ {
|
|
33
|
+ field: '3',
|
|
34
|
+ component: 'InputNumber',
|
|
35
|
+ label: 'Minimum period between two',
|
|
36
|
+ required: true,
|
|
37
|
+ defaultValue: 123,
|
|
38
|
+ colProps: { span: 8 },
|
|
39
|
+ },
|
|
40
|
+ {
|
|
41
|
+ field: '4',
|
|
42
|
+ component: 'Select',
|
|
43
|
+ label: 'Binding',
|
|
44
|
+ defaultValue: 'UQ: UDP connection in queue mode',
|
|
45
|
+ componentProps: {
|
|
46
|
+ options: [
|
|
47
|
+ {
|
|
48
|
+ label: 'U: UDP connection in standard mode',
|
|
49
|
+ value: 'U: UDP connection in standard mode',
|
|
50
|
+ },
|
|
51
|
+ {
|
|
52
|
+ label: 'UQ: UDP connection in queue mode',
|
|
53
|
+ value: 'UQ: UDP connection in queue mode',
|
|
54
|
+ },
|
|
55
|
+ {
|
|
56
|
+ label: 'T: TCP connection in standard mode',
|
|
57
|
+ value: 'T: TCP connection in standard mode',
|
|
58
|
+ },
|
|
59
|
+ {
|
|
60
|
+ label: 'TQ: TCP connection in queue mode',
|
|
61
|
+ value: 'TQ: TCP connection in queue mode',
|
|
62
|
+ },
|
|
63
|
+ {
|
|
64
|
+ label: 'S: SMS connection in standard mode',
|
|
65
|
+ value: 'S: SMS connection in standard mode',
|
|
66
|
+ },
|
|
67
|
+ {
|
|
68
|
+ label: 'SQ: SMS connection in queue mode',
|
|
69
|
+ value: 'SQ: SMS connection in queue mode',
|
|
70
|
+ },
|
|
71
|
+ {
|
|
72
|
+ label: 'US: both UDP and SMS connections active, both in standard mode',
|
|
73
|
+ value: 'US: both UDP and SMS connections active, both in standard mode',
|
|
74
|
+ },
|
|
75
|
+ {
|
|
76
|
+ label: 'TS: both TCP and SMS connections active, both in standard mode',
|
|
77
|
+ value: 'TS: both TCP and SMS connections active, both in standard mode',
|
|
78
|
+ },
|
|
79
|
+ {
|
|
80
|
+ label:
|
|
81
|
+ 'UQS: both UDP and SMS connections active; UDP in queue mode, SMS in standard mode',
|
|
82
|
+ value:
|
|
83
|
+ 'UQS: both UDP and SMS connections active; UDP in queue mode, SMS in standard mode',
|
|
84
|
+ },
|
|
85
|
+ {
|
|
86
|
+ label:
|
|
87
|
+ 'TQS: both TCP and SMS connections active; TCP in queue mode, SMS in standard mode',
|
|
88
|
+ value:
|
|
89
|
+ 'TQS: both TCP and SMS connections active; TCP in queue mode, SMS in standard mode',
|
|
90
|
+ },
|
|
91
|
+ ],
|
|
92
|
+ },
|
|
93
|
+ colProps: { span: 8 },
|
|
94
|
+ },
|
|
95
|
+ {
|
|
96
|
+ field: '5',
|
|
97
|
+ label: '启用',
|
|
98
|
+ colProps: { span: 22 },
|
|
99
|
+ component: 'Checkbox',
|
|
100
|
+ renderComponentContent: 'Notification storing when disabled or offline',
|
|
101
|
+ },
|
|
102
|
+ {
|
|
103
|
+ field: '6',
|
|
104
|
+ component: 'Select',
|
|
105
|
+ label: 'Security config mode',
|
|
106
|
+ defaultValue: 'No Security',
|
|
107
|
+ componentProps: {
|
|
108
|
+ options: [
|
|
109
|
+ {
|
|
110
|
+ label: 'No Security',
|
|
111
|
+ value: 'No Security',
|
|
112
|
+ },
|
|
113
|
+ {
|
|
114
|
+ label: 'Pre-Shared Key',
|
|
115
|
+ value: 'Pre-Shared Key',
|
|
116
|
+ },
|
|
117
|
+ {
|
|
118
|
+ label: 'Raw Public Key',
|
|
119
|
+ value: 'Raw Public Key',
|
|
120
|
+ },
|
|
121
|
+ {
|
|
122
|
+ label: 'X.509 Certificate',
|
|
123
|
+ value: 'X.509 Certificate',
|
|
124
|
+ },
|
|
125
|
+ ],
|
|
126
|
+ },
|
|
127
|
+ colProps: { span: 8 },
|
|
128
|
+ },
|
|
129
|
+ {
|
|
130
|
+ field: '7',
|
|
131
|
+ component: 'Input',
|
|
132
|
+ label: 'Host',
|
|
133
|
+ required: true,
|
|
134
|
+ defaultValue: '0.0.0.0',
|
|
135
|
+ colProps: { span: 8 },
|
|
136
|
+ },
|
|
137
|
+ {
|
|
138
|
+ field: '8',
|
|
139
|
+ component: 'InputNumber',
|
|
140
|
+ label: 'Port',
|
|
141
|
+ required: true,
|
|
142
|
+ defaultValue: 5688,
|
|
143
|
+ colProps: { span: 8 },
|
|
144
|
+ },
|
|
145
|
+ {
|
|
146
|
+ field: '9',
|
|
147
|
+ component: 'InputNumber',
|
|
148
|
+ label: 'Short ID',
|
|
149
|
+ required: true,
|
|
150
|
+ defaultValue: 111,
|
|
151
|
+ colProps: { span: 8 },
|
|
152
|
+ },
|
|
153
|
+ {
|
|
154
|
+ field: '10',
|
|
155
|
+ component: 'InputNumber',
|
|
156
|
+ label: 'Hold Off Time',
|
|
157
|
+ required: true,
|
|
158
|
+ defaultValue: 1,
|
|
159
|
+ colProps: { span: 8 },
|
|
160
|
+ },
|
|
161
|
+ {
|
|
162
|
+ field: '11',
|
|
163
|
+ component: 'InputNumber',
|
|
164
|
+ label: 'Account after the timeout',
|
|
165
|
+ required: true,
|
|
166
|
+ defaultValue: 0,
|
|
167
|
+ colProps: { span: 8 },
|
|
168
|
+ },
|
|
169
|
+ {
|
|
170
|
+ field: '12',
|
|
171
|
+ component: 'InputTextArea',
|
|
172
|
+ label: 'Account after the timeout',
|
|
173
|
+ required: true,
|
|
174
|
+ defaultValue: `3059301306072a8648ce3d020106082a8648ce3d03010703420004e353af009b814ee2f9ab393a975e0c39
|
|
175
|
+ e2fff60e3603fd6ee54a43b89a4f56258a7aa9c7e4a577760edb289dc955d91968473ee8a1bfc2b9c423563796113009`,
|
|
176
|
+ colProps: { span: 22 },
|
|
177
|
+ componentProps: {
|
|
178
|
+ autoSize: {
|
|
179
|
+ maxRows: 10,
|
|
180
|
+ },
|
|
181
|
+ },
|
|
182
|
+ },
|
|
183
|
+
|
|
184
|
+ {
|
|
185
|
+ field: '61',
|
|
186
|
+ component: 'Select',
|
|
187
|
+ label: 'Security config mode',
|
|
188
|
+ defaultValue: 'No Security',
|
|
189
|
+ componentProps: {
|
|
190
|
+ options: [
|
|
191
|
+ {
|
|
192
|
+ label: 'No Security',
|
|
193
|
+ value: 'No Security',
|
|
194
|
+ },
|
|
195
|
+ {
|
|
196
|
+ label: 'Pre-Shared Key',
|
|
197
|
+ value: 'Pre-Shared Key',
|
|
198
|
+ },
|
|
199
|
+ {
|
|
200
|
+ label: 'Raw Public Key',
|
|
201
|
+ value: 'Raw Public Key',
|
|
202
|
+ },
|
|
203
|
+ {
|
|
204
|
+ label: 'X.509 Certificate',
|
|
205
|
+ value: 'X.509 Certificate',
|
|
206
|
+ },
|
|
207
|
+ ],
|
|
208
|
+ },
|
|
209
|
+ colProps: { span: 8 },
|
|
210
|
+ },
|
|
211
|
+ {
|
|
212
|
+ field: '71',
|
|
213
|
+ component: 'Input',
|
|
214
|
+ label: 'Host',
|
|
215
|
+ required: true,
|
|
216
|
+ defaultValue: '0.0.0.0',
|
|
217
|
+ colProps: { span: 8 },
|
|
218
|
+ },
|
|
219
|
+ {
|
|
220
|
+ field: '81',
|
|
221
|
+ component: 'InputNumber',
|
|
222
|
+ label: 'Port',
|
|
223
|
+ required: true,
|
|
224
|
+ defaultValue: 5688,
|
|
225
|
+ colProps: { span: 8 },
|
|
226
|
+ },
|
|
227
|
+ {
|
|
228
|
+ field: '91',
|
|
229
|
+ component: 'InputNumber',
|
|
230
|
+ label: 'Short ID',
|
|
231
|
+ required: true,
|
|
232
|
+ defaultValue: 111,
|
|
233
|
+ colProps: { span: 8 },
|
|
234
|
+ },
|
|
235
|
+ {
|
|
236
|
+ field: '101',
|
|
237
|
+ component: 'InputNumber',
|
|
238
|
+ label: 'Hold Off Time',
|
|
239
|
+ required: true,
|
|
240
|
+ defaultValue: 1,
|
|
241
|
+ colProps: { span: 8 },
|
|
242
|
+ },
|
|
243
|
+ {
|
|
244
|
+ field: '111',
|
|
245
|
+ component: 'InputNumber',
|
|
246
|
+ label: 'Account after the timeout',
|
|
247
|
+ required: true,
|
|
248
|
+ defaultValue: 0,
|
|
249
|
+ colProps: { span: 8 },
|
|
250
|
+ },
|
|
251
|
+ {
|
|
252
|
+ field: '121',
|
|
253
|
+ component: 'InputTextArea',
|
|
254
|
+ label: 'Account after the timeout',
|
|
255
|
+ required: true,
|
|
256
|
+ defaultValue: `3059301306072a8648ce3d020106082a8648ce3d03010703420004e353af009b814ee2f9ab393a975e0c39
|
|
257
|
+ e2fff60e3603fd6ee54a43b89a4f56258a7aa9c7e4a577760edb289dc955d91968473ee8a1bfc2b9c423563796113009`,
|
|
258
|
+ colProps: { span: 22 },
|
|
259
|
+ componentProps: {
|
|
260
|
+ autoSize: {
|
|
261
|
+ maxRows: 10,
|
|
262
|
+ },
|
|
263
|
+ },
|
|
264
|
+ },
|
32
|
265
|
];
|
33
|
266
|
|
34
|
267
|
export const settingsSchemas: FormSchema[] = [
|
35
|
268
|
{
|
36
|
|
- field: 'deviceTelemetryTopic',
|
|
269
|
+ field: '1',
|
|
270
|
+ component: 'Select',
|
|
271
|
+ label: 'Firmware update strategy',
|
|
272
|
+ defaultValue: 'Push firmware update as binary file using Object 5 and Resource 0 (Package)',
|
|
273
|
+ componentProps: {
|
|
274
|
+ options: [
|
|
275
|
+ {
|
|
276
|
+ label: 'Push firmware update as binary file using Object 5 and Resource 0 (Package)',
|
|
277
|
+ value: 'Push firmware update as binary file using Object 5 and Resource 0 (Package)',
|
|
278
|
+ },
|
|
279
|
+ {
|
|
280
|
+ label:
|
|
281
|
+ 'Auto-generate unique CoAP URL to download the package and push firmware update as Object 5 and ',
|
|
282
|
+ value:
|
|
283
|
+ 'Auto-generate unique CoAP URL to download the package and push firmware update as Object 5 and ',
|
|
284
|
+ },
|
|
285
|
+ {
|
|
286
|
+ label: 'Push firmware update as binary file using Object 19 and Resource 0 (Data)',
|
|
287
|
+ value: 'Push firmware update as binary file using Object 19 and Resource 0 (Data)',
|
|
288
|
+ },
|
|
289
|
+ ],
|
|
290
|
+ },
|
|
291
|
+ colProps: { span: 22 },
|
|
292
|
+ },
|
|
293
|
+ {
|
|
294
|
+ field: '2',
|
|
295
|
+ component: 'Select',
|
|
296
|
+ label: 'Firmware update strategy',
|
|
297
|
+ defaultValue: 'Push firmware update as binary file using Object 5 and Resource 0 (Package)',
|
|
298
|
+ componentProps: {
|
|
299
|
+ options: [
|
|
300
|
+ {
|
|
301
|
+ label: 'Push binary file using Object 9 and Resource 2 (Package)',
|
|
302
|
+ value: 'Push binary file using Object 9 and Resource 2 (Package)',
|
|
303
|
+ },
|
|
304
|
+ {
|
|
305
|
+ label:
|
|
306
|
+ 'Auto-generate unique CoAP URL to download the package and push software update using Object 9 and ',
|
|
307
|
+ value:
|
|
308
|
+ 'Auto-generate unique CoAP URL to download the package and push software update using Object 9 and ',
|
|
309
|
+ },
|
|
310
|
+ ],
|
|
311
|
+ },
|
|
312
|
+ colProps: { span: 22 },
|
|
313
|
+ },
|
|
314
|
+ {
|
|
315
|
+ field: '3',
|
37
|
316
|
component: 'Input',
|
38
|
|
- label: '筛选器',
|
|
317
|
+ label: 'Software update CoAP resource',
|
39
|
318
|
required: true,
|
40
|
|
- defaultValue: 'v1/devices/me/telemetry',
|
|
319
|
+ defaultValue: 'coap://localhost:5685',
|
41
|
320
|
componentProps: {
|
42
|
|
- placeholder: '请输入遥测数据 topic 筛选器',
|
|
321
|
+ placeholder: '请输入',
|
43
|
322
|
},
|
44
|
323
|
colProps: { span: 11 },
|
45
|
324
|
},
|
|
325
|
+ {
|
|
326
|
+ field: '4',
|
|
327
|
+ component: 'Select',
|
|
328
|
+ label: 'Discontinuous Reception (DRX)',
|
|
329
|
+ defaultValue: 'Push firmware update as binary file using Object 5 and Resource 0 (Package)',
|
|
330
|
+ componentProps: {
|
|
331
|
+ options: [
|
|
332
|
+ {
|
|
333
|
+ label: 'Discontinuous Reception (DRX)',
|
|
334
|
+ value: 'Discontinuous Reception (DRX)',
|
|
335
|
+ },
|
|
336
|
+ {
|
|
337
|
+ label: 'Power Saving Mode (PSM) ',
|
|
338
|
+ value: 'Power Saving Mode (PSM) ',
|
|
339
|
+ },
|
|
340
|
+ {
|
|
341
|
+ label: 'Extended Discontinuous Reception (eDRX) ',
|
|
342
|
+ value: 'Extended Discontinuous Reception (eDRX) ',
|
|
343
|
+ },
|
|
344
|
+ ],
|
|
345
|
+ },
|
|
346
|
+ colProps: { span: 22 },
|
|
347
|
+ },
|
|
348
|
+ {
|
|
349
|
+ field: '5',
|
|
350
|
+ label: '启用',
|
|
351
|
+ colProps: { span: 22 },
|
|
352
|
+ component: 'Checkbox',
|
|
353
|
+ renderComponentContent: 'Supports composite Read/Write/Observe operations',
|
|
354
|
+ },
|
46
|
355
|
];
|
47
|
356
|
|
48
|
357
|
export const deviceSchemas: FormSchema[] = [
|
49
|
358
|
{
|
50
|
|
- field: 'deviceTelemetryTopic',
|
51
|
|
- component: 'Input',
|
52
|
|
- label: '筛选器',
|
53
|
|
- required: true,
|
54
|
|
- defaultValue: 'v1/devices/me/telemetry',
|
|
359
|
+ field: '1',
|
|
360
|
+ label: 'LWM2M',
|
|
361
|
+ colProps: { span: 22 },
|
|
362
|
+ component: 'InputTextArea',
|
55
|
363
|
componentProps: {
|
56
|
|
- placeholder: '请输入遥测数据 topic 筛选器',
|
|
364
|
+ autoSize: {
|
|
365
|
+ maxRows: 30,
|
|
366
|
+ },
|
57
|
367
|
},
|
58
|
|
- colProps: { span: 11 },
|
|
368
|
+ defaultValue: `
|
|
369
|
+ {
|
|
370
|
+ "observeAttr": {
|
|
371
|
+ "observe": [],
|
|
372
|
+ "attribute": [],
|
|
373
|
+ "telemetry": [],
|
|
374
|
+ "keyName": {},
|
|
375
|
+ "attributeLwm2m": {}
|
|
376
|
+ },
|
|
377
|
+ "bootstrap": {
|
|
378
|
+ "servers": {
|
|
379
|
+ "binding": "UQ",
|
|
380
|
+ "shortId": 123,
|
|
381
|
+ "lifetime": 300,
|
|
382
|
+ "notifIfDisabled": true,
|
|
383
|
+ "defaultMinPeriod": 1
|
|
384
|
+ },
|
|
385
|
+ "bootstrapServer": {
|
|
386
|
+ "bootstrapServerIs": true,
|
|
387
|
+ "host": "0.0.0.0",
|
|
388
|
+ "port": 5687,
|
|
389
|
+ "securityHost": "0.0.0.0",
|
|
390
|
+ "securityPort": 5688,
|
|
391
|
+ "serverId": 111,
|
|
392
|
+ "clientHoldOffTime": 1,
|
|
393
|
+ "serverPublicKey": "",
|
|
394
|
+ "bootstrapServerAccountTimeout": 0
|
|
395
|
+ },
|
|
396
|
+ "lwm2mServer": {
|
|
397
|
+ "bootstrapServerIs": false,
|
|
398
|
+ "host": "0.0.0.0",
|
|
399
|
+ "port": 5685,
|
|
400
|
+ "securityHost": "0.0.0.0",
|
|
401
|
+ "securityPort": 5686,
|
|
402
|
+ "serverId": 123,
|
|
403
|
+ "clientHoldOffTime": 1,
|
|
404
|
+ "serverPublicKey": "",
|
|
405
|
+ "bootstrapServerAccountTimeout": 0
|
|
406
|
+ }
|
|
407
|
+ },
|
|
408
|
+ "clientLwM2mSettings": {
|
|
409
|
+ "clientOnlyObserveAfterConnect": 1,
|
|
410
|
+ "fwUpdateStrategy": 1,
|
|
411
|
+ "swUpdateStrategy": 2,
|
|
412
|
+ "swUpdateResource": "coap://localhost:5685",
|
|
413
|
+ "powerMode": "DRX",
|
|
414
|
+ "compositeOperationsSupport": false
|
|
415
|
+ },
|
|
416
|
+ "type": "LWM2M"
|
|
417
|
+ }
|
|
418
|
+ `,
|
59
|
419
|
},
|
60
|
420
|
]; |
...
|
...
|
|