*) adding links to specify the amount of entries of a queue that should be displayed on the gui

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1360 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
theli 2006-01-17 08:45:12 +00:00
parent 7d5af75d11
commit b1b8ba719e
6 changed files with 33 additions and 9 deletions

View File

@ -18,7 +18,9 @@ The indexing queue is empty<br>
<input type="submit" name="clearIndexingQueue" value="clear indexing queue">
</form>
<br>
There are #[num]# entries in the indexing queue. Showing #[show]# entries with a total size of #[totalSize]#:<br>
<p>There are <b>#[num]#</b> entries in the indexing queue. Showing <b>#[show]#</b> entries with a total size of <b>#[totalSize]#</b>.</p>
<p>Show last <a href="IndexCreateIndexingQueue_p.html?limit=50">50</a> | <a href="IndexCreateIndexingQueue_p.html?limit=100">100</a> | <a href="IndexCreateIndexingQueue_p.html?limit=250">250</a> | <a href="IndexCreateIndexingQueue_p.html?limit=500">500</a> entries.</p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">
<th class="small">Initiator</th>

View File

@ -75,7 +75,14 @@ public class IndexCreateIndexingQueue_p {
prop.put("rejected", 0);
int showRejectedCount = 10;
int showLimit = 100;
if (post != null) {
if (post.containsKey("limit")) {
try {
showLimit = Integer.valueOf((String)post.get("limit")).intValue();
} catch (NumberFormatException e) {}
}
if (post.containsKey("clearRejected")) {
switchboard.urlPool.errorURL.clearStack();
}
@ -143,8 +150,7 @@ public class IndexCreateIndexingQueue_p {
int count=entryList.size();
totalCount = count;
if(count>100)count=100;
for (int i = 0; i < count; i++) {
for (int i = 0; (i < count) && (entryCount < showLimit); i++) {
boolean inProcess = i < inProcessCount;
pcentry = (plasmaSwitchboardQueue.Entry) entryList.get(i);

View File

@ -21,7 +21,8 @@ The global crawler queue is empty<br><br>
<input type="submit" name="clearcrawlqueue" value="clear global crawl queue">
</form>
<br>
There are #[num]# entries in the global crawler queue. Showing #[show-num]# most recent entries:
<p>There are <b>#[num]#</b> entries in the global crawler queue. Showing <b>#[show-num]#</b> most recent entries.</p>
<p>Show last <a href="IndexCreateWWWGlobalQueue_p.html?limit=50">50</a> | <a href="IndexCreateWWWGlobalQueue_p.html?limit=100">100</a> | <a href="IndexCreateWWWGlobalQueue_p.html?limit=250">250</a> | <a href="IndexCreateWWWGlobalQueue_p.html?limit=500">500</a> entries.</p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">
<th class="small">Initiator</th>

View File

@ -70,7 +70,14 @@ public class IndexCreateWWWGlobalQueue_p {
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
serverObjects prop = new serverObjects();
int showLimit = 100;
if (post != null) {
if (post.containsKey("limit")) {
try {
showLimit = Integer.valueOf((String)post.get("limit")).intValue();
} catch (NumberFormatException e) {}
}
if (post.containsKey("clearcrawlqueue")) {
int c = switchboard.urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT);
switchboard.urlPool.noticeURL.clear(plasmaCrawlNURL.STACK_TYPE_LIMIT);
@ -92,16 +99,15 @@ public class IndexCreateWWWGlobalQueue_p {
prop.put("crawler-queue", 0);
} else {
prop.put("crawler-queue", 1);
plasmaCrawlNURL.Entry[] crawlerList = switchboard.urlPool.noticeURL.top(plasmaCrawlNURL.STACK_TYPE_LIMIT, 100);
plasmaCrawlNURL.Entry[] crawlerList = switchboard.urlPool.noticeURL.top(plasmaCrawlNURL.STACK_TYPE_LIMIT, showLimit);
prop.put("crawler-queue_num", stackSize);//num Entries
prop.put("crawler-queue_show-num", crawlerList.length); //showin sjow-num most recent
plasmaCrawlNURL.Entry urle;
boolean dark = true;
yacySeed initiator;
String profileHandle;
plasmaCrawlProfile.entry profileEntry;
int i, showNum = 0;
for (i = 0; i < crawlerList.length; i++) {
for (i = 0; (i < crawlerList.length) && (showNum < showLimit); i++) {
urle = crawlerList[i];
if ((urle != null)&&(urle.url()!=null)) {
initiator = yacyCore.seedDB.getConnected(urle.initiator());
@ -118,6 +124,7 @@ public class IndexCreateWWWGlobalQueue_p {
showNum++;
}
}
prop.put("crawler-queue_show-num", showNum); //showin sjow-num most recent
prop.put("crawler-queue_list", showNum);
}

View File

@ -32,7 +32,8 @@ The local crawler queue is empty<br><br>
</form>
<br>
<hr>
There are #[num]# entries in the local crawler queue. Showing #[show-num]# most recent entries:
<p>There are <b>#[num]#</b> entries in the local crawler queue. Showing <b>#[show-num]#</b> most recent entries.</p>
<p>Show last <a href="IndexCreateWWWLocalQueue_p.html?limit=50">50</a> | <a href="IndexCreateWWWLocalQueue_p.html?limit=100">100</a> | <a href="IndexCreateWWWLocalQueue_p.html?limit=250">250</a> | <a href="IndexCreateWWWLocalQueue_p.html?limit=500">500</a> entries.</p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">
<th class="small">Initiator</th>

View File

@ -76,7 +76,14 @@ public class IndexCreateWWWLocalQueue_p {
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
serverObjects prop = new serverObjects();
int showLimit = 100;
if (post != null) {
if (post.containsKey("limit")) {
try {
showLimit = Integer.valueOf((String)post.get("limit")).intValue();
} catch (NumberFormatException e) {}
}
if (post.containsKey("deleteEntries")) {
int c = 0;
@ -163,7 +170,7 @@ public class IndexCreateWWWLocalQueue_p {
String profileHandle;
plasmaCrawlProfile.entry profileEntry;
int i;
for (i = 0; (i < crawlerList.length) && (showNum < 100); i++) {
for (i = 0; (i < crawlerList.length) && (showNum < showLimit); i++) {
urle = crawlerList[i];
if ((urle != null)&&(urle.url()!=null)) {
initiator = yacyCore.seedDB.getConnected(urle.initiator());