diff options
| author | lotus <lotus@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2008-11-23 12:02:58 +0000 |
|---|---|---|
| committer | lotus <lotus@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2008-11-23 12:02:58 +0000 |
| commit | 1545e5440ac43d73dacc2a0fa3eabdf58123de6f (patch) | |
| tree | 3cce9eccae1c50bb29a93e466fbee7d977bb4c5f /htroot | |
| parent | fa26a8f25a2d9c8081c5b73792630190bcb8b92a (diff) | |
* 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
Diffstat (limited to 'htroot')
| -rw-r--r-- | htroot/IndexControlRWIs_p.html | 4 | ||||
| -rw-r--r-- | htroot/IndexControlRWIs_p.java | 2 | ||||
| -rw-r--r-- | 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 @@ <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.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) { |
