config-editor-base 2.7.2 → 2.7.3

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
@@ -590,6 +590,32 @@ var checkMissingAPN = function checkMissingAPN(content) {
590
590
  }
591
591
  };
592
592
  };
593
+ var checkMissingWiFi = function checkMissingWiFi(content) {
594
+ return function (dispatch) {
595
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.wifi != undefined && content.connect.wifi.accesspoint != undefined) {
596
+ if (content.connect.s3.server.endpoint != undefined && content.connect.wifi.accesspoint.length == 0 && content.connect.s3.server.endpoint.includes("http")) {
597
+ dispatch(set({
598
+ type: "warning",
599
+ message: "Your S3 details appear populated, but you have added no WiFi details. Your device will therefore be unable to connect to your server.",
600
+ autoClear: false
601
+ }));
602
+ }
603
+ }
604
+ };
605
+ };
606
+ var checkMissingS3IfWiFi = function checkMissingS3IfWiFi(content) {
607
+ return function (dispatch) {
608
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.wifi != undefined && content.connect.wifi.accesspoint != undefined) {
609
+ if (content.connect.wifi.accesspoint.length > 0 && content.connect.protocol != undefined && content.connect.protocol == 0 && (content.connect.s3.server.endpoint != undefined && !content.connect.s3.server.endpoint.includes("http") || content.connect.s3.server.endpoint == undefined)) {
610
+ dispatch(set({
611
+ type: "warning",
612
+ message: "Your have added WiFi details, but no S3 endpoint is added. Your device will therefore be unable to connect to your server.",
613
+ autoClear: false
614
+ }));
615
+ }
616
+ }
617
+ };
618
+ };
593
619
  var checkIncorrectAPNTelekom = function checkIncorrectAPNTelekom(content) {
594
620
  return function (dispatch) {
595
621
  if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined) {
@@ -685,6 +711,8 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
685
711
  dispatch(checkConfigTlsPort(content));
686
712
  dispatch(checkFileSplitValue(content));
687
713
  dispatch(checkMissingAPN(content));
714
+ dispatch(checkMissingWiFi(content));
715
+ dispatch(checkMissingS3IfWiFi(content));
688
716
  dispatch(checkIncorrectAPNSuperSIM(content));
689
717
  dispatch(checkIncorrectAPNTelekom(content));
690
718
  dispatch(checkIncorrectAPNSpaces(content));
@@ -800,6 +828,8 @@ var actions = {
800
828
  checkRTCAdjustment: checkRTCAdjustment,
801
829
  checkConfigTlsPort: checkConfigTlsPort,
802
830
  checkMissingAPN: checkMissingAPN,
831
+ checkMissingWiFi: checkMissingWiFi,
832
+ checkMissingS3IfWiFi: checkMissingS3IfWiFi,
803
833
  checkIncorrectAPNTelekom: checkIncorrectAPNTelekom,
804
834
  checkIncorrectAPNSuperSIM: checkIncorrectAPNSuperSIM,
805
835
  checkIncorrectRoamingSuperSIM: checkIncorrectRoamingSuperSIM,