From 29fbbb49dca50cb64c61b0dcfcf32c65eb1e85b4 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 7 Nov 2012 12:23:21 +0100 Subject: [PATCH] better colors for host browser and corrected document count --- htroot/HostBrowser.html | 13 ++++++++----- htroot/HostBrowser.java | 4 ++-- htroot/env/base.css | 15 ++++++++++----- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/htroot/HostBrowser.html b/htroot/HostBrowser.html index 1537a4b11..cdd665e60 100644 --- a/htroot/HostBrowser.html +++ b/htroot/HostBrowser.html @@ -76,12 +76,15 @@ function updatepage(str) {
Host List #{list}#
-
#[host]#browse #[host]#
-
#[count]##(crawler)#::/#[pending]##(/crawler)##(errors)#::/#[count]##(/errors)# URLs
+
+
#[count]##(crawler)#::/#[pending]##(/crawler)##(errors)#::/#[count]##(/errors)# URLs
#{/list}# -
-
Count Colors:
Documents
Pending in Crawler
Load Errors
+
+
Count Colors:
+
   Documents without Errors
+
   Pending in Crawler
+
   Load Errors
#(/hosts)# @@ -111,7 +114,7 @@ function updatepage(str) { #(stored)# #(load)#::load & index#(/load)#:: indexed:: - loading:: + loading:: load fail: #[error]# #(/stored)# :: diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java index 7d04b3b8b..537a22c48 100644 --- a/htroot/HostBrowser.java +++ b/htroot/HostBrowser.java @@ -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++; diff --git a/htroot/env/base.css b/htroot/env/base.css index de6a58c77..250351014 100644 --- a/htroot/env/base.css +++ b/htroot/env/base.css @@ -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 {