diff --git a/htroot/WatchCrawler.html b/htroot/WatchCrawler.html index 3f61a8853..42fee3b28 100644 --- a/htroot/WatchCrawler.html +++ b/htroot/WatchCrawler.html @@ -15,7 +15,13 @@ Next update in seconds.
PPM:     -Loader: +

+

+Loader: +
+Size:    
+Max:    
+
@@ -28,9 +34,9 @@ Loader:
-Indexing Queue: -Queue Size:     -Queue Max:     +Indexing Queue:
+Size:    
+Max:    
@@ -45,7 +51,9 @@ Queue Max:    
-
Local Crawler
+
Local Crawler
+Size:    
+
@@ -57,7 +65,9 @@ Queue Max:    
-
Remote Crawler
+
Remote Crawler
+Size:    
+
diff --git a/htroot/js/WatchCrawler.js b/htroot/js/WatchCrawler.js index 580a38713..198671f11 100644 --- a/htroot/js/WatchCrawler.js +++ b/htroot/js/WatchCrawler.js @@ -59,19 +59,15 @@ function handleStatus(){ return; } var statusResponse = statusRPC.responseXML; - /*indexingqueue=statusResponse.getElementsByTagName("indexingqueue")[0]; - indexingqueue_size=indexingqueue.firstChild.nextSibling; - indexingqueue_max=indexingqueue_size.nextSibling.nextSibling; - ppm=statusResponse.getElementsByTagName("ppm")[0];*/ statusTag=getFirstChild(getFirstChild(statusResponse, ""), "status") - indexingqueue=getFirstChild(statusTag, "indexingqueue"); + /*indexingqueue=getFirstChild(statusTag, "indexingqueue"); indexingqueue_size=getValue(getFirstChild(indexingqueue, "size")); - indexingqueue_max=getValue(getFirstChild(indexingqueue, "max")); + indexingqueue_max=getValue(getFirstChild(indexingqueue, "max"));*/ ppm=getValue(getFirstChild(statusTag, "ppm")) - document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size; - document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max; +/* document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size; + document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max;*/ document.getElementById("ppm").firstChild.nodeValue=ppm; } @@ -83,10 +79,30 @@ function handleQueues(){ var queuesResponse = queuesRPC.responseXML; xml=getFirstChild(queuesResponse); if(queuesResponse != null){ - createIndexingTable(getFirstChild(xml, "indexingqueue")); + indexingqueue=getFirstChild(xml, "indexingqueue"); + createIndexingTable(indexingqueue); + indexingqueue_size=getValue(getFirstChild(indexingqueue, "size")); + indexingqueue_max=getValue(getFirstChild(indexingqueue, "max")); + document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size; + document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max; + + loaderqueue=getFirstChild(xml, "loaderqueue"); createLoaderTable(getFirstChild(xml, "loaderqueue")); - createLocalCrawlerTable(getFirstChild(xml, "localcrawlerqueue")); - createRemoteCrawlerTable(getFirstChild(xml, "remotecrawlerqueue")); + loaderqueue_size=getValue(getFirstChild(loaderqueue, "size")); + loaderqueue_max=getValue(getFirstChild(loaderqueue, "max")); + document.getElementById("loaderqueuesize").firstChild.nodeValue=loaderqueue_size; + document.getElementById("loaderqueuemax").firstChild.nodeValue=loaderqueue_max; + + localcrawlerqueue=getFirstChild(xml, "localcrawlerqueue"); + localcrawlerqueue_size=getValue(getFirstChild(localcrawlerqueue, "size")); + document.getElementById("localcrawlerqueuesize").firstChild.nodeValue=localcrawlerqueue_size; + createLocalCrawlerTable(localcrawlerqueue); + + remotecrawlerqueue=getFirstChild(xml, "remotecrawlerqueue"); + createRemoteCrawlerTable(remotecrawlerqueue); + remotecrawlerqueue_size=getValue(getFirstChild(remotecrawlerqueue, "size")); + document.getElementById("remotecrawlerqueuesize").firstChild.nodeValue=remotecrawlerqueue_size; + createremoteCrawlerTable(remotecrawlerqueue); } } function clearTable(table, numSkip){ diff --git a/htroot/xml/queues_p.java b/htroot/xml/queues_p.java index 3a7a8f70d..5e39f1717 100644 --- a/htroot/xml/queues_p.java +++ b/htroot/xml/queues_p.java @@ -84,6 +84,8 @@ public class queues_p { yacySeed initiator; //indexing queue + prop.put("indexingSize", Integer.toString(switchboard.getThread("80_indexing").getJobCount()+switchboard.indexingTasksInProcess.size())); + prop.put("indexingMax", Integer.toString(plasmaSwitchboard.indexingSlots)); if ((switchboard.sbQueue.size() == 0) && (switchboard.indexingTasksInProcess.size() == 0)) { prop.put("list", 0); //is empty } else { @@ -133,6 +135,8 @@ public class queues_p { } //loader queue + prop.put("loaderSize", Integer.toString(switchboard.cacheLoader.size())); + prop.put("loaderMax", Integer.toString(plasmaSwitchboard.crawlSlots)); if (switchboard.cacheLoader.size() == 0) { prop.put("list-loader", 0); } else { @@ -160,6 +164,7 @@ public class queues_p { } //local crawl queue + prop.put("localCrawlSize", Integer.toString(switchboard.getThread("50_localcrawl").getJobCount())); plasmaCrawlNURL.Entry urle; String profileHandle; @@ -190,6 +195,8 @@ public class queues_p { prop.put("list-local", showNum); //global crawl queue + prop.put("remoteCrawlSize", Integer.toString(switchboard.getThread("61_globalcrawltrigger").getJobCount())); + //prop.put("remoteCrawlSize", Integer.toString(switchboard.getThread("62_remotetriggeredcrawl").getJobCount())); size=10; stackSize = switchboard.urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT); if (stackSize == 0) { diff --git a/htroot/xml/queues_p.xml b/htroot/xml/queues_p.xml index dbffbdf07..17c462aa9 100644 --- a/htroot/xml/queues_p.xml +++ b/htroot/xml/queues_p.xml @@ -1,5 +1,7 @@ + #[indexingSize]# + #[indexingMax]# #{list-indexing}# #[initiator]# @@ -14,6 +16,8 @@ #{/list-indexing}# + #[loaderSize]# + #[loaderMax]# #{list-loader}# #[initiator]# @@ -23,6 +27,7 @@ #{/list-loader}# + #[localCrawlSize]# #{list-local}# #[initiator]# @@ -36,6 +41,7 @@ #{/list-local}# + #[remoteCrawlSize]# #{list-remote}# #[profile]#