]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/graph.tpl
ebl Made html selection more simple
[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' title="Job size per job for the period">Job Size</option>
72    <option id='job_duration' value='job_duration' title="Job duration per job for the period">Job Duration</option>
73    <option id='job_rate' value='job_rate' title="Job rate per job for the period">Job Rate</option>
74    <option id='job_file' value='job_file' title="Number of backed files per job for the period">Job Files</option>
75    <option id='job_count_phour' value='job_count_phour' title="Number of jobs per hour for the period">Job per hour</option>
76    <option id='job_count_pday' value='job_count_pday' title="Number of jobs per day for the period">Job per day</option>
77    <option id='job_avg_phour' value='job_avg_pday' title="Average backup size per day for the period">Job avg B/hour</option>
78    <option id='job_avg_pday' value='job_avg_pday' title="Average backup size per hour for the period">Job avg B/day</option>
79    <option id='job_sum_phour' value='job_sum_phour' title="Job size per hour">Job total B/hour</option>
80    <option id='job_sum_pday' value='job_sum_pday' title="Job size per day">Job total B/day</option>
81    <option id='job_count_hour' value='job_count_hour' title="Number of jobs per hour for the period">Jobs Count (h)</option>
82    <option id='job_count_day' value='job_count_day' title="Number of jobs per day for the period">Jobs Count (d)</option>
83    <option id='job_avg_hour' value='job_avg_hour' title="Average backup size per hour for the period">Job avg size (h)</option>
84    <option id='job_avg_day' value='job_avg_day' title="Average backup size per day for the period">Job avg size (d)</option>
85    <option id='job_sum_hour' value='job_sum_hour' title="Job size per hour for the period">Job Bytes (h)</option>
86    <option id='job_sum_day' value='job_sum_day' title="Job size per day for the period">Job Bytes (d)</option>
87    <option onclick='document.getElementById("gtype_balloon").selected=true;' id='job_time_size' value='job_time_size' title="Display Job size, duration and number of files with a balloon">Size,time,files</option>
88
89  </select>
90   </td>
91   <td valign='bottom'> 
92     <h2>Number of items</h2>
93     <input type='text' name='limit' value='<TMPL_VAR NAME=limit>' 
94         class='formulaire' size='4'>
95   </td>
96 </tr>
97 <tr>
98 <td><h2> Graph type </h2> 
99   <select name='gtype' class='formulaire'>
100     <option id='gtype_bars' value='bars'>Bars</option>
101 <!--  <option id='gtype_bars3d' value='bars3d'>Bars3d</option> -->
102     <option id='gtype_lines' value='lines'>Lines</option>
103     <option onclick='document.getElementById("job_time_size").selected=true;' id='gtype_balloon' value='balloon'>Balloon</option>
104     <option id='gtype_linespoints' value='linespoints'>Lines points</option>
105 </td>
106 <td>
107   <input type='submit' name='action' value='graph' class='formulaire'> 
108 </td>
109 </tr>
110 </table>
111         </div>
112
113 </form>
114 </td>
115 <td>
116
117  <div class="otherboxtitle">
118  Current &nbsp;
119  </div>
120  <div class="otherbox">
121
122  <img usemap='imggraph' id='imggraph' 
123       alt='Nothing to display, Try a bigger date range'>
124  </div>
125
126 </td>
127 </table>
128  </div>
129
130 <script type="text/javascript" language="JavaScript">
131
132   <TMPL_LOOP qclients>
133      document.getElementById('client_' + <TMPL_VAR name>).selected = true;
134   </TMPL_LOOP>
135
136   <TMPL_IF status>
137      document.getElementById('status_<TMPL_VAR status>').selected=true;
138   </TMPL_IF>
139
140   <TMPL_IF level>
141      document.getElementById('level_<TMPL_VAR level>').selected=true;
142   </TMPL_IF>
143
144   <TMPL_IF age>
145      document.getElementById('age_<TMPL_VAR age>').selected=true;
146   </TMPL_IF>
147
148 <TMPL_IF qfilesets>
149   for (var i=0; i < document.form1.fileset.length; ++i) {
150   <TMPL_LOOP qfilesets>
151      if (document.form1.fileset[i].value == <TMPL_VAR name>) {
152         document.form1.fileset[i].selected = true;
153      }
154   </TMPL_LOOP>
155   }
156 </TMPL_IF>
157
158 <TMPL_IF qjobnames>
159   for (var i=0; i < document.form1.jobname.length; ++i) {
160   <TMPL_LOOP qjobnames>
161      if (document.form1.jobname[i].value == <TMPL_VAR name>) {
162         document.form1.jobname[i].selected = true;
163      }
164   </TMPL_LOOP>
165   }
166 </TMPL_IF>
167
168   <TMPL_IF graph>
169      document.getElementById('<TMPL_VAR graph>').selected=true;
170   </TMPL_IF>
171
172   <TMPL_IF gtype>
173      document.getElementById('gtype_<TMPL_VAR gtype>').selected=true;
174   </TMPL_IF>
175
176   <TMPL_IF url>
177    document.getElementById('imggraph').src='bgraph.pl?<TMPL_VAR NAME=url>'
178   </TMPL_IF>
179
180 </script>