]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/display_pool.tpl
bacula-web: Replaced Get_human_file_size() function by Utils::Get_Human_Size
[bacula/bacula] / gui / bweb / tpl / display_pool.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'>__Pools__</h1>
4  </div>
5  <div class="bodydiv">
6    <form action='?' method='get'>
7     <table id='id<TMPL_VAR ID>'></table>
8     <button type="submit" class="bp" type='submit' name='action' value='media' title='__Show content__'> <img src='/bweb/zoom.png' alt=''>__View__</button>
9     <input id="mediatype" type='hidden' name='mediatype' value=''>
10    </form>
11    <br/>
12    __Tips: To modify pool properties, you have to edit your Bacula configuration and reload it. After, you have to run "update pool=mypool" with bconsole.__
13  </div>
14
15 <script type="text/javascript" language="JavaScript">
16
17 var header = new Array("__Name__","__Media Type__", "__Recycle__","__Retention__","__Use Duration__",
18                        "__Max jobs per volume__","__Max files per volume__", 
19                        "__Max volume size__","__Nb volumes__", "__Vol Status__", "__Usage__", "__Select__");
20
21 var data = new Array();
22 var chkbox;
23 var img;
24 var img2;
25
26 <TMPL_LOOP Pools>
27
28 img = percent_display([
29 <TMPL_IF nb_recycle>{ name: "Recycle", nb: <TMPL_VAR nb_recycle> },</TMPL_IF>
30 <TMPL_IF nb_purged> { name: "Purged", nb: <TMPL_VAR nb_purged> },</TMPL_IF>
31 <TMPL_IF nb_append> { name: "Append", nb: <TMPL_VAR nb_append> },</TMPL_IF>
32 <TMPL_IF nb_full>   { name: "Full", nb: <TMPL_VAR nb_full> },    </TMPL_IF>
33 <TMPL_IF nb_disabled>   { name: "Disabled", nb: <TMPL_VAR nb_disabled> },    </TMPL_IF>
34 <TMPL_IF nb_error>  { name: "Error", nb: <TMPL_VAR nb_error> },  </TMPL_IF>
35 <TMPL_IF nb_archive>{ name: "Archive", nb: <TMPL_VAR nb_archive> },</TMPL_IF>
36 <TMPL_IF nb_used>   { name: "Used", nb: <TMPL_VAR nb_used> },    </TMPL_IF>
37 <TMPL_IF NAME='nb_read-only'> { name: "Read-Only", nb: <TMPL_VAR NAME='nb_read-only'> }, </TMPL_IF>
38 {}
39 ]);
40
41 chkbox = document.createElement('INPUT');
42 chkbox.type  = 'radio';
43 chkbox.value = '<TMPL_VAR Name>';
44 chkbox.name  = 'pool';
45 chkbox.setAttribute('onclick','document.getElementById("mediatype").value="<TMPL_VAR mediatype>";');
46
47 img2 = percent_usage(<TMPL_VAR poolusage>);
48
49 data.push( new Array(
50 "<TMPL_VAR Name>",
51 "<TMPL_VAR mediatype>",
52 "<TMPL_VAR Recycle>",
53 human_sec(<TMPL_VAR VolRetention>),
54 human_sec(<TMPL_VAR VolUseDuration>),
55 "<TMPL_VAR MaxVolJobs>",
56 "<TMPL_VAR MaxVolFiles>",
57 human_size(<TMPL_VAR MaxVolBytes>),
58 "<TMPL_VAR VolNum>",
59 img,
60 img2,
61 chkbox
62  )
63 );
64 </TMPL_LOOP>
65
66 nrsTable.setup(
67 {
68  table_name:     "id<TMPL_VAR ID>",
69  table_header: header,
70  table_data: data,
71  up_icon: up_icon,
72  down_icon: down_icon,
73  prev_icon: prev_icon,
74  next_icon: next_icon,
75  rew_icon:  rew_icon,
76  fwd_icon:  fwd_icon,
77 // natural_compare: false,
78  even_cell_color: even_cell_color,
79  odd_cell_color: odd_cell_color, 
80  header_color: header_color,
81  page_nav: true,
82  padding: 3,
83 // disable_sorting: new Array(5,6),
84  rows_per_page: rows_per_page
85 }
86 );
87 </script>