diff --git a/htroot/Blacklist_p.java b/htroot/Blacklist_p.java index e9f73a00d..0e1718e49 100644 --- a/htroot/Blacklist_p.java +++ b/htroot/Blacklist_p.java @@ -250,8 +250,12 @@ public class Blacklist_p { * =========================================================== */ blacklistToUse = post.get("currentBlacklist", "").trim(); - - final String temp = addBlacklistEntry(blacklistToUse, post.get("newEntry", "").trim(), header, supportedBlacklistTypes); + String blentry = post.get("newEntry", "").trim(); + + // store this call as api call + listManager.switchboard.recordAPICall(post, "Blacklist_p.html", "blacklist", "add to blacklist: " + blentry); + + final String temp = addBlacklistEntry(blacklistToUse, blentry, header, supportedBlacklistTypes); if (temp != null) { prop.put("LOCATION", temp); return prop; diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java index 95714bf51..054247c0d 100644 --- a/htroot/ConfigBasic.java +++ b/htroot/ConfigBasic.java @@ -70,7 +70,10 @@ public class ConfigBasic { return prop; } - // starting a peer ping + // store this call as api call + if (post != null && post.containsKey("set")) { + sb.recordAPICall(post, "ConfigBasic.html", "configuration", "basic settings"); + } //boolean doPeerPing = false; if ((sb.peers.mySeed().isVirgin()) || (sb.peers.mySeed().isJunior())) { diff --git a/htroot/ConfigLanguage_p.java b/htroot/ConfigLanguage_p.java index efcedf281..277897012 100644 --- a/htroot/ConfigLanguage_p.java +++ b/htroot/ConfigLanguage_p.java @@ -46,6 +46,7 @@ import de.anomic.data.translator; import de.anomic.http.client.Client; import de.anomic.http.server.HeaderFramework; import de.anomic.http.server.RequestHeader; +import de.anomic.search.Switchboard; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; import java.util.Collections; @@ -72,6 +73,9 @@ public class ConfigLanguage_p { if (post != null){ String selectedLanguage = post.get("language"); + // store this call as api call + ((Switchboard) env).recordAPICall(post, "ConfigLanguage.html", "configuration", "language settings: " + selectedLanguage); + //change language if(post.containsKey("use_button") && selectedLanguage != null){ /* Only change language if filename is contained in list of filesnames diff --git a/htroot/ConfigNetwork_p.java b/htroot/ConfigNetwork_p.java index d7c4ab758..ef0d1c2c2 100644 --- a/htroot/ConfigNetwork_p.java +++ b/htroot/ConfigNetwork_p.java @@ -54,6 +54,9 @@ public class ConfigNetwork_p { if (post != null) { + // store this call as api call + sb.recordAPICall(post, "ConfigNetwork.html", "configuration", "network settings"); + if (post.containsKey("changeNetwork")) { final String networkDefinition = post.get("networkDefinition", "defaults/yacy.network.freeworld.unit"); if (networkDefinition.equals(sb.getConfig("network.unit.definition", ""))) { diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.java index f57872082..4206419fd 100644 --- a/htroot/ConfigPortal.java +++ b/htroot/ConfigPortal.java @@ -57,7 +57,11 @@ public class ConfigPortal { } } if (post.containsKey("searchpage_set")) { - sb.setConfig(SwitchboardConstants.GREETING, post.get(SwitchboardConstants.GREETING, "")); + String newGreeting = post.get(SwitchboardConstants.GREETING, ""); + // store this call as api call + sb.recordAPICall(post, "ConfigPortal.html", "appearance", "new portal design. greeting: " + newGreeting); + + sb.setConfig(SwitchboardConstants.GREETING, newGreeting); sb.setConfig(SwitchboardConstants.GREETING_HOMEPAGE, post.get(SwitchboardConstants.GREETING_HOMEPAGE, "")); sb.setConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, post.get(SwitchboardConstants.GREETING_LARGE_IMAGE, "")); sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, post.get(SwitchboardConstants.GREETING_SMALL_IMAGE, "")); diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.java index 070150d54..4dadbc9c4 100644 --- a/htroot/Crawler_p.java +++ b/htroot/Crawler_p.java @@ -130,16 +130,8 @@ public class Crawler_p { if (sb.peers == null) { prop.put("info", "3"); } else { - // log a GET url for this crawl start for possible use in cronjobs - Log.logInfo("CRAWLSTART-URL", "http://localhost:" + sb.getConfig("port", "8080") + "/Crawler_p.html?" + post.toString()); - - // set new properties - final boolean fullDomain = post.get("range", "wide").equals("domain"); // special property in simple crawl start - final boolean subPath = post.get("range", "wide").equals("subpath"); // special property in simple crawl start - String crawlingStart = post.get("crawlingURL","").trim(); // the crawljob start url - - // adding the prefix http:// if necessary + // add the prefix http:// if necessary int pos = crawlingStart.indexOf("://"); if (pos == -1) crawlingStart = "http://" + crawlingStart; @@ -147,6 +139,14 @@ public class Crawler_p { DigestURI crawlingStartURL = null; try {crawlingStartURL = new DigestURI(crawlingStart, null);} catch (final MalformedURLException e1) {} crawlingStart = (crawlingStartURL == null) ? null : crawlingStartURL.toNormalform(true, true); + + // store this call as api call + sb.recordAPICall(post, "Crawler_p.html", "crawler", "crawl start for " + crawlingStartURL.getHost()); + + // set new properties + final boolean fullDomain = post.get("range", "wide").equals("domain"); // special property in simple crawl start + final boolean subPath = post.get("range", "wide").equals("subpath"); // special property in simple crawl start + // set the crawling filter String newcrawlingMustMatch = post.get("mustmatch", CrawlProfile.MATCH_ALL); diff --git a/htroot/Settings_p.html b/htroot/Settings_p.html index a10298134..6b29782f4 100644 --- a/htroot/Settings_p.html +++ b/htroot/Settings_p.html @@ -18,6 +18,11 @@
  • Performance Settings for Memory
  • Performance Settings of Search Sequence
  • +