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