From e28e7eb97c08f987eee2f2b966a98cb1f82fce9d Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 16 Aug 2006 17:27:14 +0000 Subject: [PATCH] ebl Add pool view git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3287 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/html/bweb.css | 34 ++++++++++++++++++-- gui/bweb/html/bweb.js | 70 +++++++++++++++++++++++++++++++++++++++++ gui/bweb/html/pix.png | Bin 0 -> 103 bytes 3 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 gui/bweb/html/pix.png diff --git a/gui/bweb/html/bweb.css b/gui/bweb/html/bweb.css index bb6e678b4c..72abfc7d0c 100644 --- a/gui/bweb/html/bweb.css +++ b/gui/bweb/html/bweb.css @@ -4,8 +4,38 @@ a { text-decoration: none;} border: 1px solid #9d9d94; } -abutton.formulaire { class: formulaire; font-size: 9; height: 48px; width: 80px; background-color: transparent; } +abutton.formulaire { font-size: 9; height: 48px; width: 80px; background-color: transparent; } -button.formulaire { class: formulaire; border: 0px; font-size: 9; background-color: transparent; } +button.formulaire { border: 0px; font-size: 9; background-color: transparent; } td.joberr { background-color: red; font-color: white;} + + +.pSlice, .pSliceFull, .pSliceError, .pSliceAppend, .pSlicePurged, .pSliceRecycle, pSliceArchive, pSliceUsed, pSliceRead_Only, pSliceDisabled { + width: 2px; + height: 9px; + margin-right: 1px; + margin-bottom: 1px; + border: solid 1px #CCCCCC; + background-color: #E6E6E6; +} + +.pSliceFull, pSliceRead_Only,pSliceArchive, pSliceUsed, pSliceDisabled { + border: solid 1px #BD0C10; + background-color: #FF3029; +} + +.pSliceError { + border: solid 1px #000000; + background-color: #020202; +} + +.pSliceAppend { + border: solid 1px #CD6500; + background-color: #FFCE00; +} + +.pSlicePurged, .pSliceRecycle { + border: solid 1px #009900; + background-color: #00FF00; +} diff --git a/gui/bweb/html/bweb.js b/gui/bweb/html/bweb.js index 69fc247738..e92340ccf9 100644 --- a/gui/bweb/html/bweb.js +++ b/gui/bweb/html/bweb.js @@ -53,3 +53,73 @@ function bweb_add_refresh(){ window.setInterval("bweb_refresh()",refresh_time); } +// +// percent_display("row2", [ { nb: 1, name: "Full" }, +// { nb: 2, name: "Error" }, +// { nb: 5, name: "Append" }, +// { nb: 2, name: "Purged" }, +// {} # last element must be {} +// ]); + +function percent_get_img(type) +{ + var img=document.createElement('img'); + if (type) { + img.className="pSlice" + type ; + } else { + img.className="pSlice"; + } + img.src="/bweb/pix.png"; + img.alt=""; + return img; +} + +function percent_display(parent, hash_values) +{ + var nb_elt=20; + var tips= ""; + + if (typeof parent != "object") { + parent = document.getElementById(parent); + } + + if (!parent) { + alert("E : display_percent(): Can't find parent " + parent); + return; + } + + hash_values.pop(); // drop last element {} + + var nb_displayed = 0; + var nb_max = 0; + + for(var i=0;i=1)) { + nb_displayed++; + cur_nb--; + + var img= percent_get_img(cur_name); + parent.appendChild(img); + } + } + + while (nb_displayed < nb_elt) { + nb_displayed++; + var img= percent_get_img(); + parent.appendChild(img); + } + + parent.title = tips; + +} diff --git a/gui/bweb/html/pix.png b/gui/bweb/html/pix.png new file mode 100644 index 0000000000000000000000000000000000000000..de3da904d8bc6ee75666bb67a4b6ed7c847465b2 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>rX+877Y2q^y~;*F9%q3^WHFHT q0Ash4*>*q%x2KC^2*>s0gajamnSoK^>XhR^7K5j&pUXO@geCwijuP7d literal 0 HcmV?d00001 -- 2.39.5