Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
* index deletion: checkbox-confirmation * watch crawler: less load on exhausted peers; wait for data before reloading again
lotus1545e5440ac4
diff --git a/htroot/IndexControlRWIs_p.html b/htroot/IndexControlRWIs_p.htmlindex 8ea175c90..7fae1d05b 100644--- a/htroot/IndexControlRWIs_p.html+++ b/htroot/IndexControlRWIs_p.html@@ -29,8 +29,8 @@<form action="IndexControlRWIs_p.html" method="post" enctype="multipart/form-data"><fieldset><legend>Cleanup</legend><dl>- <dt class="TableCellDark">Index Deletion<br />(deletes all words and all urls)</dt>- <dd><input type="submit" name="deletecomplete" value="Delete index" onclick="return confirm('Confirm: You want to delete the complete index?')"/>+ <dt class="TableCellDark"><input type="checkbox" name="confirmDelete"/> Index Deletion<br />(deletes all words and all urls)</dt>+ <dd><input type="submit" name="deletecomplete" value="Delete index"/></dd></dl></fieldset>diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.javaindex 6e6f7fd92..afe797d24 100644--- a/htroot/IndexControlRWIs_p.java+++ b/htroot/IndexControlRWIs_p.java@@ -106,7 +106,7 @@ public class IndexControlRWIs_p {}// delete everything- if (post.containsKey("deletecomplete")) {+ if (post.containsKey("deletecomplete") && post.containsKey("confirmDelete")) {sb.webIndex.clear();sb.crawlQueues.clear();try {diff --git a/htroot/js/WatchCrawler.js b/htroot/js/WatchCrawler.jsindex 3f205c025..b5659b0ab 100644--- a/htroot/js/WatchCrawler.js+++ b/htroot/js/WatchCrawler.js@@ -9,6 +9,8 @@ var queuesRPC;var refreshInterval=5;var wait=0;var changing=false; //change the interval+var statusLoaded=true;+var queueLoaded=true;refresh();//loadInterval=window.setInterval("refresh()", refreshInterval*1000);@@ -31,14 +33,18 @@ function newInterval(){changing=false;}function countdown(){- document.getElementById("nextUpdate").value=wait;- wait--;- if(wait==0){- refresh();+ if(statusLoaded && queueLoaded){+ document.getElementById("nextUpdate").value=wait;+ wait--;+ if(wait==0){+ refresh();+ }}}function refresh(){wait=refreshInterval;+ statusLoaded=false;+ queueLoaded=false;requestStatus();requestQueues();}@@ -108,6 +114,7 @@ function handleStatus(){img.setAttribute("src", BAR_IMG1);wordCacheSpan.appendChild(img);}+ statusLoaded=true;}function handleQueues(){@@ -166,6 +173,7 @@ function handleQueues(){putQueueState("remotecrawler", remotecrawlerqueue_state);updateTable(remotecrawlerqueue, "remote crawler");}+ queueLoaded=true;}function putQueueState(queue, state) {