From: Eric Bollengier Date: Tue, 30 Jan 2007 14:31:10 +0000 (+0000) Subject: ebl update message when moving cartige X-Git-Tag: Release-2.0.2~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7c614d640cb72e5c467a8abe73f25b97761e7518;p=bacula%2Fbacula ebl update message when moving cartige git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4079 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 49e919a848..cd264eee63 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -860,12 +860,13 @@ sub send_to_io sub transfer { my ($self, $src, $dst) = @_ ; - print "
$self->{precmd} $self->{mtxcmd} -f $self->{device} transfer $src $dst
\n"; + if ($self->{debug}) { + print "
$self->{precmd} $self->{mtxcmd} -f $self->{device} transfer $src $dst
\n"; + } my $out = `$self->{precmd} $self->{mtxcmd} -f $self->{device} transfer $src $dst 2>&1`; if ($? == 0) { my $content = $self->get_slot($src); - print "$content ($src) => $dst
"; $self->{slot}->[$src] = 'empty'; $self->set_slot($dst, $content); return 1; @@ -901,13 +902,17 @@ sub clear_io if ($self->slot_is_full($slot)) { my $free = $self->slot_get_first_free() ; - print "want to move $slot to $free\n"; + print "move $slot to $free :\n"; if ($free) { - $self->transfer($slot, $free) || print "$self->{error}\n"; + if ($self->transfer($slot, $free)) { + print "ok
\n"; + } else { + print "ok
\n"; + } } else { - $self->{error} = "E : Can't find free slot"; + $self->{error} = "ok
\n"; } } } @@ -2432,7 +2437,7 @@ INSERT LocationLog (Date, Comment, MediaId, LocationId, NewVolStatus) $self->display({ email => $self->{info}->{email_media}, url => $url, newlocation => $newloc, - # [ { volumename => 'vol1' }, { volumename => 'vol2' },..] + # [ { volumename => 'vol1' }, { volumename => 'vol2' },..] medias => [ values %$medias ], }, "change_location.tpl"); @@ -2654,9 +2659,9 @@ WHERE Media.VolumeName IN ($arg->{jmedias}) print "eject $vol->{volumename} from $vol->{storage} : "; if ($a->send_to_io($vol->{slot})) { - print "ok
"; + print "ok
"; } else { - print "err
"; + print "err
"; } } return keys %ret; @@ -2716,7 +2721,8 @@ sub ach_get return undef; } - $a->{bweb} = $self; + $a->{bweb} = $self; + $a->{debug} = $self->{debug}; return $a; }