From 7763f2554f5729a16276d607698c5e119724fa3f Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 17 Mar 2013 11:43:12 +0100 Subject: [PATCH] add the new PPMbar in Crawler_p for a better style and better use. --- htroot/Crawler_p.html | 6 ++++-- htroot/js/Crawler.js | 15 ++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/htroot/Crawler_p.html b/htroot/Crawler_p.html index 80769580c..404ddcc82 100644 --- a/htroot/Crawler_p.html +++ b/htroot/Crawler_p.html @@ -110,14 +110,16 @@ Speed - PPM + PPM PPM (Pages Per Minute)     -     + + + Traffic (Crawler) diff --git a/htroot/js/Crawler.js b/htroot/js/Crawler.js index a2890c26e..cb9f4d279 100644 --- a/htroot/js/Crawler.js +++ b/htroot/js/Crawler.js @@ -72,13 +72,14 @@ function handleStatus(){ removeAllChildren(ppmNum); ppmNum.appendChild(document.createTextNode(ppm)); - var ppmSpan = document.getElementById("ppmSpan"); - removeAllChildren(ppmSpan); - for(i = 0; i < ppm / 25; i++){ - img=document.createElement("img"); - img.setAttribute("src", BAR_IMG1); - ppmSpan.appendChild(img); - } + // ppmBar start + var ppmBar = document.getElementById("ppmbar"); + var ppmBarMaxRead = document.getElementById("customPPM"); + + var ppmforppmbar = ppm.replace(/\.*/g,""); + ppmBar.setAttribute("value", ppmforppmbar); + ppmBar.setAttribute("max", ppmBarMaxRead.value); + // ppmBar end // traffic output (no bar up to now) traffic = getFirstChild(statusTag, "traffic");