]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/display_media_zoom.tpl
ebl small javascript bugfix
[bacula/bacula] / gui / bweb / tpl / display_media_zoom.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'> Media : <TMPL_VAR volumename></h1>
4  </div>
5  <div class='bodydiv'>
6     <b> Media Infos </b><br/>
7     <table id='id_media_<TMPL_VAR volumename>'></table>
8     <b> Job List </b></br>
9     <table id='id_jobs_<TMPL_VAR volumename>'></table>
10     <b> Actions </b></br>
11    <form action='?' method='get'>
12       <input type='hidden' name='media' value='<TMPL_VAR volumename>'>
13 <TMPL_IF online>
14       <button class='formulaire' type='submit' name='action' value='extern' title='move out'><img src='/bweb/extern.png'></button>      
15 <TMPL_ELSE>
16       <button class='formulaire' type='submit' name='action' value='intern' title='move in'><img src='/bweb/intern.png'></button> 
17 </TMPL_IF>
18       <button class='formulaire' type='submit' name='action' value='update_media' title='Update'><img src='/bweb/edit.png'></button> 
19       <button class='formulaire' type='submit' name='action' value='purge' title='Purge'><img src='/bweb/purge.png'></button>
20       <button class='formulaire' type='submit' name='action' value='prune' title='Prune'><img src='/bweb/prune.png'></button>
21    </form>
22  </div>
23
24
25
26 <script language="JavaScript">
27
28 var header = new Array("Pool","Online","Location","Vol Status",
29                        "Vol Bytes", "Vol Mounts", "Expire",
30                        "Errors", "Retention", "Max use duration", "Max jobs");
31
32 var data = new Array();
33 var img;
34
35 img = document.createElement('IMG');
36 img.src = '/bweb/inflag<TMPL_VAR online>.png';
37
38 data.push( new Array(
39 "<TMPL_VAR poolname>",
40 img,
41 "<TMPL_VAR location>",
42 "<TMPL_VAR volstatus>",
43 "<TMPL_VAR nb_bytes>",
44 "<TMPL_VAR nb_mounts>",
45 "<TMPL_VAR expire>",
46 "<TMPL_VAR nb_errors>",
47 "<TMPL_VAR volretention>",
48 "<TMPL_VAR voluseduration>",
49 "<TMPL_VAR maxvoljobs>"
50  )
51 );
52
53 nrsTable.setup(
54 {
55  table_name:     "id_media_<TMPL_VAR volumename>",
56  table_header: header,
57  up_icon: up_icon,
58  down_icon: down_icon,
59  prev_icon: prev_icon,
60  next_icon: next_icon,
61  rew_icon:  rew_icon,
62  fwd_icon:  fwd_icon,
63  table_data: data,
64  header_color: header_color,
65  padding: 3,
66  disable_sorting: new Array(0,1,2,3,4,5)
67 }
68 );
69
70 var header = new Array("JobId","Name","Start Time","Type",
71                        "Level", "Files", "Bytes", "Status");
72
73 var data = new Array();
74 var a;
75 var img;
76
77 <TMPL_LOOP jobs>
78 a = document.createElement('A');
79 a.href='?action=job_zoom;jobid=<TMPL_VAR JobId>';
80
81 img = document.createElement("IMG");
82 img.src="/bweb/<TMPL_VAR status>.png";
83 img.title=jobstatus['<TMPL_VAR status>']; 
84
85 a.appendChild(img);
86
87 data.push( new Array(
88 "<TMPL_VAR jobid>",
89 "<TMPL_VAR name>",
90 "<TMPL_VAR starttime>",
91 "<TMPL_VAR type>",
92 "<TMPL_VAR level>",
93 "<TMPL_VAR files>",
94 "<TMPL_VAR bytes>",
95 a
96  )
97 );
98 </TMPL_LOOP>
99
100 nrsTable.setup(
101 {
102  table_name:     "id_jobs_<TMPL_VAR volumename>",
103  table_header: header,
104  table_data: data,
105  up_icon: up_icon,
106  down_icon: down_icon,
107  prev_icon: prev_icon,
108  next_icon: next_icon,
109  rew_icon:  rew_icon,
110  fwd_icon:  fwd_icon,
111 // natural_compare: false,
112  even_cell_color: even_cell_color,
113  odd_cell_color: odd_cell_color, 
114  header_color: header_color,
115  page_nav: true,
116  padding: 3,
117 // disable_sorting: new Array(5,6),
118  rows_per_page: rows_per_page
119 }
120 );
121 </script>