[checkmk-commits] Check_MK Git: check_mk: WATO: fix progress bar on Chrome

git version control git at mathias-kettner.de
Fri Jun 24 15:08:45 CEST 2011


Module: check_mk
Branch: master
Commit: d3675c56d364776467ce4164032644e109c68eeb
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3675c56d364776467ce4164032644e109c68eeb

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Fri Jun 24 15:08:42 2011 +0200

WATO: fix progress bar on Chrome

Bulk inventory went to 50% during first host

---

 web/htdocs/check_mk.css |    7 +++++--
 web/htdocs/js/wato.js   |   11 ++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 7fd6f05..f47341b 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -1988,7 +1988,10 @@ table.add_snapin i {
 
 .wato table.progress td.bar td.left { 
     background-color: #4080ff;
-    width: 0px;
+    width: 0%;
+}
+.wato table.progress td.bar td.right { 
+    width: 100%;
 }
 
 .wato #progress_bar.finished td.left {
@@ -1996,7 +1999,7 @@ table.add_snapin i {
     padding: 0px;
 }
 .wato #progress_bar.finished td.right {
-    padding: 0px;
+    width: 0px;
 }
 
 /* Statistics table */
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index de99972..d5ed63c 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -212,11 +212,12 @@ function update_progress_bar(header) {
     var perc_done = num_done / progress_total_num * 100;
 
     var bar      = document.getElementById('progress_bar');
-    var leftCell = bar.firstChild.firstChild.firstChild;
-    leftCell.style.width = (bar.clientWidth * perc_done / 100) + 'px';
-    leftCell = null;
-    bar      = null;
-
+    var cell = bar.firstChild.firstChild.firstChild;
+    cell.style.width = perc_done + "%";
+    cell = bar.firstChild.firstChild.childNodes[1];
+    cell.style.width = (100 - perc_done) + "%";
+    cell = null;
+    bar  = null;
     return false;
 }
 



More information about the checkmk-commits mailing list