1 var even_cell_color = "#FFFFFF";
2 var odd_cell_color = "#EEEEEE";
3 var header_color = "#E1E0DA";
4 var rows_per_page = 20;
5 var up_icon = "/bweb/up.gif";
6 var down_icon = "/bweb/down.gif";
7 var prev_icon = "/bweb/left.gif";
8 var next_icon = "/bweb/right.gif";
9 var rew_icon = "/bweb/first.gif";
10 var fwd_icon = "/bweb/last.gif";
13 'C': 'created but not yet running',
16 'T': 'terminated normally',
17 'E': 'Job terminated in error',
18 'e': 'Non-fatal error',
20 'D': 'Verify differences',
21 'A': 'canceled by user',
22 'F': 'waiting on File daemon',
23 'S': 'waiting on the Storage daemon',
24 'm': 'waiting for new media',
25 'M': 'waiting for Mount',
26 's': 'Waiting for storage resource',
27 'j': 'Waiting for job resource',
28 'c': 'Waiting for Client resource',
29 'd': 'Waiting for maximum jobs',
30 't': 'Waiting for start time',
31 'p': 'Waiting for higher priority jobs to finish'
36 'I': 'Incr (since last backup)',
37 'D': 'Diff (since last full backup)',
38 'C': 'verify from catalog',
39 'V': 'verify save (init DB)',
40 'O': 'verify Volume to catalog entries',
41 'd': 'verify Disk attributes to catalog',
42 'A': 'verify data on volume',
47 var refresh_time = 60000;
49 function bweb_refresh() {
52 function bweb_add_refresh(){
53 window.setInterval("bweb_refresh()",refresh_time);
57 // percent_display("row2", [ { nb: 1, name: "Full" },
58 // { nb: 2, name: "Error" },
59 // { nb: 5, name: "Append" },
60 // { nb: 2, name: "Purged" },
61 // {} # last element must be {}
64 function percent_get_img(type)
66 var img=document.createElement('img');
68 img.className="pSlice" + type ;
70 img.className="pSlice";
72 img.src="/bweb/pix.png";
77 var percent_display_nb_slice = 20;
78 var percent_usage_nb_slice = 5;
80 function percent_display(hash_values, parent)
82 var nb_elt=percent_display_nb_slice;
86 parent = document.createElement('DIV');
89 if (typeof parent != "object") {
90 parent = document.getElementById(parent);
94 alert("E : display_percent(): Can't find parent " + parent);
98 hash_values.pop(); // drop last element {}
100 var nb_displayed = 0;
103 for(var i=0;i<hash_values.length;i++) {
104 nb_max += hash_values[i]['nb'];
107 for(var i=0;i<hash_values.length;i++) {
108 var elt = hash_values[i];
109 var cur_nb = (elt['nb'] * nb_elt)/nb_max;
110 var cur_name = elt['name'];
111 cur_name.replace(/-/,"_");
113 tips = tips + " " + elt['nb'] + " " + cur_name;
115 while ((nb_displayed < nb_elt) && (cur_nb >=1)) {
119 var img= percent_get_img(cur_name);
120 parent.appendChild(img);
124 while (nb_displayed < nb_elt) {
126 var img= percent_get_img();
127 parent.appendChild(img);
135 function percent_usage(value, parent)
137 var nb_elt=percent_usage_nb_slice;
141 parent = document.createElement('DIV');
144 if (typeof parent != "object") {
145 parent = document.getElementById(parent);
149 alert("E : display_percent(): Can't find parent " + parent);
156 } else if (value <= 40) {
158 } else if (value <= 75) {
160 } else if (value <= 85) {
166 var nb = parseInt(value*nb_elt/100, 10);
167 parent.title = parseInt(value*100,10)/100 + "% used (approximate)";
169 for(var i=0; i<nb; i++) {
170 var img= percent_get_img(type);
171 parent.appendChild(img);
174 for(nb;nb < nb_elt;nb++) {
175 var img= percent_get_img("Empty");
176 parent.appendChild(img);