diff --git a/htroot/HostBrowser.html b/htroot/HostBrowser.html
index 9f7d1bbca..9e9412061 100644
--- a/htroot/HostBrowser.html
+++ b/htroot/HostBrowser.html
@@ -96,7 +96,7 @@ function updatepage(str) {
Documents without Errors
Pending in Crawler
Load Errors (exclusion/failure)
-
+
#(/hosts)#
@@ -174,13 +174,9 @@ function updatepage(str) {
#{/list}#
#(/inbound)#
-
- #(admin)#::
-
+ #(admin)#::
+ #%HostBrowserAdmin_p.html%#
#(/admin)#
#%env/templates/footer.template%#
diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java
index 46cb8e42a..1f60e8e0b 100644
--- a/htroot/HostBrowser.java
+++ b/htroot/HostBrowser.java
@@ -82,7 +82,7 @@ public class HostBrowser {
prop.putNum("ucount", fulltext.collectionSize());
prop.put("hosts", 0);
prop.put("files", 0);
- prop.put("admin", 0);
+ prop.put("admin", admin ? 1 : 0);
if (admin) { // show top nav to admins
prop.put("topmenu",1);
@@ -143,6 +143,21 @@ public class HostBrowser {
prop.put("result", "bad url '" + load + "'");
}
}
+
+ if (admin && post.containsKey("deleteLoadErrors")) {
+ try {
+ fulltext.getDefaultConnector().deleteByQuery("-" + CollectionSchema.httpstatus_i.getSolrFieldName() + ":200 AND "
+ + CollectionSchema.httpstatus_i.getSolrFieldName() + ":[* TO *]"); // make sure field exists
+ Log.logInfo ("HostBrowser:", "delete documents with httpstatus_i <> 200");
+ fulltext.getDefaultConnector().deleteByQuery(CollectionSchema.failtype_s.getSolrFieldName() + ":\"" + FailType.fail.name() + "\"" );
+ Log.logInfo ("HostBrowser:", "delete documents with failtype_s = fail");
+ fulltext.getDefaultConnector().deleteByQuery(CollectionSchema.failtype_s.getSolrFieldName() + ":\"" + FailType.excl.name() + "\"" );
+ Log.logInfo ("HostBrowser:", "delete documents with failtype_s = excl");
+ return prop;
+ } catch (IOException ex) {
+ Log.logException(ex);
+ }
+ }
if (post.containsKey("hosts")) {
// generate host list
diff --git a/htroot/HostBrowserAdmin_p.html b/htroot/HostBrowserAdmin_p.html
new file mode 100644
index 000000000..fcb5d6e92
--- /dev/null
+++ b/htroot/HostBrowserAdmin_p.html
@@ -0,0 +1,12 @@
+
+ #(hosts)#::
+
+ #(/hosts)#