Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Splitting Status Page into Private and Public Informations *) Adding Queue overview to status page
thelib2d48ebcef5f
diff --git a/htroot/Status.html b/htroot/Status.htmlindex 744ba4761..b00222c46 100644--- a/htroot/Status.html+++ b/htroot/Status.html@@ -25,23 +25,11 @@<p><!-- <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#000000"><tr><td> --><table border="0" cellpadding="2" cellspacing="1" width="100%">-<tr class="TableHeader"><td colspan="2"><b>System Properties</b></td></tr>-<tr class="TableCellDark"><td width="150">Protection</td><td>-#(protection)#-<b>Your settings are _not_ protected!</b> Please go to the <a href="Settings_p.html#admin">settings</a> page <b>immediately</b> and set an administration password.-::-Your settings are protected by a password.-#(/protection)#-</td></tr>-<tr class="TableCellLight"><td>System version</td><td>+<tr class="TableHeader"><td colspan="2"><b>Public System Properties</b></td></tr>+<tr class="TableCellDark"><td>System version</td><td>#[versionpp]# #(versioncomment)#:: - the latest public version is #[latestVersion]#. Click here to <a href="http://www.yacy.net/yacy/Download.html">download</a> it.#(/versioncomment)#</td></tr>-<!---<tr class="TableCellDark"><td>Proxy host</td><td>#[host]#:#[port]#</td></tr>-<tr class="TableCellLight"><td>Port forwarding host</td><td>#(portForwarding)#not used::#[host]#:#[port]# (#(status)#broken::connected#(/status)#)#(/portForwarding)#</td></tr>-<tr class="TableCellDark"><td>Remote proxy</td><td>#(remoteProxy)#not used::#[host]#:#[port]##(/remoteProxy)#</td></tr>--->-<tr class="TableCellDark"><td>This peer's address</td><td>+<tr class="TableCellLight"><td>This peer's address</td><td>#(peerAddress)#Not assigned::@@ -54,8 +42,8 @@ see the <a href="http://www.yacy.net/yacy/Installation.html#wininst">installatio#[address]# ; Your '.yacy' home at http://www.#[peername]#.yacy#(/peerAddress)#</td></tr>-<tr class="TableCellLight"><td>This peer's name</td><td>#[peerName]#/#[hash]#</td></tr>-<tr class="TableCellDark"><td>This peer's statistics</td><td>+<tr class="TableCellDark"><td>This peer's name</td><td>#[peerName]#/#[hash]#</td></tr>+<tr class="TableCellLight"><td>This peer's statistics</td><td>#(peerStatistics)#Unknown::@@ -63,7 +51,7 @@ Uptime = #[uptime]#, Links# = #[links]#, RWIs# = #[words]#, PPM = #[pagesperminuConnects (#[juniorConnects]#|#[seniorConnects]#|#[principalConnects]#|#[disconnects]#) #[connects]# peers/hour#(/peerStatistics)#</td></tr>-<tr class="TableCellLight"><td>This peer's status</td><td>+<tr class="TableCellDark"><td>This peer's status</td><td>#(peerStatus)#Virgin - You have not published your peer yet, because you have not used the proxy yet. If you configured your browser's proxy settings (see online: <a href="http://www.yacy.net/yacy/Installation.html#wininst">configure your browser's proxy settings</a>), you must first load any page through the proxy to prove that this works. With this status you are not allowed to search other peers!::@@ -75,8 +63,8 @@ Principal - You are senior and you publish your seed-list to a public accessibleYou can of course <a href="index.html">search the internet</a> using the other peers' global index on your own search page.#(/peerStatus)#</td></tr>-<tr class="TableCellDark"><td>Other peers</td><td>#(otherPeers)#not online::#[num]# other peers online.#(/otherPeers)#</td></tr>-<tr class="TableCellLight"><td>Seed server</td><td>+<tr class="TableCellLight"><td>Other peers</td><td>#(otherPeers)#not online::#[num]# other peers online.#(/otherPeers)#</td></tr>+<tr class="TableCellDark"><td>Seed server</td><td>#(seedServer)#Disabled. To enable this you need a FTP account where you can upload files to a web space. If you do that, you become a YaCy root server. You can configure your account details on the <a href="Settings_p.html#seed">Settings page</a>.::@@ -87,13 +75,6 @@ Enabled: Updating periodically to file #[seedFile]#.Last upload: #[lastUpload]# ago.#(/seedServer)#</td></tr>-<tr class="TableCellDark"><td>Auto-popup on start-up</td><td>-#(popup)#-Disabled. To enable this again please use the <a href="Settings_p.html#SystemBehaviour">Settings</a> page-::-Enabled. To disable this please use the <a href="Settings_p.html#SystemBehaviour">Settings</a> page-#(/popup)#-</td></tr><tr class="TableCellLight"><td>Online-mode</td><td>#(omode)#<!-- online Mode 0 -->@@ -110,22 +91,10 @@ To start permanent mode, press this button:You are in <i>permanent</i> mode. Attention: If you don't have a flatrate or are always-on, you must switch off the proxy to go off-line.#(/omode)#</td></tr>-<tr class="TableCellLight"><td>Memory Usage</td><td>-<!---<form action="Status.html" method="get">free: #[freeMemory]# | total: #[totalMemory]# | max: #[maxMemory]# | <input type="submit" name="gc" value="Do Garbage-Collect now"></form>--->-free: #[freeMemory]# | total: #[totalMemory]# | max: #[maxMemory]#-</td></tr>-<tr class="TableCellLight"><td>Traffic</td><td>-Out: #[trafficIn]# | In: #[trafficOut]#-</td></tr>-<tr class="TableCellDark"><td>System Resources</td><td>-Processors: #[processors]#-</td></tr>-</table><!-- </td></tr></table> --></p>+#%[privateStatusTable]%##[footer]#</body>diff --git a/htroot/Status.java b/htroot/Status.javaindex 0cb021809..39a71b676 100644--- a/htroot/Status.java+++ b/htroot/Status.java@@ -53,6 +53,7 @@ import de.anomic.server.serverCore;import de.anomic.server.serverObjects;import de.anomic.server.serverSwitch;import de.anomic.server.serverDate;+import de.anomic.server.serverThread;import de.anomic.yacy.yacyCore;import de.anomic.plasma.plasmaSwitchboard;@@ -73,6 +74,12 @@ public class Status {// update seed infoyacyCore.peerActions.updateMySeed();+ if (header.get("IS_ADMIN","false").equals("true")) {+ prop.put("privateStatusTable","Status_p.inc");+ } else {+ prop.put("privateStatusTable","");+ }+// password protectionif (env.getConfig("adminAccountBase64MD5", "").length() == 0)prop.put("protection", 0);//not protected@@ -92,23 +99,23 @@ public class Status {prop.put("versioncomment_latestVersion", Float.toString(yacyCore.latestVersion));- //prop.put("host", serverCore.publicLocalIP());- //prop.put("port", env.getConfig("port", "<unknown>"));+ prop.put("host", serverCore.publicLocalIP());+ prop.put("port", env.getConfig("port", "<unknown>"));// port forwarding: hostname and portif ((serverCore.portForwardingEnabled) && (serverCore.portForwarding != null)) {prop.put("portForwarding", 1);- //prop.put("portForwarding_host", serverCore.portForwarding.getHost());- //prop.put("portForwarding_port", Integer.toString(serverCore.portForwarding.getPort()));- //prop.put("portForwarding_status", serverCore.portForwarding.isConnected() ? 1:0);+ prop.put("portForwarding_host", serverCore.portForwarding.getHost());+ prop.put("portForwarding_port", Integer.toString(serverCore.portForwarding.getPort()));+ prop.put("portForwarding_status", serverCore.portForwarding.isConnected() ? 1:0);} else {prop.put("portForwarding", 0);}if (env.getConfig("remoteProxyUse", "false").equals("true")) {prop.put("remoteProxy", 1);- //prop.put("remoteProxy_host", env.getConfig("remoteProxyHost", "<unknown>"));- //prop.put("remoteProxy_port", env.getConfig("remoteProxyPort", "<unknown>"));+ prop.put("remoteProxy_host", env.getConfig("remoteProxyHost", "<unknown>"));+ prop.put("remoteProxy_port", env.getConfig("remoteProxyPort", "<unknown>"));} else {prop.put("remoteProxy", 0);//not used}@@ -220,6 +227,18 @@ public class Status {prop.put("trafficIn",bytesToString(httpdByteCountInputStream.getGlobalCount()));prop.put("trafficOut",bytesToString(httpdByteCountOutputStream.getGlobalCount()));+ // Queue information+ plasmaSwitchboard switchboard = (plasmaSwitchboard)env;+ prop.put("indexingQueueSize", Integer.toString(switchboard.getThread("80_indexing").getJobCount()));+ prop.put("indexingQueueMax", Integer.toString(plasmaSwitchboard.indexingSlots));++ prop.put("loaderQueueSize", Integer.toString(switchboard.cacheLoader.size()));+ prop.put("loaderQueueMax", Integer.toString(plasmaSwitchboard.crawlSlots));+ prop.put("loaderPaused",switchboard.crawlingIsPaused()?1:0);++ prop.put("localCrawlQueueSize", Integer.toString(switchboard.getThread("50_localcrawl").getJobCount()));+ prop.put("remoteCrawlQueueSize", Integer.toString(switchboard.getThread("61_globalcrawltrigger").getJobCount()));+// return rewrite propertiesreturn prop;}