From 8d728d742b162f865fb835fe2ecf5f2a797c3c8b Mon Sep 17 00:00:00 2001 From: borg-0300 Date: Fri, 30 Sep 2005 13:46:25 +0000 Subject: [PATCH] remove my SVN 818 change git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@821 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Network.html | 17 +++- htroot/Network.java | 117 +++++++++--------------- htroot/env/grafics/CrawlNo.gif | Bin 148 -> 0 bytes htroot/env/grafics/CrawlYes.gif | Bin 146 -> 0 bytes htroot/env/grafics/DHTReceiveNo.gif | Bin 133 -> 0 bytes htroot/env/grafics/DHTReceiveYes.gif | Bin 131 -> 0 bytes htroot/env/grafics/JuniorDirect.gif | Bin 141 -> 0 bytes htroot/env/grafics/JuniorPassive.gif | Bin 141 -> 0 bytes htroot/env/grafics/PrincipalDirect.gif | Bin 142 -> 0 bytes htroot/env/grafics/PrincipalPassive.gif | Bin 140 -> 0 bytes htroot/env/grafics/SeniorDirect.gif | Bin 150 -> 0 bytes htroot/env/grafics/SeniorPassive.gif | Bin 151 -> 0 bytes htroot/env/grafics/Virgin.gif | Bin 154 -> 0 bytes 13 files changed, 55 insertions(+), 79 deletions(-) delete mode 100644 htroot/env/grafics/CrawlNo.gif delete mode 100644 htroot/env/grafics/CrawlYes.gif delete mode 100644 htroot/env/grafics/DHTReceiveNo.gif delete mode 100644 htroot/env/grafics/DHTReceiveYes.gif delete mode 100644 htroot/env/grafics/JuniorDirect.gif delete mode 100644 htroot/env/grafics/JuniorPassive.gif delete mode 100644 htroot/env/grafics/PrincipalDirect.gif delete mode 100644 htroot/env/grafics/PrincipalPassive.gif delete mode 100644 htroot/env/grafics/SeniorDirect.gif delete mode 100644 htroot/env/grafics/SeniorPassive.gif delete mode 100644 htroot/env/grafics/Virgin.gif diff --git a/htroot/Network.html b/htroot/Network.html index 7a869fea0..9f8f4aa8c 100644 --- a/htroot/Network.html +++ b/htroot/Network.html @@ -45,13 +45,15 @@ Hash
  Age
  #(/complete)# -Info
  +Type
  Release/
SVN

  +Contact
  Last
Seen

  < > UTC
Offset
  Uptime
  < > #Links
  < > #RWIs
  < > +accept
Crawl/
Index
  Sent
Words

  Sent
URLs

  Received
Words

  @@ -72,13 +74,16 @@ #[hash]# #[age]# #(/complete)# -#[info]# +#(type)#junior::senior::principal#(/type)# #[version]# +#(contact)#passive::direct#(/contact)# #[lastSeen]# #[utc]# #[uptime]# #[links]# #[words]# +#(acceptcrawl)#-::C#(/acceptcrawl)# /  + #(acceptindex)#-::I#(/acceptindex)# #[sI]# #[sU]# #[rI]# @@ -132,12 +137,14 @@ YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Act - + + + @@ -148,12 +155,14 @@ YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Act - + + + diff --git a/htroot/Network.java b/htroot/Network.java index 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-info prop.put("table_my-name", seed.get("Name", "-") ); if (yacyCore.seedDB.mySeed.isVirgin()) { - info.append(""); + prop.put("table_my-type", 0); } else if(yacyCore.seedDB.mySeed.isJunior()) { - info.append(""); + prop.put("table_my-type", 1); accPotLinks += links; accPotWords += words; } else if(yacyCore.seedDB.mySeed.isSenior()) { - info.append(""); + prop.put("table_my-type", 2); accActLinks += links; accActWords += words; } else if(yacyCore.seedDB.mySeed.isPrincipal()) { - info.append(""); + prop.put("table_my-type", 3); accActLinks += links; accActWords += words; } - if (seed.getFlagAcceptRemoteCrawl()) { - info.append(""); - } else { - info.append(""); - } - if (seed.getFlagAcceptRemoteIndex()) { - info.append(""); - } else { - info.append(""); - } - 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(""); + alert.append(""); } 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(""); + alert.append(""); } 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(""); + alert.append(""); } - 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(""); - } else { - info.append(""); - } + prop.put(STR_TABLE_LIST+conCount+"_type", 0); } else if(seed.isSenior()){ - if (seed.getFlagDirectConnect()) { - info.append(""); - } else { - info.append(""); - } + prop.put(STR_TABLE_LIST+conCount+"_type", 1); } else if(seed.isPrincipal()) { - info.append(""); - if (seed.getFlagDirectConnect()) { - info.append(""); - } else { - info.append(""); - } - info.append(""); - } - if (seed.getFlagAcceptRemoteCrawl()) { - info.append(""); - } else { - info.append(""); - } - if (seed.getFlagAcceptRemoteIndex()) { - info.append(""); - } else { - info.append(""); + 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.gif deleted file mode 100644 index 40de627ede1d1ecc6284880cb5b4b596f52ddd1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmZ?wbhEHbRx&6Ax*g2cFcM_21^|ytF0KFo diff --git a/htroot/env/grafics/DHTReceiveNo.gif b/htroot/env/grafics/DHTReceiveNo.gif deleted file mode 100644 index 74da91a268e267cba1a1800f9bc4914427d86e25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 133 zcmZ?wbhEHb`h4hCxg-nS${ diff --git a/htroot/env/grafics/DHTReceiveYes.gif b/htroot/env/grafics/DHTReceiveYes.gif deleted file mode 100644 index 1ccfe76411788306a1d4e26889540537c7cca2b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131 zcmZ?wbhEHbO>tphum%8T3nZ-o diff --git a/htroot/env/grafics/JuniorDirect.gif b/htroot/env/grafics/JuniorDirect.gif deleted file mode 100644 index 04eac03d70aa3a6762724767e74cad8d0c9b0fe9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmZ?wbhEHbXFkX*aazLqwzW%#i_Z+7@b%$g*TS41IH#UW z&AgbI{wclqM{&dd2F0H&Ku!M{bbut#1a1Zf7OR32m!hfWRO%%ETPNOauTsX2Uew diff --git a/htroot/env/grafics/PrincipalDirect.gif b/htroot/env/grafics/PrincipalDirect.gif deleted file mode 100644 index 4c6d572267bdf41b276ace521f1efdd57b898d4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142 zcmZ?wbhEHbyw$07;+;+zbpX))zdkXifTLaKKTcJ%rK8iKQV)!H-#> tZ!@p=<$Z=9!^)qBnuTjF>@bbci_qC-&@<)O8Ma#-iCI&ZsW35E0{~SEEeHSr diff --git a/htroot/env/grafics/PrincipalPassive.gif b/htroot/env/grafics/PrincipalPassive.gif deleted file mode 100644 index e0995eb625e1809c0d80920d7c1a12273e214215..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 140 zcmZ?wbhEHb2ucW{_wW7Fg2wlOH^KQr@x35oxx<6#yK~O rb4)xT++}q&{d%^mtveBILADW z$-0(R@VTJje**&pgW^vXAo-s`2S@@<;AUW8ah~9@`I1r4G_wYAA4OAk1A~s60&SNK z`z{|j^=OKk(dp{vjO=kb(>|C=>9QngFc^rmxP5NWU=3^OG2Nk%w1VG95Y0D}Mk1PBBcEfzCjFh`C@TeVwqlSyr)QfJO*dh>ew1_R|U z7r}WwyM{xS&uEJ0bb$YWA^8LV00930EC2ui01E&M000C>Fv->Gl2V!TIx>pn1VQ%< zfs-sJz&(NRFwJuS!-Kd_<8-7}$5DF-0Ek$p!FmvI078e6`0W75hbp1?9c7LXhEWg{ IsFDZ(JBX(`q5uE@
NameInfoType Version UTC Uptime #Links #RWIsAccept
Crawl
Accept
Index
Sent
Words
Sent
URLs
Received
Words
#[my-name]##[my-info]##(my-type)#virgin::junior::senior::principal#(/my-type)# #[my-version]# #[my-utc]# #[my-uptime]# #[my-links]# #[my-words]##(my-acceptcrawl)#no::yes#(/my-acceptcrawl)##(my-acceptindex)#no::yes#(/my-acceptindex)# #[my-sI]# #[my-sU]# #[my-rI]#