]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/ach_content.tpl
bacula-web: Replaced Get_human_file_size() function by Utils::Get_Human_Size
[bacula/bacula] / gui / bweb / tpl / ach_content.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'> 
4 __Autochanger:__ <TMPL_VAR Name> (<TMPL_VAR nb_drive> __Drives__
5 <TMPL_IF nb_io><TMPL_VAR nb_io> __IMPORT/EXPORT__</TMPL_IF>)</h1>
6  </div>
7  <div class='bodydiv'>
8    <form action='?' method='get'>
9     <input type='hidden' name='ach' value='<TMPL_VAR name>'>
10     <TMPL_IF "Update">
11     <font color='red'> __You must run update slot, Autochanger status is different from bacula slots__ </font>
12     <br/>
13     </TMPL_IF>
14     <table border='0'>
15     <tr>
16     <td valign='top'>
17     <div class='otherboxtitle'>
18      __Tools__
19     </div>
20     <div class='otherbox'>
21 <button type="submit" class="bp" name='action' value='label_barcodes'
22  title='__run label barcodes__'><img src='/bweb/label.png' alt=''>__Label__</button>
23 <TMPL_IF nb_io>
24 <button type="submit" class="bp" name='action' value='eject'
25  title='__put selected media on i/o__'><img src='/bweb/extern.png' alt=''>__Eject__</button>
26 <button type="submit" class="bp" name='action' value='clear_io'
27  title='__clear I/O__'> <img src='/bweb/intern.png' alt=''>__Clear I/O__</button>
28 </TMPL_IF>
29 <button type="submit" class="bp" name='action' value='update_slots'
30  title='__run update slots__'> <img src='/bweb/update.png' alt=''>__Update__</button>
31 <br/><br/>
32 <button type="submit" class="bp" name='action' value='ach_load'
33  title='__mount drive__'> <img src='/bweb/load.png' alt=''>__Mount__</button>
34 <button type="submit" class="bp" name='action' value='ach_unload'
35  title='__umount drive__'> <img src='/bweb/unload.png' alt=''>__Umount__</button>
36
37    </div>
38     <td width='200'/>
39     <td>
40     <b> __Drives:__ </b><br/>
41     <table id='id_drive'></table> <br/>
42     </td>
43     </tr>
44     </table>
45     <b> __Content:__ </b><br/>
46     <table id='id_ach'></table>
47    </form>
48  </div>
49
50 <script type="text/javascript" language="JavaScript">
51
52 var header = new Array("__Real Slot__", "__Slot__", "__Volume Name__",
53                        "__Vol Bytes__","__Vol Status__",
54                        "__Media Type__","__Pool Name__","__Last Written__", 
55                        "__When expire ?__", "__Select__");
56
57 var data = new Array();
58 var chkbox;
59
60 <TMPL_LOOP Slots>
61 chkbox = document.createElement('INPUT');
62 chkbox.type  = 'checkbox';
63 chkbox.name = 'slot';
64 chkbox.value = '<TMPL_VAR realslot>';
65
66 data.push( new Array(
67 "<TMPL_VAR realslot>",
68 "<TMPL_VAR slot>",
69 "<TMPL_VAR volumename>",
70 human_size(<TMPL_VAR volbytes>),
71 "<TMPL_VAR volstatus>",
72 "<TMPL_VAR mediatype>",
73 "<TMPL_VAR name>",
74 "<TMPL_VAR lastwritten>",
75 timestamp_to_iso("<TMPL_VAR expire>"),
76 chkbox
77  )
78 );
79 </TMPL_LOOP>
80
81 nrsTable.setup(
82 {
83  table_name:     "id_ach",
84  table_header: header,
85  table_data: data,
86  up_icon: up_icon,
87  down_icon: down_icon,
88  prev_icon: prev_icon,
89  next_icon: next_icon,
90  rew_icon:  rew_icon,
91  fwd_icon:  fwd_icon,
92 // natural_compare: false,
93  even_cell_color: even_cell_color,
94  odd_cell_color: odd_cell_color, 
95  header_color: header_color,
96 // page_nav: true,
97 // rows_per_page: rows_per_page,
98 // disable_sorting: new Array(5,6)
99  padding: 3
100 }
101 );
102
103 var header = new Array("__Index__", "__Drive Name__", 
104                        "__Volume Name__", "__Select__");
105
106 var data = new Array();
107 var chkbox;
108
109 <TMPL_LOOP Drives>
110 chkbox = document.createElement('INPUT');
111 chkbox.type  = 'checkbox';
112 chkbox.name = 'drive';
113 chkbox.value = '<TMPL_VAR index>';
114
115 data.push( new Array(
116 "<TMPL_VAR index>",
117 "<TMPL_VAR name>",
118 "<TMPL_VAR load>",
119 chkbox
120  )
121 );
122 </TMPL_LOOP>
123
124 nrsTable.setup(
125 {
126  table_name:     "id_drive",
127  table_header: header,
128  table_data: data,
129  up_icon: up_icon,
130  down_icon: down_icon,
131  prev_icon: prev_icon,
132  next_icon: next_icon,
133  rew_icon:  rew_icon,
134  fwd_icon:  fwd_icon,
135 // natural_compare: false,
136  even_cell_color: even_cell_color,
137  odd_cell_color: odd_cell_color, 
138  header_color: header_color,
139 // page_nav: true,
140 // rows_per_page: rows_per_page,
141 // disable_sorting: new Array(5,6),
142  padding: 3
143 }
144 );
145
146 </script>