Compare commits

..

10 Commits

Author SHA1 Message Date
Lynn Shi
cd60273495 Wifi 4732 EquipmentPortalController resets to defaults channels for equipment country change 2021-10-20 15:28:33 -04:00
norm-traxler
704f5c6047 Merge pull request #24 from Telecominfraproject/WIFI-4415
[WIFI 4415] update LedStatus to pass tests
2021-09-27 16:12:30 -04:00
Thomas-Leung2021
b7d396c6ce [WIFI-4415] remove unnecessary code 2021-09-27 13:25:06 -04:00
Thomas Leung
e8dd8724fb Merged in NETEXP-2959 (pull request #3)
[NETEXP-2959] update LedStatus to pass tests

Approved-by: mike.hansen
2021-09-24 16:53:44 -04:00
norm-traxler
267fb477a3 Merge pull request #19 from Telecominfraproject/WIFI-3224-Remote-client-mediatype
[WIFI-3224] change BaseRemoteClient from json contentType from UTF-8 …
2021-07-23 11:54:14 -04:00
Norm Traxler
04c844c2e2 [WIFI-3224] change BaseRemoteClient from json contentType from UTF-8 to UTF-16 (default) 2021-07-23 11:42:19 -04:00
Mike Hansen
72da490a3b Merge pull request #18 from Telecominfraproject/WIFI-3022
[WIFI-3022] fix for getting 00:00:00:00:00:00 mac address
2021-07-14 14:21:48 -04:00
Thomas-Leung2021
bb9c3ba1eb [WIFI-3022] add null checks convertMacStringToLongValue() 2021-07-14 13:53:49 -04:00
Thomas-Leung2021
7dd594644e [WIFI-3022] fix for getting 00:00:00:00:00:00 mac address 2021-07-13 17:33:46 -04:00
Mike Hansen
4c15a9650b Merge pull request #17 from Telecominfraproject/add-http-client-exception-to-tip-error-handler
add basePackes property back to CommonControllerAdvice. Add HttpClien…
2021-06-15 10:22:20 -04:00
4 changed files with 30 additions and 7 deletions

View File

@@ -1,7 +1,5 @@
package com.telecominfraproject.wlan.core.client;
import java.nio.charset.StandardCharsets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpHeaders;
@@ -22,7 +20,8 @@ public abstract class BaseRemoteClient {
protected HttpHeaders headers = new HttpHeaders();
{
headers.setContentType(new MediaType("application", "json", StandardCharsets.UTF_8));
// Note: APPLICATION_JSON_UTF8 is deprecated
headers.setContentType(MediaType.APPLICATION_JSON);
//Accept-Encoding: gzip,deflate
headers.set("Accept-Encoding", "gzip,deflate");
}

View File

@@ -0,0 +1,9 @@
package com.telecominfraproject.wlan.core.model.equipment;
public enum LedStatus {
led_on,
led_off,
led_blink,
UNKNOWN;
}

View File

@@ -82,9 +82,10 @@ public class MacAddress extends BaseJsonModel implements Comparable<MacAddress>
}
sb.setLength(sb.length() - 1);
return sb.toString();
}
return sb.toString();
return null;
}
@JsonIgnore
@@ -163,7 +164,7 @@ public class MacAddress extends BaseJsonModel implements Comparable<MacAddress>
private static byte[] stringToByteArray(String str) {
if (str == null)
if (str == null || str.equals(""))
{
return null;
}
@@ -300,7 +301,7 @@ public class MacAddress extends BaseJsonModel implements Comparable<MacAddress>
byte[] bval = stringToByteArray(macStr);
if (bval.length >= 6) {
if (bval != null && bval.length >= 6) {
long mac = 0;
for (var i = 0; i < 6; i++) {
long t = (bval[i] & 0xffL) << ((5 - i) * 8);

View File

@@ -73,5 +73,19 @@ public enum RadioType {
return false;
}
public static String getRadioDisplayString(RadioType radioType) {
// This display format matches UI
switch (radioType) {
case is2dot4GHz:
return "2.4GHz";
case is5GHz:
return "5GHz";
case is5GHzU:
return "5GHz (U)";
case is5GHzL:
return "5GHz (L)";
default:
return radioType.name();
}
}
}