]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bweb/lib/Bweb.pm
ebl fix volstatus in display_media
[bacula/bacula] / gui / bweb / lib / Bweb.pm
index e62f749f7f60cf527bf3820840647793bba6c28e..c3d7ee65f14d28db7a8349dbd25d136b70283565 100644 (file)
@@ -1436,6 +1436,13 @@ sub get_form
        }
     }
 
+    if ($what{when}) {
+       my $when = CGI::param('when') || '';
+       if ($when =~ /^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})$/) {
+           $ret{when} = $1;
+       }
+    }
+
     if ($what{db_clients}) {
        my $query = "
 SELECT Client.Name as clientname
@@ -1833,7 +1840,7 @@ sub get_param
 
     if ($elt{volstatus}) {
        my $status = CGI::param('volstatus') || '';
-       if ($status =~ /^(\w)$/) {
+       if ($status =~ /^(\w+)$/) {
            $ret{status} = $1;
            $limit .= "AND Media.VolStatus = '$1' ";            
        }
@@ -1903,6 +1910,7 @@ sub display_job
                                          'level',
                                          'filesets',
                                          'jobtype',
+                                         'pools',
                                          'jobid',
                                          'status');
 
@@ -3219,7 +3227,7 @@ sub run_job_now
     
     # TODO: check input (don't use pool, level)
 
-    my $arg = $self->get_form('pool', 'level', 'client', 'priority');
+    my $arg = $self->get_form('pool', 'level', 'client', 'priority', 'when');
     my $job = CGI::param('job') || '';
     my $storage = CGI::param('storage') || '';
 
@@ -3229,6 +3237,7 @@ sub run_job_now
                        level => $arg->{level},
                        storage => $storage,
                        pool => $arg->{pool},
+                       when => $arg->{when},
                        );
 
     print $jobid, $b->{error};