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