* 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
This commit is contained in:
lotus 2008-11-23 12:02:58 +00:00
parent fa26a8f25a
commit 1545e5440a
3 changed files with 15 additions and 7 deletions

View File

@ -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>

View File

@ -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 {

View File

@ -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) {