better colors for host browser and corrected document count

pull/1/head
Michael Peter Christen 12 years ago
parent 12c0db20e5
commit 29fbbb49dc

@ -76,12 +76,15 @@ 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><span>browse #[host]#</span></div></div>
<div style="width:100px; text-align:right; float: left; white-space:nowrap; overflow:hidden;"><span class="commit">#[count]#</span>#(crawler)#::/<span class="info">#[pending]#</span>#(/crawler)##(errors)#::/<span class="error">#[count]#</span>#(/errors)# URLs</div>
<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: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}#
<div style="clear:both; float:left; padding:1px 5px 1px 5px;">
<br/><b>Count Colors:</b> <div class="commit">Documents</div><div class="info">Pending in Crawler</div><div class="error">Load Errors</div>
<div style="clear:both; float:left; padding:10px 5px 1px 5px;">
<div style="float:left;clear:both;">Count Colors:</div>
<div class="commit" style="float:left;">&nbsp;&nbsp;&nbsp;Documents without Errors</div>
<div class="pending" style="float:left;">&nbsp;&nbsp;&nbsp;Pending in Crawler</div>
<div class="error" style="float:left;">&nbsp;&nbsp;&nbsp;Load Errors</div>
</div>
</fieldset>
#(/hosts)#
@ -111,7 +114,7 @@ function updatepage(str) {
#(stored)#
#(load)#::<td align="right" nowrap class="listingnok"><a href="/HostBrowser.html?load=#[url]#&path=#[path]#">load &amp; index</a>#(/load)#</td>::
<td align="right" nowrap class="listingok">indexed</td>::
<td align="right" nowrap class="listingnok">loading</td>::
<td align="right" nowrap class="pending">loading</td>::
<td align="right" nowrap class="listingnok">load fail: #[error]#</td>
#(/stored)#
</tr>::

@ -156,12 +156,12 @@ 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));
prop.put("hosts_list_" + c + "_count", hostscore.get(host) - errors);
boolean inCrawler = crawler.containsKey(host);
prop.put("hosts_list_" + c + "_crawler", inCrawler ? 1 : 0);
if (inCrawler) prop.put("hosts_list_" + c + "_crawler_pending", crawler.get(host)[0]);
int errors = errorscore.get(host);
prop.put("hosts_list_" + c + "_errors", errors > 0 ? 1 : 0);
if (errors > 0) prop.put("hosts_list_" + c + "_errors_count", errors);
c++;

@ -127,19 +127,24 @@ tt, *.tt {
font-family:Courier,Terminal,sans-serif;
}
.error {
.commit {
font-weight:bold;
color:red;
color:green;
}
.info {
.pending {
font-weight:bold;
color:darkblue;
}
.commit {
.error {
font-weight:bold;
color:green;
color:red;
}
.info {
font-weight:bold;
color:olive;
}
.help {

Loading…
Cancel
Save