config-editor-base 2.2.6 → 2.2.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
@@ -518,7 +518,6 @@ var checkFileSplitOffsetPeriod = function checkFileSplitOffsetPeriod(content) {
518
518
  };
519
519
  var checkRTCAdjustment = function checkRTCAdjustment(content) {
520
520
  return function (dispatch) {
521
- console.log("content.rtc.adjustment", content.rtc.adjustment);
522
521
  if (content.connect != undefined && content.rtc != undefined && content.rtc.adjustment != undefined && content.rtc.adjustment > 400) {
523
522
  dispatch(set({
524
523
  type: "warning",
@@ -543,6 +542,22 @@ var checkConfigTlsPort = function checkConfigTlsPort(content) {
543
542
  }
544
543
  };
545
544
  };
545
+ var checkMissingAPN = function checkMissingAPN(content) {
546
+ return function (dispatch) {
547
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined) {
548
+ console.log("content.connect.cellular.apn", content.connect.cellular.apn);
549
+ if (content.connect.s3.server.endpoint != undefined && content.connect.cellular.apn != undefined) {
550
+ if (content.connect.s3.server.endpoint.includes("http") && content.connect.cellular.apn == "") {
551
+ dispatch(set({
552
+ type: "warning",
553
+ message: "Your SIM APN is blank. This is most likely incorrect and may result in the device being unable to connect. Please add the APN if it exists",
554
+ autoClear: false
555
+ }));
556
+ }
557
+ }
558
+ }
559
+ };
560
+ };
546
561
  var checkFileSplitValue = function checkFileSplitValue(content) {
547
562
  return function (dispatch) {
548
563
  if (content.log != undefined && content.log.file != undefined && content.log.file.split_time_period != undefined) {
@@ -570,6 +585,7 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
570
585
  dispatch(checkRTCAdjustment(content));
571
586
  dispatch(checkConfigTlsPort(content));
572
587
  dispatch(checkFileSplitValue(content));
588
+ dispatch(checkMissingAPN(content));
573
589
  }
574
590
  dispatch(setConfigContent(content));
575
591
  var blob = new Blob([JSON.stringify(content, null, 2)], {
@@ -677,6 +693,7 @@ var actions = {
677
693
  checkFileSplitOffsetPeriod: checkFileSplitOffsetPeriod,
678
694
  checkRTCAdjustment: checkRTCAdjustment,
679
695
  checkConfigTlsPort: checkConfigTlsPort,
696
+ checkMissingAPN: checkMissingAPN,
680
697
  checkFileSplitValue: checkFileSplitValue,
681
698
  saveUpdatedConfiguration: saveUpdatedConfiguration,
682
699
  setUpdatedFormData: setUpdatedFormData,