]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/display_pool.tpl
ebl Use a automatic rediction when launching a new job
[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
13    and reload it. After, you have to run "update pool=mypool" with bconsole.
14  </div>
15
16 <script type="text/javascript" language="JavaScript">
17
18 var header = new Array("Name","Media Type", "Recycle","Retention","Use Duration",
19                        "Max jobs per volume","Max files per volume", 
20                        "Max volume size","Nb volumes", "Vol Status", "Usage", "Select");
21
22 var data = new Array();
23 var chkbox;
24 var img;
25 var img2;
26
27 <TMPL_LOOP Pools>
28
29 img = percent_display([
30 <TMPL_IF nb_recycle>{ name: "Recycle", nb: <TMPL_VAR nb_recycle> },</TMPL_IF>
31 <TMPL_IF nb_purged> { name: "Purged", nb: <TMPL_VAR nb_purged> },</TMPL_IF>
32 <TMPL_IF nb_append> { name: "Append", nb: <TMPL_VAR nb_append> },</TMPL_IF>
33 <TMPL_IF nb_full>   { name: "Full", nb: <TMPL_VAR nb_full> },    </TMPL_IF>
34 <TMPL_IF nb_disabled>   { name: "Disabled", nb: <TMPL_VAR nb_disabled> },    </TMPL_IF>
35 <TMPL_IF nb_error>  { name: "Error", nb: <TMPL_VAR nb_error> },  </TMPL_IF>
36 <TMPL_IF nb_archive>{ name: "Archive", nb: <TMPL_VAR nb_archive> },</TMPL_IF>
37 <TMPL_IF nb_used>   { name: "Used", nb: <TMPL_VAR nb_used> },    </TMPL_IF>
38 <TMPL_IF NAME='nb_read-only'> { name: "Read-Only", nb: <TMPL_VAR NAME='nb_read-only'> }, </TMPL_IF>
39 {}
40 ]);
41
42 chkbox = document.createElement('INPUT');
43 chkbox.type  = 'radio';
44 chkbox.value = '<TMPL_VAR Name>';
45 chkbox.name  = 'pool';
46 chkbox.setAttribute('onclick','document.getElementById("mediatype").value="<TMPL_VAR mediatype>";');
47
48 img2 = percent_usage(<TMPL_VAR poolusage>);
49
50 data.push( new Array(
51 "<TMPL_VAR Name>",
52 "<TMPL_VAR mediatype>",
53 "<TMPL_VAR Recycle>",
54 human_sec(<TMPL_VAR VolRetention>),
55 human_sec(<TMPL_VAR VolUseDuration>),
56 "<TMPL_VAR MaxVolJobs>",
57 "<TMPL_VAR MaxVolFiles>",
58 human_size(<TMPL_VAR MaxVolBytes>),
59 "<TMPL_VAR VolNum>",
60 img,
61 img2,
62 chkbox
63  )
64 );
65 </TMPL_LOOP>
66
67 nrsTable.setup(
68 {
69  table_name:     "id<TMPL_VAR ID>",
70  table_header: header,
71  table_data: data,
72  up_icon: up_icon,
73  down_icon: down_icon,
74  prev_icon: prev_icon,
75  next_icon: next_icon,
76  rew_icon:  rew_icon,
77  fwd_icon:  fwd_icon,
78 // natural_compare: false,
79  even_cell_color: even_cell_color,
80  odd_cell_color: odd_cell_color, 
81  header_color: header_color,
82  page_nav: true,
83  padding: 3,
84 // disable_sorting: new Array(5,6),
85  rows_per_page: rows_per_page
86 }
87 );
88 </script>