Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
animation of the web structure picture
Michael Peter Christen8c06925984d0
diff --git a/htroot/WatchWebStructure_p.html b/htroot/WatchWebStructure_p.htmlindex 270f7e52f..da1a47d8d 100644--- a/htroot/WatchWebStructure_p.html+++ b/htroot/WatchWebStructure_p.html@@ -18,6 +18,21 @@text-align:right;}</style>+ <script type="text/javascript">+ <!--+ imagestub = "WebStructurePicture_p.png?host=#[besthost]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[time]#&colortext=#[colortext]#&colorback=#[colorback]#&colordot=#[colordot]#&colorline=#[colorline]#&colorlineend=#[colorlineend]#";+ idx = 0;+ setTimeout("doanimation()", 3000);+ function doanimation() {+ var accessPicture = document.getElementById("WebPicture");+ if (accessPicture != null) {+ idx++;+ accessPicture.src = imagestub + "&idx=" + idx;+ setTimeout("doanimation()", 3000);+ }+ }+ -->+ </script></head><body id="WebStructure" style="margin:0px;">#%env/templates/header.template%#@@ -93,7 +108,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de</form></div><br /><div style="text-align:right;">- <img src="WebStructurePicture_p.png?host=#[besthost]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[time]#&colortext=#[colortext]#&colorback=#[colorback]#&colordot=#[colordot]#&colorline=#[colorline]#&colorlineend=#[colorlineend]#" alt="WebStructurePicture"/>+ <img id="WebPicture" src="WebStructurePicture_p.png?host=#[besthost]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[time]#&colortext=#[colortext]#&colorback=#[colorback]#&colordot=#[colordot]#&colorline=#[colorline]#&colorlineend=#[colorlineend]#" alt="WebStructurePicture"/></div>#%env/templates/footer.template%#</body>diff --git a/htroot/WatchWebStructure_p.java b/htroot/WatchWebStructure_p.javaindex abf7e2f23..7ce0b2006 100644--- a/htroot/WatchWebStructure_p.java+++ b/htroot/WatchWebStructure_p.java@@ -64,11 +64,19 @@ public class WatchWebStructure_p {}}+ // fix start point if a "www."-prefix would be better+ if (host != null && !host.startsWith("www")) {+ if (sb.webStructure.referencesCount(DigestURI.hosthash6("www." + host)) > sb.webStructure.referencesCount(DigestURI.hosthash6(host))) {+ host = "www." + host;+ }+ }+// find start pointif (host == null ||host.length() == 0 ||- host.equals("auto") ||- sb.webStructure.referencesCount(DigestURI.hosthash6(host)) == 0) {+ host.equals("auto")+ // || sb.webStructure.referencesCount(DigestURI.hosthash6(host)) == 0+ ) {// find domain with most referencesbesthost = sb.webStructure.hostWithMaxReferences();if (besthost == null) besthost = host;diff --git a/htroot/WebStructurePicture_p.java b/htroot/WebStructurePicture_p.javaindex 6579a3865..bff661a28 100644--- a/htroot/WebStructurePicture_p.java+++ b/htroot/WebStructurePicture_p.java@@ -155,7 +155,7 @@ public class WebStructurePicture_p {int maxtargetrefs = 8, maxthisrefs = 8;int targetrefs, thisrefs;double rr, re;- while ((i.hasNext()) && (maxnodes > 0) && (System.currentTimeMillis() < timeout)) {+ while (i.hasNext() && maxnodes > 0 && System.currentTimeMillis() < timeout) {entry = i.next();targethash = entry.getKey();targethost = structure.hostHash2hostName(targethash);diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.templateindex 1551752b6..8ed8538c0 100644--- a/htroot/env/templates/header.template+++ b/htroot/env/templates/header.template@@ -35,7 +35,7 @@<h3>Monitoring</h3><ul class="menu"><li><a href="/Network.html" accesskey="w" class="MenuItemLink">YaCy Network</a></li>- <li><a href="/WatchWebStructure_p.html?host=auto&depth=2&time=1000" class="MenuItemLink lock">Web Visualization</a></li>+ <li><a href="/WatchWebStructure_p.html?host=auto&depth=3&time=1000" class="MenuItemLink lock">Web Visualization</a></li><li><a href="/AccessGrid_p.html" class="MenuItemLink lock">Network Access</a></li><li><a href="/ViewLog_p.html" class="MenuItemLink lock">Computation</a></li><li><a href="/terminal_p.html" accesskey="t" class="MenuItemLink lock">Terminal</a></li>diff --git a/source/net/yacy/peers/graphics/WebStructureGraph.java b/source/net/yacy/peers/graphics/WebStructureGraph.javaindex cc03c987a..ef466eee6 100644--- a/source/net/yacy/peers/graphics/WebStructureGraph.java+++ b/source/net/yacy/peers/graphics/WebStructureGraph.java@@ -130,12 +130,12 @@ public class WebStructureGraphdelcount--;}}+this.publicRefDNSResolvingWorker = new PublicRefDNSResolvingProcess();this.publicRefDNSResolvingWorker.start();}- private class PublicRefDNSResolvingProcess extends Thread- {+ private class PublicRefDNSResolvingProcess extends Thread {private PublicRefDNSResolvingProcess() {}@@ -664,8 +664,7 @@ public class WebStructureGraph// find host with most referencesString maxhost = null;int refsize, maxref = 0;- joinOldNew();- synchronized ( this.structure_new ) {+ synchronized ( this.structure_old ) {for ( final Map.Entry<String, String> entry : this.structure_old.entrySet() ) {refsize = entry.getValue().length();if ( refsize > maxref ) {@@ -674,6 +673,15 @@ public class WebStructureGraph}}}+ synchronized ( this.structure_new ) {+ for ( final Map.Entry<String, String> entry : this.structure_new.entrySet() ) {+ refsize = entry.getValue().length();+ if ( refsize > maxref ) {+ maxref = refsize;+ maxhost = entry.getKey().substring(7);+ }+ }+ }return maxhost;}