fix for bad json

pull/325/head
Michael Peter Christen 5 years ago
parent d62a8ec542
commit a20b61f5c0

@ -72,7 +72,8 @@ public class Network {
prop.put("menu", post == null ? 2 : (post.get("menu", "").equals("embed")) ? 0 : (post.get("menu","").equals("simple")) ? 1 : 2); prop.put("menu", post == null ? 2 : (post.get("menu", "").equals("embed")) ? 0 : (post.get("menu","").equals("simple")) ? 1 : 2);
if (sb.peers.mySeed() != null) prop.put("menu_newpeer_peerhash", sb.peers.mySeed().hash); if (sb.peers.mySeed() != null) prop.put("menu_newpeer_peerhash", sb.peers.mySeed().hash);
prop.setLocalized(!requestHeader.getPathInfo().endsWith(".xml")); String pathInfo = requestHeader.getPathInfo();
prop.setLocalized(!pathInfo.endsWith(".xml") && !pathInfo.endsWith(".json"));
prop.putHTML("page_networkTitle", sb.getConfig("network.unit.description", "unspecified")); prop.putHTML("page_networkTitle", sb.getConfig("network.unit.description", "unspecified"));
prop.putHTML("page_networkName", sb.getConfig(SwitchboardConstants.NETWORK_NAME, "unspecified")); prop.putHTML("page_networkName", sb.getConfig(SwitchboardConstants.NETWORK_NAME, "unspecified"));
final boolean overview = (post == null) || (post.get("page", "0").equals("0")); final boolean overview = (post == null) || (post.get("page", "0").equals("0"));

@ -7,14 +7,14 @@
"ppm": #[ppm]#, "ppm": #[ppm]#,
"qph": #[qph]#, "qph": #[qph]#,
"uptime": "#[uptime]#", "uptime": "#[uptime]#",
"links": "#[LCount]#", "links": #[LCount]#,
"words": "#[ICount]#", "words": #[ICount]#,
"rurls": "#[RCount]#", "rurls": #[RCount]#,
"lastseen": #[lastSeen]#, "lastseen": #[lastSeen]#,
"sendWords": "#[sI]#", "sendWords": #[sI]#,
"receivedWords": "#[rI]#", "receivedWords": #[rI]#,
"sendURLs": "#[sU]#", "sendURLs": #[sU]#,
"receivedURLs": "#[rU]#", "receivedURLs": #[rU]#,
"type": "#(type)#junior::senior::principal#(/type)#", "type": "#(type)#junior::senior::principal#(/type)#",
"direct": "#(type_direct)#direct::passive#(/type_direct)#", "direct": "#(type_direct)#direct::passive#(/type_direct)#",
"acceptcrawl": #[acceptcrawl]#, "acceptcrawl": #[acceptcrawl]#,
@ -24,7 +24,7 @@
"seedurl": "#[type_url]#", "seedurl": "#[type_url]#",
"age": #[age]#, "age": #[age]#,
"seeds": #[seeds]#, "seeds": #[seeds]#,
"connects": "#[connects]#", "connects": #[connects]#,
#{ips}#"ip": "#(c)##[ip]#::#[ip]##(/c)#",#{/ips}# #{ips}#"ip": "#(c)##[ip]#::#[ip]##(/c)#",#{/ips}#
#{ips}#"address": "#(c)##(ipv6)#::[#(/ipv6)##[ip]##(ipv6)#::]#(/ipv6)#:#[port]#::#(/c)#",#{/ips}# #{ips}#"address": "#(c)##(ipv6)#::[#(/ipv6)##[ip]##(ipv6)#::]#(/ipv6)#:#[port]#::#(/c)#",#{/ips}#

Loading…
Cancel
Save