]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Add time slice selection for job overview
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 25 Nov 2007 21:36:45 +0000 (21:36 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 25 Nov 2007 21:36:45 +0000 (21:36 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5988 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/cgi/bweb.pl
gui/bweb/tpl/display_form_job.tpl

index 948788cf20a029e8ef7b2467e11c26dd7a5ce162..c869e7737c849cc7eac97220021feda83d1cac1b 100755 (executable)
@@ -457,9 +457,10 @@ if ($action eq 'begin') {          # main display
 } elsif ($action eq 'overview') {
     $bweb->can_do('r_view_job');
     print "<div><table border='0'><tr><td valign='top'>\n";
-    my $fields = $bweb->get_form(qw/level filter age jobtype since
+    my $fields = $bweb->get_form(qw/level filter age jobtype since type
                                    db_client_groups qclient_groups/); # drop this to hide 
     $fields->{action}='overview';
+    $fields->{view_time_slice}=1;
     $bweb->display($fields, "display_form_job.tpl");
 
     print "</td><td valign='top'>";
@@ -469,9 +470,10 @@ if ($action eq 'begin') {          # main display
 } elsif ($action eq 'overview_zoom') {
     $bweb->can_do('r_view_job');
     print "<div><table border='0'><tr><td valign='top'>\n";
-    my $fields = $bweb->get_form(qw/level filter age jobtype since
+    my $fields = $bweb->get_form(qw/level filter age jobtype since type
                                 db_client_groups qclient_groups/); # drop this to hide 
     $fields->{action}='overview_zoom';
+    $fields->{view_time_slice}=1;
     $bweb->display($fields, "display_form_job.tpl");
     print "</td><td valign='top'>";
     $bweb->display_overview_zoom();
index 8386539bf72838101cf8e2858efe4d792ccb83fa..973348bd7b273023688a0eb1dec54955ee26ea13 100644 (file)
 <tr>
   <td valign='top'>
     <h2>Since</h2>
-    <input type='text' name='since' size='17' title='YYY-MM-DD'
+    <input type='text' id='since' name='since' size='17' title='YYY-MM-DD'
      value='<TMPL_VAR since>' class='formulaire'>
   </td>
  </tr>
 <tr>
   <td valign='top'>
     <h2>Age</h2>
-    <select name='age' class='formulaire'>
+    <select name='age' class='formulaire' onclick='document.getElementById("since").value="";'>
       <option id='age_604800'   value='604800'>1 week</option>
       <option id='age_2678400'  value='2678400'>30 days</option>
       <option id='age_15552000' value='15552000'>6 month</option>
   </td>
  </tr>
 </TMPL_UNLESS>
+<TMPL_IF view_time_slice>
+<tr>
+  <td valign='top'>
+    <h2>Time slice</h2>
+    <select name='type' class='formulaire'>
+      <option id='slice_day'   value='day'>Per days</option>
+      <option id='slice_week'  value='week'>Per weeks</option>
+      <option id='slice_month' value='month'>Per months</option>
+    </select>     
+  </td>
+ </tr>
+</TMPL_IF>
  <tr>
   <td valign='bottom'> 
     <h2>Number of items</h2>
      document.getElementById('age_<TMPL_VAR age>').selected=true;
   </TMPL_IF>
 
+  <TMPL_IF type>
+     document.getElementById('slice_<TMPL_VAR type>').selected=true;
+  </TMPL_IF>
+
   <TMPL_IF jobtype>
      document.getElementById('jobtype_<TMPL_VAR jobtype>').selected=true;
   </TMPL_IF>