config-editor-base 2.7.5 → 2.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ var set = function set(alert) {
79
79
  };
80
80
  };
81
81
 
82
- var demoConfig = 'config-01.07.json';
82
+ var demoConfig = 'config-01.09.json';
83
83
  var regexUISchemaPublic = new RegExp(/^uischema-\d{2}\.\d{2}\.json/, 'g');
84
84
  var regexSchemaPublic = new RegExp(/^schema-\d{2}\.\d{2}\.json/, 'g');
85
85
  var isValidUISchema = function isValidUISchema(file) {
@@ -176,7 +176,438 @@ var publicUiSchemaFiles = function publicUiSchemaFiles(uiSchemaAry, schemaAry, d
176
176
  dispatch(setUISchemaContent(loadFile(uiSchemaAry[0])));
177
177
  }
178
178
  if (demoMode && schemaAry.length) {
179
- dispatch(publicSchemaFiles(demoConfig, schemaAry, {}, uiSchemaAry));
179
+ schemaAry = schemaAry.filter(function (e) {
180
+ return e.includes("CANedge3");
181
+ });
182
+ var demoFileName = "config-01.09.json";
183
+ var demoContent = {
184
+ "general": {
185
+ "device": {
186
+ "meta": "Demo Config CE3G"
187
+ },
188
+ "security": {},
189
+ "debug": {
190
+ "syslog": 1,
191
+ "restart_timer": 24
192
+ }
193
+ },
194
+ "log": {
195
+ "file": {
196
+ "split_size": 512,
197
+ "split_time_period": 900,
198
+ "split_time_offset": 0,
199
+ "cyclic": 1
200
+ },
201
+ "compression": {
202
+ "level": 0
203
+ },
204
+ "encryption": {
205
+ "state": 0
206
+ },
207
+ "error_frames": {
208
+ "state": 0
209
+ }
210
+ },
211
+ "rtc": {
212
+ "sync": 2,
213
+ "timezone": 0,
214
+ "adjustment": 0,
215
+ "tolerance": 30
216
+ },
217
+ "secondaryport": {
218
+ "power_schedule": []
219
+ },
220
+ "can_internal": {
221
+ "general": {
222
+ "rx_state": 1,
223
+ "tx_state": 1
224
+ },
225
+ "filter": {
226
+ "id": [{
227
+ "name": "Heartbeat",
228
+ "state": 0,
229
+ "type": 0,
230
+ "id_format": 0,
231
+ "method": 0,
232
+ "f1": "2",
233
+ "f2": "2",
234
+ "prescaler_type": 0
235
+ }, {
236
+ "name": "TimeCalendar",
237
+ "state": 0,
238
+ "type": 0,
239
+ "id_format": 0,
240
+ "method": 0,
241
+ "f1": "3",
242
+ "f2": "3",
243
+ "prescaler_type": 0
244
+ }, {
245
+ "name": "TimeExternal",
246
+ "state": 0,
247
+ "type": 0,
248
+ "id_format": 0,
249
+ "method": 0,
250
+ "f1": "5",
251
+ "f2": "5",
252
+ "prescaler_type": 0
253
+ }, {
254
+ "name": "GnssStatus",
255
+ "state": 1,
256
+ "type": 0,
257
+ "id_format": 0,
258
+ "method": 0,
259
+ "f1": "65",
260
+ "f2": "65",
261
+ "prescaler_type": 0
262
+ }, {
263
+ "name": "GnssTime",
264
+ "state": 1,
265
+ "type": 0,
266
+ "id_format": 0,
267
+ "method": 0,
268
+ "f1": "66",
269
+ "f2": "66",
270
+ "prescaler_type": 0
271
+ }, {
272
+ "name": "GnsssPosition",
273
+ "state": 1,
274
+ "type": 0,
275
+ "id_format": 0,
276
+ "method": 0,
277
+ "f1": "67",
278
+ "f2": "67",
279
+ "prescaler_type": 0
280
+ }, {
281
+ "name": "GnssAltitude",
282
+ "state": 1,
283
+ "type": 0,
284
+ "id_format": 0,
285
+ "method": 0,
286
+ "f1": "68",
287
+ "f2": "68",
288
+ "prescaler_type": 0
289
+ }, {
290
+ "name": "GnssAttitude",
291
+ "state": 1,
292
+ "type": 0,
293
+ "id_format": 0,
294
+ "method": 0,
295
+ "f1": "69",
296
+ "f2": "69",
297
+ "prescaler_type": 0
298
+ }, {
299
+ "name": "GnssDistance",
300
+ "state": 1,
301
+ "type": 0,
302
+ "id_format": 0,
303
+ "method": 0,
304
+ "f1": "6A",
305
+ "f2": "6A",
306
+ "prescaler_type": 0
307
+ }, {
308
+ "name": "GnssSpeed",
309
+ "state": 1,
310
+ "type": 0,
311
+ "id_format": 0,
312
+ "method": 0,
313
+ "f1": "6B",
314
+ "f2": "6B",
315
+ "prescaler_type": 0
316
+ }, {
317
+ "name": "GnssGeofence",
318
+ "state": 1,
319
+ "type": 0,
320
+ "id_format": 0,
321
+ "method": 0,
322
+ "f1": "6C",
323
+ "f2": "6C",
324
+ "prescaler_type": 0
325
+ }, {
326
+ "name": "ImuAlign",
327
+ "state": 1,
328
+ "type": 0,
329
+ "id_format": 0,
330
+ "method": 0,
331
+ "f1": "6E",
332
+ "f2": "6E",
333
+ "prescaler_type": 0
334
+ }, {
335
+ "name": "ImuAcc",
336
+ "state": 1,
337
+ "type": 0,
338
+ "id_format": 0,
339
+ "method": 0,
340
+ "f1": "6F",
341
+ "f2": "6F",
342
+ "prescaler_type": 0
343
+ }]
344
+ },
345
+ "control": {
346
+ "control_rx_state": 0,
347
+ "control_tx_state": 0,
348
+ "start": {
349
+ "message": {
350
+ "chn": 0,
351
+ "id_format": 0,
352
+ "id": "0",
353
+ "id_mask": "7FF"
354
+ },
355
+ "signal": {
356
+ "type": 0,
357
+ "byteorder": 0,
358
+ "bitpos": 0,
359
+ "length": 0,
360
+ "factor": 0,
361
+ "offset": 0
362
+ },
363
+ "trigger_high": 0,
364
+ "trigger_low": 0
365
+ },
366
+ "stop": {
367
+ "message": {
368
+ "chn": 0,
369
+ "id_format": 0,
370
+ "id": "0",
371
+ "id_mask": "7FF"
372
+ },
373
+ "signal": {
374
+ "type": 0,
375
+ "byteorder": 0,
376
+ "bitpos": 0,
377
+ "length": 0,
378
+ "factor": 0,
379
+ "offset": 0
380
+ },
381
+ "trigger_high": 0,
382
+ "trigger_low": 0
383
+ }
384
+ }
385
+ },
386
+ "can_1": {
387
+ "general": {
388
+ "rx_state": 1,
389
+ "tx_state": 1
390
+ },
391
+ "phy": {
392
+ "mode": 0,
393
+ "retransmission": 1,
394
+ "fd_spec": 0,
395
+ "bit_rate_cfg_mode": 0
396
+ },
397
+ "filter": {
398
+ "remote_frames": 0,
399
+ "id": [{
400
+ "name": "AllStandardID",
401
+ "state": 1,
402
+ "type": 0,
403
+ "id_format": 0,
404
+ "method": 0,
405
+ "f1": "0",
406
+ "f2": "7FF",
407
+ "prescaler_type": 0
408
+ }, {
409
+ "name": "AllExtendedID",
410
+ "state": 1,
411
+ "type": 0,
412
+ "id_format": 1,
413
+ "method": 0,
414
+ "f1": "0",
415
+ "f2": "1FFFFFFF",
416
+ "prescaler_type": 0
417
+ }]
418
+ },
419
+ "control": {
420
+ "control_rx_state": 0,
421
+ "control_tx_state": 0,
422
+ "start": {
423
+ "message": {
424
+ "chn": 1,
425
+ "id_format": 0,
426
+ "id": "0",
427
+ "id_mask": "7FF"
428
+ },
429
+ "signal": {
430
+ "type": 0,
431
+ "byteorder": 0,
432
+ "bitpos": 0,
433
+ "length": 0,
434
+ "factor": 0,
435
+ "offset": 0
436
+ },
437
+ "trigger_high": 0,
438
+ "trigger_low": 0
439
+ },
440
+ "stop": {
441
+ "message": {
442
+ "chn": 1,
443
+ "id_format": 0,
444
+ "id": "0",
445
+ "id_mask": "7FF"
446
+ },
447
+ "signal": {
448
+ "type": 0,
449
+ "byteorder": 0,
450
+ "bitpos": 0,
451
+ "length": 0,
452
+ "factor": 0,
453
+ "offset": 0
454
+ },
455
+ "trigger_high": 0,
456
+ "trigger_low": 0
457
+ }
458
+ }
459
+ },
460
+ "can_2": {
461
+ "general": {
462
+ "rx_state": 1,
463
+ "tx_state": 1
464
+ },
465
+ "phy": {
466
+ "mode": 0,
467
+ "retransmission": 1,
468
+ "fd_spec": 0,
469
+ "bit_rate_cfg_mode": 0
470
+ },
471
+ "filter": {
472
+ "remote_frames": 0,
473
+ "id": [{
474
+ "name": "AllStandardID",
475
+ "state": 1,
476
+ "type": 0,
477
+ "id_format": 0,
478
+ "method": 0,
479
+ "f1": "0",
480
+ "f2": "7FF",
481
+ "prescaler_type": 0
482
+ }, {
483
+ "name": "AllExtendedID",
484
+ "state": 1,
485
+ "type": 0,
486
+ "id_format": 1,
487
+ "method": 0,
488
+ "f1": "0",
489
+ "f2": "1FFFFFFF",
490
+ "prescaler_type": 0
491
+ }]
492
+ },
493
+ "control": {
494
+ "control_rx_state": 0,
495
+ "control_tx_state": 0,
496
+ "start": {
497
+ "message": {
498
+ "chn": 2,
499
+ "id_format": 0,
500
+ "id": "0",
501
+ "id_mask": "7FF"
502
+ },
503
+ "signal": {
504
+ "type": 0,
505
+ "byteorder": 0,
506
+ "bitpos": 0,
507
+ "length": 0,
508
+ "factor": 0,
509
+ "offset": 0
510
+ },
511
+ "trigger_high": 0,
512
+ "trigger_low": 0
513
+ },
514
+ "stop": {
515
+ "message": {
516
+ "chn": 2,
517
+ "id_format": 0,
518
+ "id": "0",
519
+ "id_mask": "7FF"
520
+ },
521
+ "signal": {
522
+ "type": 0,
523
+ "byteorder": 0,
524
+ "bitpos": 0,
525
+ "length": 0,
526
+ "factor": 0,
527
+ "offset": 0
528
+ },
529
+ "trigger_high": 0,
530
+ "trigger_low": 0
531
+ }
532
+ }
533
+ },
534
+ "lin_1": {
535
+ "phy": {
536
+ "mode": 0,
537
+ "bit_rate": 19200
538
+ }
539
+ },
540
+ "lin_2": {
541
+ "phy": {
542
+ "mode": 0,
543
+ "bit_rate": 19200
544
+ }
545
+ },
546
+ "routing": [{
547
+ "name": "CAN9_Pos_To_CAN1",
548
+ "state": 1,
549
+ "log": 0,
550
+ "chn_src": 0,
551
+ "id_format_src": 0,
552
+ "id_src": "67",
553
+ "chn_dst": 1,
554
+ "id_format_dst": 0,
555
+ "id_dst": "42A"
556
+ }, {
557
+ "name": "LIN1_SoC_To_CAN2",
558
+ "state": 1,
559
+ "log": 0,
560
+ "chn_src": 3,
561
+ "id_format_src": 0,
562
+ "id_src": "22",
563
+ "chn_dst": 2,
564
+ "id_format_dst": 0,
565
+ "id_dst": "321"
566
+ }],
567
+ "connect": {
568
+ "cellular": {
569
+ "keyformat": 0,
570
+ "pin": "1234",
571
+ "apn": "myapn.net",
572
+ "roaming": 1
573
+ },
574
+ "protocol": 0,
575
+ "s3": {
576
+ "sync": {
577
+ "ota": 600,
578
+ "heartbeat": 300,
579
+ "logfiles": 1
580
+ },
581
+ "server": {
582
+ "endpoint": "https://s3.us-east-1.amazonaws.com",
583
+ "port": 443,
584
+ "bucket": "mytestbucket",
585
+ "region": "us-east-1",
586
+ "request_style": 1,
587
+ "accesskey": "AKIASLWXLZB45BCE2X5O",
588
+ "keyformat": 0,
589
+ "secretkey": "DiI12zYEf12312ASDZZZZdasdasihNqr9E34z",
590
+ "signed_payload": 0
591
+ }
592
+ }
593
+ },
594
+ "gnss": {
595
+ "system": 5,
596
+ "invalid_signals": 0,
597
+ "alignment": {
598
+ "method": 0,
599
+ "z": 0,
600
+ "y": 0,
601
+ "x": 0
602
+ },
603
+ "geofence": [],
604
+ "dyn_model": 0
605
+ }
606
+ };
607
+ dispatch(setConfigContent(demoContent));
608
+ dispatch(setUpdatedFormData(demoContent));
609
+ dispatch(setConfigFile([demoFileName]));
610
+ dispatch(publicSchemaFiles(demoConfig, schemaAry, demoContent, uiSchemaAry));
180
611
  }
181
612
  };
182
613
  };
@@ -338,11 +769,6 @@ var publicSchemaFiles = function publicSchemaFiles(selectedConfig, schemaAry, co
338
769
  return e.includes(deviceType);
339
770
  });
340
771
  }
341
- if (demoMode) {
342
- schemaAryFiltered = schemaAry.filter(function (e) {
343
- return e.includes("CANedge3");
344
- });
345
- }
346
772
  var loadedSchema = loadFile(schemaAryFiltered[0]);
347
773
  if (schemaAryFiltered[0] && loadedSchema) {
348
774
  dispatch(setSchemaFile(schemaAryFiltered));