]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Update btime to use pool filter
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 12 Feb 2008 18:33:11 +0000 (18:33 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 12 Feb 2008 18:33:11 +0000 (18:33 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6405 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/cgi/btime.pl
gui/bweb/tpl/btime.tpl
gui/bweb/tpl/client_list.tpl

index e5ccc2a612a4e98fe3ecd4052aa4dd5fa3f421a8..6b682e130fd0797665aad1b446c1dfae398ef4ce 100755 (executable)
@@ -45,8 +45,11 @@ my $conf = new Bweb::Config(config_file => $Bweb::config_file);
 $conf->load();
 
 my $bweb = new Bweb(info => $conf);
-my $arg = $bweb->get_form(qw/qiso_begin qiso_end qusage qpool qnojob
+$bweb->can_do('r_view_stat');
+
+my $arg = $bweb->get_form(qw/qiso_begin qiso_end qusage qpools qpoolusage qnojob
                              jclient_groups db_client_groups qclient_groups/);
+my ($filter1, undef) = $bweb->get_param('pool');
 
 if (!$arg->{qiso_begin}) {
    $arg->{qiso_begin} = strftime('\'%F %H:%M:00\'', localtime(time - 60*60*12));
@@ -54,7 +57,7 @@ if (!$arg->{qiso_begin}) {
 }
 use Digest::MD5 qw(md5_hex);
 my $md5_rep = md5_hex("$arg->{qiso_begin}:$arg->{qiso_end}:$arg->{qusage}:" . 
-                     "$arg->{jclient_groups}:$arg->{qpool};$arg->{qnojob}") ;
+                     "$arg->{jclient_groups}:$arg->{qpoolusage};$arg->{qnojob}") ;
 
 print CGI::header('text/html');
 $bweb->display_begin();
@@ -128,8 +131,8 @@ FROM  Log INNER JOIN Job USING (JobId) JOIN Pool USING (PoolId)
   AND Job.StartTime < $arg->{qiso_end}
   AND ( $filter )
   AND Job.Type = 'B'
-ORDER BY Job.JobId,Log.LogId,Log.Time  
-";
+  $filter1
+ ORDER BY Job.JobId,Log.LogId,Log.Time  ";
 
 
 print STDERR $query if ($conf->{debug});
@@ -250,7 +253,7 @@ if (!$arg->{qnojob} && $last_name) {
     $top->add_job(label => $last_name,
                  data => $data);
 }
-if ($arg->{qpool}) {
+if ($arg->{qpoolusage}) {
     foreach my $d (sort keys %$pool) {
        $top->add_job(label => $d,
                      data => $pool->{$d});
index fe2aa2b2615ac1a025fbdd720a2d2da2cf384428..4c79ce59ca448052a6954319a13fb3f920be9ed7 100644 (file)
@@ -34,8 +34,8 @@
              <TMPL_IF qusage>checked</TMPL_IF> 
              name="usage"> __Drive usage__<br/>
       <input type='checkbox' 
-             <TMPL_IF qpool>checked</TMPL_IF> 
-             name="pool"> __Pool usage__<br/>
+             <TMPL_IF qpoolusage>checked</TMPL_IF> 
+             name="poolusage"> __Pool usage__<br/>
       <input type='checkbox' 
              <TMPL_IF qnojob>checked</TMPL_IF> 
              name="nojob"> __Hide Job__<br/>
     </select>
   </td>
 </tr>
+</TMPL_IF>
+<TMPL_IF db_pools>
+<tr>
+  <td valign='top'>
+    <h2>__Pools__</h2>
+    <select name='pool' size='10' class='formulaire' multiple>
+<TMPL_LOOP db_pools>
+       <option id= 'pool_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
 </TMPL_IF>
   </td>
 </tr>
      document.getElementById('group_' + <TMPL_VAR name>).selected = true;
   </TMPL_LOOP>
 
+  <TMPL_LOOP qpools>
+     document.getElementById('pool_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
   <TMPL_LOOP qclients>
      document.getElementById('client_' + <TMPL_VAR name>).selected = true;
   </TMPL_LOOP>
index cea85decc56e979ae2b9dea3907679de04df85d9..a452f4b164a54b877f6416bb10dd2c3d28c57a03 100644 (file)
@@ -12,6 +12,7 @@
 <!--        <h1>__Actions__</h1> -->   
        <button type="submit" class="bp" name='action' value='job' title="__Show last job__"> <img src='/bweb/zoom.png' alt=''>__Last jobs__</button>
        <button type="submit" class="bp" name='action' value='dsp_cur_job' title='__Show current job__'> <img src='/bweb/zoom.png' alt=''>__Current jobs__</button>
+       <button type="submit" class="bp" name='action' value='groups' title='__View client groups__'> <img src='/bweb/zoom.png' alt=''>__View groups__</button>
        <button type="submit" class="bp" name='action' value='client_status' title='__Show client status__'> <img src='/bweb/zoom.png' alt=''>__Status__ </button>
        <button type="submit" class="bp" name='action' value='client_stats' title='__Client stats__'> <img src='/bweb/chart.png' alt=''>__Stats__ </button>
         </div>