]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/display_media.tpl
29c571e4490387f4a702b0208b1b9a9b89186ba9
[bacula/bacula] / gui / bweb / tpl / display_media.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'> 
4    Media
5   </h1>
6  </div>
7  <div class='bodydiv'>
8
9 <TMPL_IF Pool>
10 <h2>
11 Pool : <a href="?action=pool;pool=<TMPL_VAR Pool>">
12          <TMPL_VAR Pool>
13        </a>
14 </h2>
15 </TMPL_IF>
16 <TMPL_IF Location>
17 <h2>
18 Location : <TMPL_VAR location>
19 </h2>
20 </TMPL_IF>
21
22    <form action='?action=test' method='get'>
23     <table id='id_pool_<TMPL_VAR ID>'></table>
24       <input type="image" name='action' value='extern' title='Move out' src='/bweb/extern.png' onclick='return confirm("Do you want to eject selected media ?");'>&nbsp;
25       <input type="image" name='action' value='intern' title='Move in' src='/bweb/intern.png'>&nbsp;
26       <input type="image" name='action' value='update_media' title='Update media' src='/bweb/edit.png'>&nbsp;
27       <input type="image" name='action' value='media_zoom' title='Informations' src='/bweb/zoom.png'>&nbsp;
28 <!--
29       <input type="image" name='action' value='purge' title='Purge' src='/bweb/purge.png'>&nbsp;
30 -->
31       <input type="image" name='action' value='prune' title='Prune' src='/bweb/prune.png'>
32    </form>
33  </div>
34
35 <script type="text/javascript" language="JavaScript">
36
37 var header = new Array("Volume Name","Online","Vol Bytes", "Vol Usage", "Vol Status",
38                        "Pool", "Media Type",
39                        "Last Written", "When expire ?", "Select");
40
41 var data = new Array();
42 var img;
43 var chkbox;
44 var d;
45
46 <TMPL_LOOP Medias>
47 d = percent_usage(<TMPL_VAR volusage>);
48
49 img = document.createElement('IMG');
50 img.src = '/bweb/inflag<TMPL_VAR online>.png';
51
52 chkbox = document.createElement('INPUT');
53 chkbox.type  = 'checkbox';
54 chkbox.name = 'media';
55 chkbox.value = '<TMPL_VAR volumename>';
56
57 data.push( new Array(
58 "<TMPL_VAR volumename>",
59 img,
60 human_size(<TMPL_VAR volbytes>),
61 d,
62 "<TMPL_VAR volstatus>",
63 "<TMPL_VAR poolname>",
64 "<TMPL_VAR mediatype>",
65 "<TMPL_VAR lastwritten>",
66 "<TMPL_VAR expire>",
67 chkbox
68  )
69 );
70 </TMPL_LOOP>
71
72 nrsTable.setup(
73 {
74  table_name:     "id_pool_<TMPL_VAR ID>",
75  table_header: header,
76  table_data: data,
77  up_icon: up_icon,
78  down_icon: down_icon,
79  prev_icon: prev_icon,
80  next_icon: next_icon,
81  rew_icon:  rew_icon,
82  fwd_icon:  fwd_icon,
83  even_cell_color: even_cell_color,
84  odd_cell_color: odd_cell_color, 
85  header_color: header_color,
86  page_nav: true,
87  padding: 3,
88  rows_per_page: rows_per_page,
89  disable_sorting: new Array(1,8)
90 }
91 );
92 </script>