From 1545e5440ac43d73dacc2a0fa3eabdf58123de6f Mon Sep 17 00:00:00 2001 From: lotus Date: Sun, 23 Nov 2008 12:02:58 +0000 Subject: [PATCH] * index deletion: checkbox-confirmation * watch crawler: less load on exhausted peers; wait for data before reloading again git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5359 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexControlRWIs_p.html | 4 ++-- htroot/IndexControlRWIs_p.java | 2 +- htroot/js/WatchCrawler.js | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/htroot/IndexControlRWIs_p.html b/htroot/IndexControlRWIs_p.html index 8ea175c90..7fae1d05b 100644 --- a/htroot/IndexControlRWIs_p.html +++ b/htroot/IndexControlRWIs_p.html @@ -29,8 +29,8 @@
Cleanup
-
Index Deletion
(deletes all words and all urls)
-
+
Index Deletion
(deletes all words and all urls)
+
diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java index 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.js index 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) {