Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- integrated the collage into the Web Visualization menu - added a counter for the public and private queue on the page (testing..) - fixed wrong public/private categorization
orbiter8313d58ae736
diff --git a/htroot/Collage.html b/htroot/Collage.htmlindex 5ab3d80b6..753c91f26 100755--- a/htroot/Collage.html+++ b/htroot/Collage.html@@ -1,18 +1,44 @@<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">- <head>- <title>YaCy '#[clientname]#': Collage</title>- #%env/templates/metas.template%#- <meta http-equiv="REFRESH" content="5" />- </head>- <body style="margin:0px;">- #%env/templates/header.template%#- #(imgurl)#- ::- #{list}#- #[url]#- #{/list}#- #(/imgurl)#- #%env/templates/footer.template%#- </body>+<head>+<title>YaCy '#[clientname]#': Collage</title>+#%env/templates/metas.template%#+<style type="text/css">+#left {+ float: left;+ width: 224px;+}+form dt {+ width: 40px;+}+form dd {+ width: 130px;+ text-align:right;+}+</style><meta http-equiv="REFRESH" content="5" />+</head>+<body style="margin:0px;">+#%env/templates/header.template%#+#%env/templates/submenuWebStructure.template%#+<h2>Collage</h2>++<div id="left">+<form action="/Collage.html">+<dl>+ <dt>Private Queue</dt>+ <dd>#[privateQueueSize]#</dd>+ <dt>Public Queue</dt>+ <dd>#[publicQueueSize]#</dd>+</dl>+</form>+</div>++#(imgurl)#+::+ #{list}#+ #[url]#+ #{/list}#+#(/imgurl)#+#%env/templates/footer.template%#+</body></html>\ No newline at end of filediff --git a/htroot/Collage.java b/htroot/Collage.javaindex b82b1dadb..e27fefba7 100755--- a/htroot/Collage.java+++ b/htroot/Collage.java@@ -60,11 +60,11 @@ public class Collage {private static Integer imgPosX[] = new Integer[fifoMax];private static Integer imgPosY[] = new Integer[fifoMax];private static long imgZIndex[] = new long[fifoMax];-+ private static final Random rand = new Random();+public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch<?> env) {final serverObjects prop = new serverObjects();final plasmaSwitchboard sb = (plasmaSwitchboard) env;- Random rand = new Random();final boolean authenticated = sb.adminAuthenticated(header) >= 2;collageQueue.ImageOriginEntry nextOrigin = collageQueue.next(!authenticated);@@ -105,6 +105,8 @@ public class Collage {prop.put("imgurl", "0");}+ prop.putNum("privateQueueSize", collageQueue.privateQueueSize());+ prop.putNum("publicQueueSize", collageQueue.publicQueueSize());return prop;}}\ No newline at end of filediff --git a/htroot/env/templates/submenuWebStructure.template b/htroot/env/templates/submenuWebStructure.templateindex 9d46ab7ac..6487fb7ef 100644--- a/htroot/env/templates/submenuWebStructure.template+++ b/htroot/env/templates/submenuWebStructure.template@@ -2,6 +2,7 @@<h3>Web Visualization</h3><ul class="SubMenu"><li><a href="/WatchWebStructure_p.html" class="MenuItemLink lock">Web Structure</a></li>+ <li><a href="/Collage.html" class="MenuItemLink">Image Collage</a></li><li><a href="/CacheAdmin_p.html" class="MenuItemLink lock">Web Cache</a></li></ul></div>\ No newline at end of filediff --git a/source/de/anomic/data/collageQueue.java b/source/de/anomic/data/collageQueue.javaindex 553400c07..dc6369cf7 100755--- a/source/de/anomic/data/collageQueue.java+++ b/source/de/anomic/data/collageQueue.java@@ -81,6 +81,14 @@ public class collageQueue {return e;}+ public static int privateQueueSize() {+ return privateImageQueue.size();+ }++ public static int publicQueueSize() {+ return publicImageQueue.size();+ }+public static class ImageOriginEntry {public htmlFilterImageEntry imageEntry;public yacyURL baseURL;diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 847ebd91f..97513eaad 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -2129,7 +2129,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<plasmaSwitchboreturn null;} else {plasmaCrawlProfile.entry profile = profilesActiveCrawls.getEntry(in.queueEntry.profileHandle);- collageQueue.registerImages(document, (profile == null) ? true : profile.remoteIndexing());+ collageQueue.registerImages(document, (profile == null) ? true : !profile.remoteIndexing());}return new indexingQueueEntry(in.queueEntry, document, null);}