From 31443139747a00d6976782f048bdf799e111e745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Go=C5=84?= Date: Sat, 27 Dec 2014 03:02:18 +0100 Subject: [PATCH] Postprocessing progress bar fix (Make it work as [probably] actually intended) --- htroot/Crawler_p.html | 2 +- htroot/js/Crawler.js | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) 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 @@ Postprocessing Progress  
    0:0 - + 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=""; - 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");