]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/display_job.tpl
ebl small javascript bugfix
[bacula/bacula] / gui / bweb / tpl / display_job.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'> Last Jobs (<TMPL_VAR Filter>)</h1>
4  </div>
5  <div class='bodydiv'>
6     <table id='id<TMPL_VAR ID>'></table>
7  </div>
8
9 <script language="JavaScript">
10 <TMPL_IF status>
11 document.getElementById('status_<TMPL_VAR status>').checked = true;
12 </TMPL_IF>
13
14
15
16 var header = new Array("JobId",
17                        "Client",
18                        "Job Name", 
19                        "FileSet",
20 //                     "Pool",
21                        "Level",
22                        "StartTime",
23                        "Duration",
24                        "JobFiles",
25                        "JobBytes", 
26                        "Errors",
27                        "Status");
28
29 var data = new Array();
30
31 <TMPL_LOOP Jobs>
32 a = document.createElement('A');
33 a.href='?action=job_zoom;jobid=<TMPL_VAR JobId>';
34
35 img = document.createElement("IMG");
36 img.src="/bweb/<TMPL_VAR JobStatus>.png";
37 img.title=jobstatus['<TMPL_VAR JobStatus>']; 
38
39 a.appendChild(img);
40
41 data.push( new Array(
42 "<TMPL_VAR JobId>",
43 "<TMPL_VAR Client>",     
44 "<TMPL_VAR JobName>",    
45 "<TMPL_VAR FileSet>",    
46 //"<TMPL_VAR Pool>",
47 "<TMPL_VAR Level>",      
48 "<TMPL_VAR StartTime>",
49 "<TMPL_VAR Duration>",
50 "<TMPL_VAR JobFiles>",   
51 "<TMPL_VAR JobBytes>",
52 "<TMPL_VAR joberrors">",   
53 a
54  )
55 );
56 </TMPL_LOOP>
57
58 nrsTable.setup(
59 {
60  table_name:     "id<TMPL_VAR ID>",
61  table_header: header,
62  table_data: data,
63  up_icon: up_icon,
64  down_icon: down_icon,
65  prev_icon: prev_icon,
66  next_icon: next_icon,
67  rew_icon:  rew_icon,
68  fwd_icon:  fwd_icon,
69 // natural_compare: true,
70  even_cell_color: even_cell_color,
71  odd_cell_color: odd_cell_color, 
72  header_color: header_color,
73  page_nav: true,
74  rows_per_page: rows_per_page,
75 // disable_sorting: new Array(6)
76  padding: 3
77 }
78 );
79
80 // get newest backup first
81 nrsTables['id<TMPL_VAR ID>'].fieldSort(0);
82 </script>