Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added icons and a selection for hosts with urls pending for crawler or with errors
Michael Peter Christen074dfd297b31
diff --git a/htroot/HostBrowser.html b/htroot/HostBrowser.htmlindex cdd665e60..6300ced0b 100644--- a/htroot/HostBrowser.html+++ b/htroot/HostBrowser.html@@ -59,7 +59,7 @@ function updatepage(str) {<body id="IndexControl">#%env/templates/simpleheader.template%#<h2>Host Browser</h2>- <p>Browse the index of #[ucount]# documents. Enter a host or an URL for a file list or select one of a <a href="/HostBrowser.html?hosts=">list of hosts.</a></p>+ <p>Browse the index of #[ucount]# documents. Enter a host or an URL for a file list or view a list of <a href="/HostBrowser.html?hosts=">all hosts</a>, <a href="/HostBrowser.html?hosts=crawling">only hosts with urls pending in the crawler</a> or <a href="/HostBrowser.html?hosts=error">only with load errors</a>.</p><form action="HostBrowser.html" id="searchform" method="get" onkeyup="xmlhttpPost(); return false;"><fieldset class="yacys">Host/URL:@@ -76,7 +76,7 @@ function updatepage(str) {<fieldset><legend>Host List</legend>#{list}#<div style="float:left; padding:1px 5px 1px 5px;">- <div style="width:180px; text-align:left; float: left; white-space:nowrap; overflow:hidden;"><div id="info"><a href="/HostBrowser.html?path=#[host]#&facetcount=#[count]#">#[host]#</a></div></div>+ <div style="width:180px; text-align:left; float: left; white-space:nowrap; overflow:hidden;"><div id="info"><img src="/env/grafics/#(type)#invisible.gif::burn-e.gif::construction.gif#(/type)#" align="left" width="12" height="8"> <a href="/HostBrowser.html?path=#[host]#&facetcount=#[count]#">#[host]#</a></div></div><div style="width:100px; text-align:right; float: left; white-space:nowrap; overflow:hidden;"><span class="commit">#[count]#</span>#(crawler)#::/<span class="pending">#[pending]#</span>#(/crawler)##(errors)#::/<span class="error">#[count]#</span>#(/errors)# URLs</div></div>#{/list}#diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.javaindex 7968d6a3e..abffd9a06 100644--- a/htroot/HostBrowser.java+++ b/htroot/HostBrowser.java@@ -135,6 +135,9 @@ public class HostBrowser {if (post.containsKey("hosts")) {// generate host listtry {+ boolean onlyCrawling = "crawling".equals(post.get("hosts", ""));+ boolean onlyErrors = "error".equals(post.get("hosts", ""));+int maxcount = admin ? 2 * 3 * 2 * 5 * 7 * 2 * 3 : 360; // which makes nice matrixes for 2, 3, 4, 5, 6, 7, 8, 9 rows/colums// collect hosts from index@@ -156,15 +159,22 @@ public class HostBrowser {String host;while (i.hasNext() && c < maxcount) {host = i.next();- int errors = errorscore.get(host);prop.put("hosts_list_" + c + "_host", host);- prop.put("hosts_list_" + c + "_count", hostscore.get(host) - errors);boolean inCrawler = crawler.containsKey(host);+ int errors = errorscore.get(host);+ prop.put("hosts_list_" + c + "_count", hostscore.get(host) - errors);prop.put("hosts_list_" + c + "_crawler", inCrawler ? 1 : 0);if (inCrawler) prop.put("hosts_list_" + c + "_crawler_pending", crawler.get(host)[0]);prop.put("hosts_list_" + c + "_errors", errors > 0 ? 1 : 0);if (errors > 0) prop.put("hosts_list_" + c + "_errors_count", errors);- c++;+ prop.put("hosts_list_" + c + "_type", inCrawler ? 2 : errors > 0 ? 1 : 0);+ if (onlyCrawling) {+ if (inCrawler) c++;+ } else if (onlyErrors) {+ if (errors > 0) c++;+ } else {+ c++;+ }}prop.put("hosts_list", c);prop.put("hosts", 1);diff --git a/htroot/env/grafics/burn-e.gif b/htroot/env/grafics/burn-e.gifnew file mode 100644index 000000000..788ed3daeBinary files /dev/null and b/htroot/env/grafics/burn-e.gif differdiff --git a/htroot/env/grafics/construction.gif b/htroot/env/grafics/construction.gifnew file mode 100644index 000000000..24fea5be7Binary files /dev/null and b/htroot/env/grafics/construction.gif differ