config-editor-base 2.2.2 → 2.2.4

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
@@ -400,7 +400,7 @@ var checkConfigTransmitPeriodDelay = function checkConfigTransmitPeriodDelay(con
400
400
  if (transmitListFiltered.length > 0) {
401
401
  dispatch(set({
402
402
  type: "warning",
403
- message: "Your CAN CH" + i + " transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File",
403
+ message: "Your CAN CH" + i + " transmit list includes one or more entries with period <= delay. This is invalid and will cause the device to reject your Configuration File",
404
404
  autoClear: false
405
405
  }));
406
406
  }
@@ -528,6 +528,34 @@ var checkRTCAdjustment = function checkRTCAdjustment(content) {
528
528
  }
529
529
  };
530
530
  };
531
+ var checkConfigTlsPort = function checkConfigTlsPort(content) {
532
+ return function (dispatch) {
533
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined) {
534
+ if (content.connect.s3.server.endpoint != undefined && content.connect.s3.server.port != undefined) {
535
+ if (content.connect.s3.server.endpoint.includes("http://") && content.connect.s3.server.port == 443) {
536
+ dispatch(set({
537
+ type: "warning",
538
+ message: "Your S3 server endpoint does not use TLS (http://), but your port is 443. This is most likely incorrect and may result in the device being unable to connect. Please review the documentation on how to enable TLS",
539
+ autoClear: false
540
+ }));
541
+ }
542
+ }
543
+ }
544
+ };
545
+ };
546
+ var checkFileSplitValue = function checkFileSplitValue(content) {
547
+ return function (dispatch) {
548
+ if (content.log != undefined && content.log.file != undefined && content.log.file.split_time_period != undefined) {
549
+ if (content.log.file.split_time_period < 60 && content.log.file.split_time_period > 0) {
550
+ dispatch(set({
551
+ type: "warning",
552
+ message: "Your log files are currently set to split every " + content.log.file.split_time_period + " seconds. This increases the storage used (due to overhead) and reduces data transfer/processing performance. Consider increasing your split time",
553
+ autoClear: false
554
+ }));
555
+ }
556
+ }
557
+ };
558
+ };
531
559
  var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
532
560
  return function (dispatch) {
533
561
  if (content.can_2 != undefined) {
@@ -540,6 +568,8 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
540
568
  dispatch(checkWiFiEncryptedPasswordsNoKpub(content));
541
569
  dispatch(checkFileSplitOffsetPeriod(content));
542
570
  dispatch(checkRTCAdjustment(content));
571
+ dispatch(checkConfigTlsPort(content));
572
+ dispatch(checkFileSplitValue(content));
543
573
  }
544
574
  dispatch(setConfigContent(content));
545
575
  var blob = new Blob([JSON.stringify(content, null, 2)], {
@@ -646,6 +676,8 @@ var actions = {
646
676
  checkWiFiEncryptedPasswordsNoKpub: checkWiFiEncryptedPasswordsNoKpub,
647
677
  checkFileSplitOffsetPeriod: checkFileSplitOffsetPeriod,
648
678
  checkRTCAdjustment: checkRTCAdjustment,
679
+ checkConfigTlsPort: checkConfigTlsPort,
680
+ checkFileSplitValue: checkFileSplitValue,
649
681
  saveUpdatedConfiguration: saveUpdatedConfiguration,
650
682
  setUpdatedFormData: setUpdatedFormData,
651
683
  setUpdatedFormDataValue: setUpdatedFormDataValue,