]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl update_slots after ejecting media
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Jan 2007 22:11:16 +0000 (22:11 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Jan 2007 22:11:16 +0000 (22:11 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4044 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/cgi/bweb.pl
gui/bweb/lib/Bweb.pm

index d4a8cf573afa7bd24a97a1d8f9f9d312294e2c12..6b3dd7d10a60902a3124b4da6fd3baa0bbfcdc88 100755 (executable)
@@ -220,8 +220,15 @@ if ($action eq 'begin') {          # main display
     $bweb->help_extern_compute();
 
 } elsif ($action eq 'extern') {
-    $bweb->eject_media();
+    print "<div style='float: left;'>";
+    my @achs = $bweb->eject_media();
+    for my $ach (@achs) {
+        CGI::param('ach', $ach);
+       $bweb->update_slots();
+    }
+    print "</div><div style='float: left;margin-left: 20px;'>";
     $bweb->move_media();
+    print "</div>";
 
 } elsif ($action eq 'move_email') {
     $bweb->move_email();
index d04a8b9e23e845db155fee31f53eeca1b12914f6..49e919a8485619bcd52dd9283216a7815dcccdf4 100644 (file)
@@ -2618,9 +2618,11 @@ WHERE JobStatus IN ('C','R','B','e','D','F','S','m','M','s','j','c','d','t','p')
                   "running_job.tpl") ;
 }
 
+# return the autochanger list to update
 sub eject_media
 {
     my ($self) = @_;
+    my %ret; 
     my $arg = $self->get_form('jmedias');
 
     unless ($arg->{jmedias}) {
@@ -2643,6 +2645,7 @@ WHERE Media.VolumeName IN ($arg->{jmedias})
     foreach my $vol (values %$all) {
        my $a = $self->ach_get($vol->{location});
        next unless ($a) ;
+       $ret{$vol->{location}} = 1;
 
        unless ($a->{have_status}) {
            $a->status();
@@ -2656,6 +2659,7 @@ WHERE Media.VolumeName IN ($arg->{jmedias})
            print "err</br>";
        }
     }
+    return keys %ret;
 }
 
 sub move_email