mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
* 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:
parent
fa26a8f25a
commit
1545e5440a
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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(){
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user