]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/graph.tpl
ebl - change default config file format, use Data::Dumper now
[bacula/bacula] / gui / bweb / tpl / graph.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'>Statistics</h1>
4  </div>
5  <div class='bodydiv'>
6 <table border='0'>
7 <td>
8 <form name='form1' action='?' method='GET'>
9         <div class="otherboxtitle">
10           Options &nbsp;
11         </div>
12         <div class="otherbox">
13 <table border='0'>
14 <tr>
15   <td valign='top'>
16     <h2>Level</h2>
17     <select name='level' class='formulaire'>
18       <option id='level_Any' value='Any'>Any</option>
19       <option id='level_F' value='F'>Full</option>
20       <option id='level_D' value='D'>Differential</option>
21       <option id='level_I' value='I'>Incremental</option>
22     </select>     
23   </td><td valign='top'>
24     <h2>Status</h2>
25     <select name='status' class='formulaire'>
26       <option id='status_Any' value='Any'>Any</option>
27       <option id='status_T'   value='T'>Ok</option>
28       <option id='status_f'   value='f'>Error</option>
29       <option id='status_A'   value='A'>Canceled</option>
30     </select>   
31   </td>
32 </tr>
33 <tr>
34   <td valign='top'>
35     <h2>Age</h2>
36     <select name='age' class='formulaire'>
37       <option id='age_604800'   value='604800'>This week</option>
38       <option id='age_2678400'  value='2678400'>Last 30 days</option>
39       <option id='age_15552000' value='15552000'>Last 6 month</option>
40     </select>     
41   </td>
42   <td  valign='top'>
43     <h2>Size</h2>
44      Width: &nbsp;<input class='formulaire' type='text' 
45                          name='width' value='<TMPL_VAR width>' size='4'><br/>
46      Height:  <input type='text' class='formulaire' 
47                 name='height' value='<TMPL_VAR height>' size='4'><br/>
48   </td>
49 </tr>
50 <tr>
51   <td valign='top'> 
52     <h2>Clients</h2>
53     <select name='client' size='15' class='formulaire' multiple>
54 <TMPL_LOOP NAME=db_clients>
55       <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
56 </TMPL_LOOP>
57     </select>
58   </td>
59   <td valign='top'> 
60     <h2>Job Name</h2>
61     <select name='jobname' size='15' class='formulaire' multiple>
62 <TMPL_LOOP NAME=db_jobnames>
63       <option><TMPL_VAR NAME=jobname></option>
64 </TMPL_LOOP>
65     </select>
66   </td>
67 </tr>
68 <tr>
69   <td> <h2> Type </h2> 
70  <select name='graph' class='formulaire'>
71    <option id='job_size'     value='job_size'>Job Size</option>
72    <option id='job_duration' value='job_duration'>Job Duration</option>
73    <option id='job_rate' value='job_rate'>Job Rate</option>
74    <option id='job_file' value='job_file'>Job Files</option>
75  </select>
76   </td>
77   <td valign='bottom'> 
78     <h2>Number of items</h2>
79     <input type='text' name='limit' value='<TMPL_VAR NAME=limit>' 
80         class='formulaire' size='4'>
81   </td>
82 </tr>
83 <tr>
84 <td><h2> Graph type </h2> 
85   <select name='gtype' class='formulaire'>
86     <option id='gtype_bars' value='bars'>Bars</option>
87 <!--  <option id='gtype_bars3d' value='bars3d'>Bars3d</option> -->
88     <option id='gtype_lines' value='lines'>Lines</option>
89     <option id='gtype_linespoints' value='linespoints'>Lines points</option>
90 </td>
91 <td>
92   <input type='submit' name='action' value='graph' class='formulaire'> 
93 </td>
94 </tr>
95 </table>
96         </div>
97
98 </form>
99 </td>
100 <td>
101
102  <div class="otherboxtitle">
103  Current &nbsp;
104  </div>
105  <div class="otherbox">
106  <img src='bgraph.pl?<TMPL_VAR NAME=url>' alt='Nothing to display, Try a bigger date range'>
107  </div>
108
109 </td>
110 </table>
111  </div>
112
113 <script language="JavaScript">
114
115   <TMPL_LOOP qclients>
116      document.getElementById('client_' + <TMPL_VAR name>).selected = true;
117   </TMPL_LOOP>
118
119   <TMPL_IF status>
120      document.getElementById('status_<TMPL_VAR status>').selected=true;
121   </TMPL_IF>
122
123   <TMPL_IF level>
124      document.getElementById('level_<TMPL_VAR level>').selected=true;
125   </TMPL_IF>
126
127   <TMPL_IF age>
128      document.getElementById('age_<TMPL_VAR age>').selected=true;
129   </TMPL_IF>
130
131 <TMPL_IF qfilesets>
132   for (var i=0; i < document.form1.fileset.length; ++i) {
133   <TMPL_LOOP qfilesets>
134      if (document.form1.fileset[i].value == <TMPL_VAR name>) {
135         document.form1.fileset[i].selected = true;
136      }
137   </TMPL_LOOP>
138   }
139 </TMPL_IF>
140
141 <TMPL_IF qjobnames>
142   for (var i=0; i < document.form1.jobname.length; ++i) {
143   <TMPL_LOOP qjobnames>
144      if (document.form1.jobname[i].value == <TMPL_VAR name>) {
145         document.form1.jobname[i].selected = true;
146      }
147   </TMPL_LOOP>
148   }
149 </TMPL_IF>
150
151   <TMPL_IF graph>
152      document.getElementById('<TMPL_VAR graph>').selected=true;
153   </TMPL_IF>
154
155   <TMPL_IF gtype>
156      document.getElementById('gtype_<TMPL_VAR gtype>').selected=true;
157   </TMPL_IF>
158
159 </script>
160