From 826e5bbaddf9a0252ad88b7cfb593e73f1124104 Mon Sep 17 00:00:00 2001
From: luccioman
Date: Mon, 23 Jan 2017 16:05:51 +0100
Subject: [PATCH] Documented /HostBrowser.html related configuration settings
---
defaults/yacy.init | 4 +++-
htroot/HostBrowser.java | 20 +++++++++++++++++---
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/defaults/yacy.init b/defaults/yacy.init
index 0dff8cfc4..cb9a95c04 100644
--- a/defaults/yacy.init
+++ b/defaults/yacy.init
@@ -1009,7 +1009,7 @@ svnRevision=0
currentSkin=pdbootstrap
# flag to show if pages shall be usable for non-admin users
-# this can be applied to the Surftips.html and yacysearch.html page
+# this can be applied to the Surftips.html, yacysearch.html and HostBrowser.html pages
publicSurftips = true
publicSearchpage = true
@@ -1244,7 +1244,9 @@ contentcontrol.smwimport.targetlist = contentcontrol
contentcontrol.smwimport.defaultcategory = yacy
# host browser settings
+# Allow the administrator to stack URLs to the local crawl queue from the host browser page, automatically (when a path is unknown) or manually through a "load and index" link
browser.autoload = false
+# Allow everyone to stack URLs to the local crawl queue. "browser.autoload" has also to be set to true to enable automatic loading on an unknown path.
browser.load4everyone = false
# greedy learning: fast information acquisition heuristic for new peers
diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java
index c083db71c..e51d61571 100644
--- a/htroot/HostBrowser.java
+++ b/htroot/HostBrowser.java
@@ -82,11 +82,25 @@ public class HostBrowser {
* Some parameters need administrator authentication or unauthenticated local host requests to be allowed : load, deleteLoadErrors, delete, reload404,
* hosts="crawling" and hosts="error".
* The "load" parameter can also be applied without authentication when "browser.load4everyone" configuration setting is true.
+ *
+ * Configuration settings :
+ *
+ * - browser.autoload : allow the administrator to stack URLs to the local crawl queue, manually with the "load" parameter,
+ * or automatically when the "path" parameter is filled with an unknown URL
+ * - browser.load4everyone : allow everyone to stack URLs to the local crawl queue.
+ * "browser.autoload" has also to be set to true to enable automatic loading on an unknown path
+ * - publicSearchpage : set to false to restrict use of this servlet to authenticated administrator only
+ * - publicTopmenu : set to false to hide the top navigation bar to non authenticated users
+ * - decoration.hostanalysis : add supplementary hosts information for debug/analysis purpose
+ * - decoration.grafics.linkstructure : display a link structure graph when the path parameter is filled
+ *
+ *
* @param header servlet request header
* @param post request parameters. Supported keys :
* - admin : when "true", display in the html page render the administration context (menu and top navbar)
- * - path : root URL or host name to browse (ignored when the hosts parameter is filled)
- * - load : URL to crawl and index. The path URL is crawled and indexed when this parameter is present but empty.
+ * - path : root URL or host name to browse (ignored when the hosts parameter is filled). When not yet locally indexed, this URL can be automatically crawled and indexed
+ * when "browser.autoload" or "browser.load4everyone" configuration settings are set to true.
+ * - load : URL to crawl and index.
* - deleteLoadErrors : delete from the local index documents with load error (HTTP status different from 200 or any other failure).
* - hosts : generate hosts with most references list. Supported values :
*
@@ -99,7 +113,7 @@ public class HostBrowser {
* - facetcount :
* - complete : we want only root paths for complete lists
* - nepr :
- * - showlinkstructure :
+ * - showlinkstructure : when present, display a link graph for path
*
* @param env server environment
* @return the servlet answer object