config-editor-base 2.2.3 → 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.
@@ -525,6 +525,34 @@ var checkRTCAdjustment = function checkRTCAdjustment(content) {
525
525
  }
526
526
  };
527
527
  };
528
+ var checkConfigTlsPort = function checkConfigTlsPort(content) {
529
+ return function (dispatch) {
530
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined) {
531
+ if (content.connect.s3.server.endpoint != undefined && content.connect.s3.server.port != undefined) {
532
+ if (content.connect.s3.server.endpoint.includes("http://") && content.connect.s3.server.port == 443) {
533
+ dispatch(set({
534
+ type: "warning",
535
+ 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",
536
+ autoClear: false
537
+ }));
538
+ }
539
+ }
540
+ }
541
+ };
542
+ };
543
+ var checkFileSplitValue = function checkFileSplitValue(content) {
544
+ return function (dispatch) {
545
+ if (content.log != undefined && content.log.file != undefined && content.log.file.split_time_period != undefined) {
546
+ if (content.log.file.split_time_period < 60 && content.log.file.split_time_period > 0) {
547
+ dispatch(set({
548
+ type: "warning",
549
+ 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",
550
+ autoClear: false
551
+ }));
552
+ }
553
+ }
554
+ };
555
+ };
528
556
  var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
529
557
  return function (dispatch) {
530
558
  if (content.can_2 != undefined) {
@@ -537,6 +565,8 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
537
565
  dispatch(checkWiFiEncryptedPasswordsNoKpub(content));
538
566
  dispatch(checkFileSplitOffsetPeriod(content));
539
567
  dispatch(checkRTCAdjustment(content));
568
+ dispatch(checkConfigTlsPort(content));
569
+ dispatch(checkFileSplitValue(content));
540
570
  }
541
571
  dispatch(setConfigContent(content));
542
572
  var blob = new Blob([JSON.stringify(content, null, 2)], {
@@ -643,6 +673,8 @@ var actions = {
643
673
  checkWiFiEncryptedPasswordsNoKpub: checkWiFiEncryptedPasswordsNoKpub,
644
674
  checkFileSplitOffsetPeriod: checkFileSplitOffsetPeriod,
645
675
  checkRTCAdjustment: checkRTCAdjustment,
676
+ checkConfigTlsPort: checkConfigTlsPort,
677
+ checkFileSplitValue: checkFileSplitValue,
646
678
  saveUpdatedConfiguration: saveUpdatedConfiguration,
647
679
  setUpdatedFormData: setUpdatedFormData,
648
680
  setUpdatedFormDataValue: setUpdatedFormDataValue,