Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
remove my SVN 818 change
borg-03008d728d742b16
diff --git a/htroot/Network.html b/htroot/Network.htmlindex 7a869fea0..9f8f4aa8c 100644--- a/htroot/Network.html+++ b/htroot/Network.html@@ -45,13 +45,15 @@<td class="small"><b>Hash</b><br> </td><td class="small"><b>Age</b><br> </td>#(/complete)#-<td class="small"><b>Info</b><br> </td>+<td class="small"><b>Type</b><br> </td><td class="small"><b>Release/<br>SVN</b><br> </td>+<td class="small"><b>Contact</b><br> </td><td class="small"><b>Last<br>Seen</b><br> <a href="/Network.html?page=#[page]#&sort=LastSeen&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=LastSeen&order=down">></a></td><td class="small"><b>UTC</b><br>Offset<br> </td><td class="small"><b>Uptime</b><br> <a href="/Network.html?page=#[page]#&sort=Uptime&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=Uptime&order=down">></a></td><td class="small"><b>#Links</b><br> <a href="/Network.html?page=#[page]#&sort=LCount&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=LCount&order=down">></a></td><td class="small"><b>#RWIs</b><br> <a href="/Network.html?page=#[page]#&sort=ICount&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=ICount&order=down">></a></td>+<td class="small">accept<br><b>Crawl</b>/<br><b>Index</b><br> </td><td class="small"><b>Sent<br>Words</b><br> </td><td class="small"><b>Sent<br>URLs</b><br> </td><td class="small"><b>Received<br>Words</b><br> </td>@@ -72,13 +74,16 @@<td class=small>#[hash]#</td><td class=small>#[age]#</td>#(/complete)#-<td class="small">#[info]#</td>+<td class="small">#(type)#junior::senior::<a href="#[url]#" class="small">principal</a>#(/type)#</td><td class="small" align="right">#[version]#</td>+<td class="small" align="right">#(contact)#passive::direct#(/contact)#</td><td class="small" align="right">#[lastSeen]#</td><td class="small" align="right">#[utc]#</td><td class="small" align="right"><NOBR>#[uptime]#</NOBR></td><td class="small" align="right">#[links]#</td><td class="small" align="right">#[words]#</td>+<td class="small" align="right">#(acceptcrawl)#-::C#(/acceptcrawl)# / + #(acceptindex)#-::I#(/acceptindex)#</td><td class="small" align="right">#[sI]#</td><td class="small" align="right">#[sU]#</td><td class="small" align="right">#[rI]#</td>@@ -132,12 +137,14 @@ YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Act<table border="0" cellpadding="2" cellspacing="1"><tr class="TableHeader"><td class="small">Name</td>-<td class="small">Info</td>+<td class="small">Type</td><td class="small">Version</td><td class="small">UTC</td><td class="small">Uptime</td><td class="small">#Links</td><td class="small">#RWIs</td>+<td class="small">Accept<br>Crawl</td>+<td class="small">Accept<br>Index</td><td class="small">Sent<br>Words</td><td class="small">Sent<br>URLs</td><td class="small">Received<br>Words</td>@@ -148,12 +155,14 @@ YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Act</tr><tr class="TableCellDark"><td class="small">#[my-name]#</td>-<td class="small">#[my-info]#</td>+<td class="small">#(my-type)#virgin::junior::senior::principal#(/my-type)#</td><td class="small" align="right">#[my-version]#</td><td class="small" align="right">#[my-utc]#</td><td class="small" align="right">#[my-uptime]#</td><td class="small" align="right">#[my-links]#</td><td class="small" align="right">#[my-words]#</td>+<td class="small" align="right">#(my-acceptcrawl)#no::yes#(/my-acceptcrawl)#</td>+<td class="small" align="right">#(my-acceptindex)#no::yes#(/my-acceptindex)#</td><td class="small" align="right">#[my-sI]#</td><td class="small" align="right">#[my-sU]#</td><td class="small" align="right">#[my-rI]#</td>diff --git a/htroot/Network.java b/htroot/Network.javaindex aa6e0215e..6c10e4361 100644--- a/htroot/Network.java+++ b/htroot/Network.java@@ -5,9 +5,9 @@// first published on http://www.anomic.de// Frankfurt, Germany, 2004, 2005//-// $LastChangedDate$-// $LastChangedRevision$-// $LastChangedBy$+// $LastChangedDate:$+// $LastChangedRevision:$+// $LastChangedBy:$//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by@@ -72,8 +72,6 @@ public class Network {final String mySeedType = yacyCore.seedDB.mySeed.get(yacySeed.PEERTYPE, yacySeed.PEERTYPE_VIRGIN);final boolean iAmActive = (mySeedType.equals(yacySeed.PEERTYPE_SENIOR) || mySeedType.equals(yacySeed.PEERTYPE_PRINCIPAL));- final StringBuffer info = new StringBuffer(512);-if (overview) {long accActLinks = yacyCore.seedDB.countActiveURL();long accActWords = yacyCore.seedDB.countActiveRWI();@@ -100,42 +98,30 @@ public class Network {words = Long.parseLong(seed.get("ICount", "0"));} catch (Exception e) {links = 0; words = 0;}- // my-infoprop.put("table_my-name", seed.get("Name", "-") );if (yacyCore.seedDB.mySeed.isVirgin()) {- info.append("<img border=\"0\" src=\"/env/grafics/Virgin.gif\" title=\"Type: Virgin\"></img>");+ prop.put("table_my-type", 0);} else if(yacyCore.seedDB.mySeed.isJunior()) {- info.append("<img border=\"0\" src=\"/env/grafics/JuniorDirect.gif\" title=\"Type: Junior\"></img>");+ prop.put("table_my-type", 1);accPotLinks += links;accPotWords += words;} else if(yacyCore.seedDB.mySeed.isSenior()) {- info.append("<img border=\"0\" src=\"/env/grafics/SeniorDirect.gif\" title=\"Type: Senior\"></img>");+ prop.put("table_my-type", 2);accActLinks += links;accActWords += words;} else if(yacyCore.seedDB.mySeed.isPrincipal()) {- info.append("<img border=\"0\" src=\"/env/grafics/PrincipalDirect.gif\" title=\"Type: Principal\"></img>");+ prop.put("table_my-type", 3);accActLinks += links;accActWords += words;}- if (seed.getFlagAcceptRemoteCrawl()) {- info.append("<img border=\"0\" src=\"/env/grafics/CrawlYes.gif\" title=\"Accept Crawl: yes\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/CrawlNo.gif\" title=\"Accept Crawl: no\"></img>");- }- if (seed.getFlagAcceptRemoteIndex()) {- info.append("<img border=\"0\" src=\"/env/grafics/DHTReceiveYes.gif\" title=\"DHT Receive: yes\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/DHTReceiveNo.gif\" title=\"DHT Receive: no\"></img>");- }- prop.put("table_my-info", info.toString());--myppm = seed.getPPM();prop.put("table_my-version", seed.get("Version", "-"));prop.put("table_my-utc", seed.get("UTC", "-"));prop.put("table_my-uptime", serverDate.intervalToString(60000 * Long.parseLong(seed.get("Uptime", ""))));prop.put("table_my-links", groupDigits(Long.toString(links)));prop.put("table_my-words", groupDigits(Long.toString(words)));+ prop.put("table_my-acceptcrawl", Integer.toString(seed.getFlagAcceptRemoteCrawl() ? 1 : 0) );+ prop.put("table_my-acceptindex", Integer.toString(seed.getFlagAcceptRemoteIndex() ? 1 : 0) );prop.put("table_my-sI", groupDigits(seed.get(yacySeed.INDEX_OUT, "0")));prop.put("table_my-sU", groupDigits(seed.get(yacySeed.URL_OUT, "0")));prop.put("table_my-rI", groupDigits(seed.get(yacySeed.INDEX_IN, "0")));@@ -270,8 +256,9 @@ public class Network {}String startURL;String wikiPage;+ final StringBuffer alert = new StringBuffer();int PPM;- while (e.hasMoreElements() && conCount < maxCount) {+ while ((e.hasMoreElements()) && (conCount < maxCount)) {seed = (yacySeed) e.nextElement();if (seed != null) {if (conCount >= maxCount) { break; }@@ -280,15 +267,15 @@ public class Network {} else {prop.put(STR_TABLE_LIST+conCount+"_dark", ((dark) ? 1 : 0) ); dark=!dark;}- info.setLength(0);+ alert.setLength(0);if (updatedProfile.contains(seed.hash)) {- info.append("<a href=\"ViewProfile.html?hash=").append(seed.hash).append("\"><img border=\"0\" src=\"/env/grafics/profile.gif\" align=\"bottom\"></a>");+ alert.append("<a href=\"ViewProfile.html?hash=").append(seed.hash).append("\"><img border=\"0\" src=\"/env/grafics/profile.gif\" align=\"bottom\"></a>");}if ((wikiPage = (String) updatedWiki.get(seed.hash)) == null) {prop.put(STR_TABLE_LIST+conCount+"_updatedWikiPage", "");} else {prop.put(STR_TABLE_LIST+conCount+"_updatedWikiPage", "?page=" + wikiPage);- info.append("<a href=\"http://").append(seed.get("Name", "deadlink")).append(".yacy/Wiki.html?page=").append(wikiPage).append("\"><img border=\"0\" src=\"/env/grafics/wiki.gif\" align=\"bottom\"></a>");+ alert.append("<a href=\"http://").append(seed.get("Name", "deadlink")).append(".yacy/Wiki.html?page=").append(wikiPage).append("\"><img border=\"0\" src=\"/env/grafics/wiki.gif\" align=\"bottom\"></a>");}try {PPM = Integer.parseInt(seed.get("ISpeed", "-"));@@ -296,9 +283,15 @@ public class Network {PPM = 0;}if (((startURL = (String) isCrawling.get(seed.hash)) != null) && (PPM >= 10)) {- info.append("<a href=\"").append(startURL).append("\"><img border=\"0\" src=\"/env/grafics/crawl.gif\" align=\"bottom\"></a>");+ alert.append("<a href=\"").append(startURL).append("\"><img border=\"0\" src=\"/env/grafics/crawl.gif\" align=\"bottom\"></a>");}- prop.put(STR_TABLE_LIST+conCount+"_alert", info.toString());+ prop.put(STR_TABLE_LIST+conCount+"_alert", alert.toString());+ long links;+ long words;+ try {+ links = Long.parseLong(seed.get("LCount", "0"));+ words = Long.parseLong(seed.get("ICount", "0"));+ } catch (Exception exc) {links = 0; words = 0;}prop.put(STR_TABLE_LIST+conCount+"_hash", seed.hash);String shortname = seed.get("Name", "deadlink");if (shortname.length() > 20) {@@ -312,52 +305,26 @@ public class Network {prop.put(STR_TABLE_LIST+conCount+"_complete_port", seed.get("Port", "-") );prop.put(STR_TABLE_LIST+conCount+"_complete_hash", seed.hash);prop.put(STR_TABLE_LIST+conCount+"_complete_age", seed.getAge());- } else {+ }else{prop.put(STR_TABLE_LIST+conCount+"_complete", 0);}--- info.setLength(0);if (seed.isJunior()) {- if (seed.getFlagDirectConnect()) {- info.append("<img border=\"0\" src=\"/env/grafics/JuniorDirect.gif\" title=\"Type: Junior | Contact: direct\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/JuniorPassive.gif\" title=\"Type: Junior | Contact: passive\"></img>");- }+ prop.put(STR_TABLE_LIST+conCount+"_type", 0);} else if(seed.isSenior()){- if (seed.getFlagDirectConnect()) {- info.append("<img border=\"0\" src=\"/env/grafics/SeniorDirect.gif\" title=\"Type: Senior | Contact: direct\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/SeniorPassive.gif\" title=\"Type: Senior | Contact: passive\"></img>");- }+ prop.put(STR_TABLE_LIST+conCount+"_type", 1);} else if(seed.isPrincipal()) {- info.append("<a href=\"").append(seed.get("seedURL", "http://nowhere/")).append("\">");- if (seed.getFlagDirectConnect()) {- info.append("<img border=\"0\" src=\"/env/grafics/PrincipalDirect.gif\" title=\"Type: Principal | Contact: direct | Seed download: possible\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/PrincipalPassive.gif\" title=\"Type: Principal | Contact: passive\"></img>");- }- info.append("</a>");- }- if (seed.getFlagAcceptRemoteCrawl()) {- info.append("<img border=\"0\" src=\"/env/grafics/CrawlYes.gif\" title=\"Accept Crawl: yes\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/CrawlNo.gif\" title=\"Accept Crawl: no\"></img>");- }- if (seed.getFlagAcceptRemoteIndex()) {- info.append("<img border=\"0\" src=\"/env/grafics/DHTReceiveYes.gif\" title=\"DHT Receive: yes\"></img>");- } else {- info.append("<img border=\"0\" src=\"/env/grafics/DHTReceiveNo.gif\" title=\"DHT Receive: no\"></img>");+ prop.put(STR_TABLE_LIST+conCount+"_type", 2);+ prop.put(STR_TABLE_LIST+conCount+"_type_url", seed.get("seedURL", "http://nowhere/") );}- prop.put(STR_TABLE_LIST+conCount+"_info", info.toString());--prop.put(STR_TABLE_LIST+conCount+"_version", yacy.combinedVersionString2PrettyString(seed.get("Version", "0.1")));+ prop.put(STR_TABLE_LIST+conCount+"_contact", (seed.getFlagDirectConnect() ? 1 : 0));prop.put(STR_TABLE_LIST+conCount+"_lastSeen", (System.currentTimeMillis() - seed.getLastSeenTime()) / 1000 / 60);prop.put(STR_TABLE_LIST+conCount+"_utc", seed.get("UTC", "-"));prop.put(STR_TABLE_LIST+conCount+"_uptime", serverDate.intervalToString(60000 * Long.parseLong(seed.get("Uptime", "0"))));- prop.put(STR_TABLE_LIST+conCount+"_links", groupDigits(seed.get("LCount", "0")));- prop.put(STR_TABLE_LIST+conCount+"_words", groupDigits(seed.get("ICount", "0")));+ prop.put(STR_TABLE_LIST+conCount+"_links", groupDigits(Long.toString(links)));+ prop.put(STR_TABLE_LIST+conCount+"_words", groupDigits(Long.toString(words)));+ prop.put(STR_TABLE_LIST+conCount+"_acceptcrawl", (seed.getFlagAcceptRemoteCrawl() ? 1 : 0) );+ prop.put(STR_TABLE_LIST+conCount+"_acceptindex", (seed.getFlagAcceptRemoteIndex() ? 1 : 0) );prop.put(STR_TABLE_LIST+conCount+"_sI", groupDigits(seed.get(yacySeed.INDEX_OUT, "0")));prop.put(STR_TABLE_LIST+conCount+"_sU", groupDigits(seed.get(yacySeed.URL_OUT, "0")));prop.put(STR_TABLE_LIST+conCount+"_rI", groupDigits(seed.get(yacySeed.INDEX_IN, "0")));@@ -389,17 +356,17 @@ public class Network {return prop;}- private static String groupDigits(String sValue) {- long lValue;+ private static String groupDigits(String Number) {+ long n;try {- if (sValue.endsWith(".0")) { sValue = sValue.substring(0, sValue.length() - 2); } // for Connects per hour, why float ?- lValue = Long.parseLong(sValue);- } catch (Exception e) {lValue = 0;}- if (lValue == 0) { return "-"; }- sValue = Long.toString(lValue);- String rValue = "";- for (int i = 0; i < sValue.length(); i++) { rValue = sValue.charAt(sValue.length() - i - 1) + (((i % 3) == 0) ? "." : "") + rValue; }- return rValue.substring(0, rValue.length() - 1);+ if (Number.endsWith(".0")) { Number = Number.substring(0, Number.length() - 2); } // for Connects per hour, why float ?+ n = Long.parseLong(Number);+ } catch (Exception e) {n = 0;}+ if (n == 0) { return "-"; }+ final String s = Long.toString(n);+ String t = "";+ for (int i = 0; i < s.length(); i++) { t = s.charAt(s.length() - i - 1) + (((i % 3) == 0) ? "." : "") + t; }+ return t.substring(0, t.length() - 1);}private static String groupDigits(long Number) {diff --git a/htroot/env/grafics/CrawlNo.gif b/htroot/env/grafics/CrawlNo.gifdeleted file mode 100644index 40de627ed..000000000Binary files a/htroot/env/grafics/CrawlNo.gif and /dev/null differdiff --git a/htroot/env/grafics/CrawlYes.gif b/htroot/env/grafics/CrawlYes.gifdeleted file mode 100644index 66ad18db5..000000000Binary files a/htroot/env/grafics/CrawlYes.gif and /dev/null differdiff --git a/htroot/env/grafics/DHTReceiveNo.gif b/htroot/env/grafics/DHTReceiveNo.gifdeleted file mode 100644index 74da91a26..000000000Binary files a/htroot/env/grafics/DHTReceiveNo.gif and /dev/null differdiff --git a/htroot/env/grafics/DHTReceiveYes.gif b/htroot/env/grafics/DHTReceiveYes.gifdeleted file mode 100644index 1ccfe7641..000000000Binary files a/htroot/env/grafics/DHTReceiveYes.gif and /dev/null differdiff --git a/htroot/env/grafics/JuniorDirect.gif b/htroot/env/grafics/JuniorDirect.gifdeleted file mode 100644index 04eac03d7..000000000Binary files a/htroot/env/grafics/JuniorDirect.gif and /dev/null differdiff --git a/htroot/env/grafics/JuniorPassive.gif b/htroot/env/grafics/JuniorPassive.gifdeleted file mode 100644index afd577ed6..000000000Binary files a/htroot/env/grafics/JuniorPassive.gif and /dev/null differdiff --git a/htroot/env/grafics/PrincipalDirect.gif b/htroot/env/grafics/PrincipalDirect.gifdeleted file mode 100644index 4c6d57226..000000000Binary files a/htroot/env/grafics/PrincipalDirect.gif and /dev/null differdiff --git a/htroot/env/grafics/PrincipalPassive.gif b/htroot/env/grafics/PrincipalPassive.gifdeleted file mode 100644index e0995eb62..000000000Binary files a/htroot/env/grafics/PrincipalPassive.gif and /dev/null differdiff --git a/htroot/env/grafics/SeniorDirect.gif b/htroot/env/grafics/SeniorDirect.gifdeleted file mode 100644index bf0d2dcd0..000000000Binary files a/htroot/env/grafics/SeniorDirect.gif and /dev/null differdiff --git a/htroot/env/grafics/SeniorPassive.gif b/htroot/env/grafics/SeniorPassive.gifdeleted file mode 100644index 348a7f2d9..000000000Binary files a/htroot/env/grafics/SeniorPassive.gif and /dev/null differdiff --git a/htroot/env/grafics/Virgin.gif b/htroot/env/grafics/Virgin.gifdeleted file mode 100644index f6362c9b7..000000000Binary files a/htroot/env/grafics/Virgin.gif and /dev/null differ