Skip to content

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

Postprocessing progress bar fix (Make it work as [probably] actually intended)

Ryszard Goń31443139747a
diff --git a/htroot/Crawler_p.html b/htroot/Crawler_p.html
index 8c0105977..6cd91dbc8 100644
--- a/htroot/Crawler_p.html
+++ b/htroot/Crawler_p.html
@@ -147,7 +147,7 @@
<td align="left" valign="top" rowspan="2">Postprocessing Progress <span id="postprocessing_speed">&nbsp;</span><br/><span id="postprocessing_status">&nbsp;&nbsp;&nbsp;</span></td>
<td align="left" width="40"><span id="postprocessing_remainingTimeMinutes">0</span>:<span id="postprocessing_remainingTimeSeconds">0</span></td>
<td align="left" width="260px" colspan="3">
- <span id="postprocessing_bar"><progress id="postprocessingBar" max="30000" value="0" style="width:94%;"/></span>
+ <span id="postprocessing_bar"><progress id="postprocessingBar" max="100" value="0" style="width:94%;"/></span>
</td>
</tr>
<tr class="TableCellLight">
diff --git a/htroot/js/Crawler.js b/htroot/js/Crawler.js
index b1bd49d7d..8ead5f4d5 100644
--- a/htroot/js/Crawler.js
+++ b/htroot/js/Crawler.js
@@ -112,11 +112,10 @@ function handleStatus(){
document.getElementById("postprocessing_webgraph").firstChild.nodeValue=getValue(getFirstChild(postprocessing, "webgraphRemainingCount"));
document.getElementById("postprocessing_remainingTimeMinutes").firstChild.nodeValue=getValue(getFirstChild(postprocessing, "remainingTimeMinutes"));
document.getElementById("postprocessing_remainingTimeSeconds").firstChild.nodeValue=getValue(getFirstChild(postprocessing, "remainingTimeSeconds"));
- postprocessingElapsedTime=getValue(getFirstChild(postprocessing, "postprocessingElapsedTime"));
- postprocessingRemainingTime=getValue(getFirstChild(postprocessing, "postprocessingRemainingTime"));
- p = 100 * postprocessingElapsedTime / (postprocessingElapsedTime + postprocessingRemainingTime);
- bar="<progress id='postprocessingBar' max='" + p + "' value='100' style='width:94%;'/>";
- document.getElementById("postprocessing_bar").firstChild.nodeValue=bar;
+ postprocessingElapsedTime=parseInt(getValue(getFirstChild(postprocessing, "ElapsedTime")));
+ postprocessingRemainingTime=parseInt(getValue(getFirstChild(postprocessing, "RemainingTime")));
+ p = 100 * postprocessingElapsedTime / (postprocessingElapsedTime + postprocessingRemainingTime) || 0;
+ document.getElementById("postprocessing_bar").firstChild.setAttribute("value", p);
//document.getElementById("postprocessing_speed").firstChild.nodeValue=getValue(getFirstChild(postprocessing, "speed"));
load=getFirstChild(statusTag, "load");