Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) displaying fill level of indexing and loader queue on status page

theliff34377ac53d
diff --git a/htroot/Status.java b/htroot/Status.java
index ce1b84f50..a14d40fc3 100644
--- a/htroot/Status.java
+++ b/htroot/Status.java
@@ -286,12 +286,20 @@ public class Status {
// Queue information
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
- prop.put("indexingQueueSize", Integer.toString(sb.getThread("80_indexing").getJobCount()+sb.indexingTasksInProcess.size()));
- prop.put("indexingQueueMax", Integer.toString(plasmaSwitchboard.indexingSlots));
-
- prop.put("loaderQueueSize", Integer.toString(sb.cacheLoader.size()));
- prop.put("loaderQueueMax", Integer.toString(plasmaSwitchboard.crawlSlots));
-
+ int indexingJobCount = sb.getThread("80_indexing").getJobCount()+sb.indexingTasksInProcess.size();
+ int indexingMaxCount = plasmaSwitchboard.indexingSlots;
+ int indexingPercent = indexingJobCount*100/indexingMaxCount;
+ prop.put("indexingQueueSize", Integer.toString(indexingJobCount));
+ prop.put("indexingQueueMax", Integer.toString(indexingMaxCount));
+ prop.put("indexingQueuePercent",(indexingPercent>100)?"100":Integer.toString(indexingPercent));
+
+ int loaderJobCount = sb.cacheLoader.size();
+ int loaderMaxCount = plasmaSwitchboard.crawlSlots;
+ int loaderPercent = loaderJobCount*100/loaderMaxCount;
+ prop.put("loaderQueueSize", Integer.toString(loaderJobCount));
+ prop.put("loaderQueueMax", Integer.toString(loaderMaxCount));
+ prop.put("loaderQueuePercent", (loaderPercent>100)?"100":Integer.toString(loaderPercent));
+
prop.put("localCrawlQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL).getJobCount()));
prop.put("localCrawlPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL)?1:0);
diff --git a/htroot/Status_p.inc b/htroot/Status_p.inc
index e8e74f3f5..df8ec2ba3 100644
--- a/htroot/Status_p.inc
+++ b/htroot/Status_p.inc
@@ -66,12 +66,38 @@
</tr>
<tr class="TableCellDark">
<td>Indexing Queue</td>
- <td>#[indexingQueueSize]# | #[indexingQueueMax]#</td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0" width="200" >
+ <tr>
+ <td width="70">#[indexingQueueSize]#&nbsp;|&nbsp;#[indexingQueueMax]#&nbsp;</td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0" width="150" height="10" bgcolor="#FFFFFF" style="border-style:solid; border-width:1px; border-color:#CAD5E3">
+ <tr>
+ <td align="left"><img src="env/grafics/green_bar.gif" width="#[indexingQueuePercent]#%" height="10" alt=""></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
<td>[<a href="IndexCreateIndexingQueue_p.html">Details</a>]</td>
</tr>
<tr class="TableCellLight">
<td>Loader Queue</td>
- <td>#[loaderQueueSize]# | #[loaderQueueMax]# </td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0" width="200" >
+ <tr>
+ <td width="70">#[loaderQueueSize]#&nbsp;|&nbsp;#[loaderQueueMax]#&nbsp;</td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0" width="150" height="10" bgcolor="#FFFFFF" style="border-style:solid; border-width:1px; border-color:#CAD5E3">
+ <tr>
+ <td align="left"><img src="env/grafics/green_bar.gif" width="#[loaderQueuePercent]#%" height="10" alt=""></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
<td>[<a href="IndexCreateLoaderQueue_p.html">Details</a>]</td>
</tr>
<tr class="TableCellDark">
diff --git a/htroot/env/grafics/green_bar.gif b/htroot/env/grafics/green_bar.gif
new file mode 100644
index 000000000..e32422dd9
Binary files /dev/null and b/htroot/env/grafics/green_bar.gif differ
diff --git a/htroot/env/grafics/red_bar.gif b/htroot/env/grafics/red_bar.gif
new file mode 100644
index 000000000..21fceb891
Binary files /dev/null and b/htroot/env/grafics/red_bar.gif differ