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