X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FArchive.pm;h=18f7ba48abeec9a7b1e3857aa786feb98ff3f976;hp=890ba5104e2a557b3022eb2dd9ed931c80f202ea;hb=c615e1bfc6f2b0604a2658996f5dd6b6cfa9469c;hpb=f6fbcc3682d2bc9e7dfdc26e95bd5fcdb359496d diff --git a/lib/BackupPC/CGI/Archive.pm b/lib/BackupPC/CGI/Archive.pm index 890ba51..18f7ba4 100644 --- a/lib/BackupPC/CGI/Archive.pm +++ b/lib/BackupPC/CGI/Archive.pm @@ -10,7 +10,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2003-2007 Craig Barratt +# Copyright (C) 2003-2009 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.2.0beta0, released 5 April 2009. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -39,6 +39,7 @@ package BackupPC::CGI::Archive; use strict; use BackupPC::CGI::Lib qw(:all); use Data::Dumper; +use BackupPC::Search; sub action { @@ -60,6 +61,7 @@ sub action my($fullDur, $incrCnt, $fullSize, $fullRate); my @Backups = $bpc->BackupInfoRead($host); my $fullCnt = $incrCnt = 0; + for ( my $i = 0 ; $i < @Backups ; $i++ ) { if ( $Backups[$i]{type} eq "full" ) { $fullSize = $Backups[$i]{size} / (1024 * 1024); @@ -71,6 +73,20 @@ sub action } $fullSizeTot += $fullSize + $incrSizeTot; $fullSize = sprintf("%.2f", ($fullSize + $incrSizeTot) / 1000); + + $bpc->ConfigRead($archHost); + %Conf = $bpc->Conf(); + + my $checkboxes; + foreach my $backupnumber ( BackupPC::Search::host_backup_nums($host) ) { + $checkboxes .= qq| + +$backupnumber + |; + $checkBoxCnt++; + } + +=for ASA extension removed this $str = <  ${HostLink($host)} @@ -78,6 +94,20 @@ sub action $fullSize EOF $checkBoxCnt++; +=cut + + $str = < + +${HostLink($host)} +$checkboxes + + +${UserLink($Hosts->{$host}{user})} + + $fullSize +EOF + if ( @Backups == 0 ) { $hostCntNone++; $strNone .= $str; @@ -124,6 +154,7 @@ EOF next if ( !defined($In{"fcb$i"}) ); my $name = $In{"fcb$i"}; my $backupno = $In{"backup$i"}; + next unless defined $backupno; # ASA - skip hosts without backups checked push(@HostList, $name); push(@BackupList, $backupno); $hiddenStr .= < EOF $HostListStr .= < ${EscHTML($name)} +
  • ${EscHTML($name)} $i EOF } $hiddenStr .= < bytes my %ArchiveReq = ( # parameters for the archive archiveloc => $In{archive_device},