]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/display_job_group.tpl
bacula-web: Replaced Get_human_file_size() function by Utils::Get_Human_Size
[bacula/bacula] / gui / bweb / tpl / display_job_group.tpl
1  <div class='titlediv'>
2   <h1 class='newstitle'> __Group summary__ (<TMPL_VAR Filter>)</h1>
3  </div>
4  <div class='bodydiv'>
5     <table id='id<TMPL_VAR ID>'></table>
6  </div>
7
8 <script type="text/javascript" language="JavaScript">
9 <TMPL_IF status>
10 document.getElementById('status_<TMPL_VAR status>').checked = true;
11 </TMPL_IF>
12
13
14
15 var header = new Array("__Group__",
16                        "__Nb Jobs__",
17                        "__Nb Ok__",
18                        "__Nb Err__",
19                        "__Nb Files__", 
20                        "__Size__",
21                        "__Duration__",
22                        "__Errors__",
23                        "__Status__");
24
25 var data = new Array();
26 var age = <TMPL_VAR age>;
27
28 <TMPL_LOOP Groups>
29 a = document.createElement('A');
30 a.href='?action=job;client_group=<TMPL_VAR client_group_name>;age=' + age;
31
32 img = document.createElement("IMG");
33
34 if (<TMPL_VAR nbjoberr>) {
35   jobstatus='f';
36
37 } else {
38   jobstatus='T';
39 }
40
41 img.src=bweb_get_job_img(jobstatus, <TMPL_VAR joberrors>, "B");
42 img.title=jobstatus[jobstatus]; 
43
44 a.appendChild(img);
45
46 data.push( new Array(
47 "<TMPL_VAR client_group_name>",
48 <TMPL_VAR nbjobok> + <TMPL_VAR nbjoberr>, 
49 <TMPL_VAR nbjobok>,
50 <TMPL_VAR nbjoberr>,         
51 "<TMPL_VAR JobFiles>",    
52 human_size(<TMPL_VAR JobBytes>),
53 "<TMPL_VAR Duration>",
54 "<TMPL_VAR Joberrors>",
55 a
56  )
57 );
58 </TMPL_LOOP>
59
60 nrsTable.setup(
61 {
62  table_name:     "id<TMPL_VAR ID>",
63  table_header: header,
64  table_data: data,
65  up_icon: up_icon,
66  down_icon: down_icon,
67  prev_icon: prev_icon,
68  next_icon: next_icon,
69  rew_icon:  rew_icon,
70  fwd_icon:  fwd_icon,
71 // natural_compare: true,
72  even_cell_color: even_cell_color,
73  odd_cell_color: odd_cell_color, 
74  header_color: header_color,
75  page_nav: true,
76  rows_per_page: rows_per_page,
77  disable_sorting: new Array(10),
78  padding: 3
79 }
80 );
81
82 // get newest backup first
83 nrsTables['id<TMPL_VAR ID>'].fieldSort(0);
84 </script>