"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/BackupPC/CGI/Queue.pm" between
BackupPC-4.3.2.tar.gz and BackupPC-4.4.0.tar.gz

About: BackupPC is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server’s disk (http/cgi user interface).

Queue.pm  (BackupPC-4.3.2):Queue.pm  (BackupPC-4.4.0)
skipping to change at line 30 skipping to change at line 30
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
#======================================================================== #========================================================================
# #
# Version 4.3.2, released 17 Feb 2020. # Version 4.4.0, released 20 Jun 2020.
# #
# See http://backuppc.sourceforge.net. # See http://backuppc.sourceforge.net.
# #
#======================================================================== #========================================================================
package BackupPC::CGI::Queue; package BackupPC::CGI::Queue;
use strict; use strict;
use BackupPC::CGI::Lib qw(:all); use BackupPC::CGI::Lib qw(:all);
skipping to change at line 52 skipping to change at line 52
{ {
my $req = shift(@_); my $req = shift(@_);
if ( $req->{restore} ) { if ( $req->{restore} ) {
return "restore"; return "restore";
} elsif ( $req->{delete} ) { } elsif ( $req->{delete} ) {
return "delete (#$req->{num})"; return "delete (#$req->{num})";
} elsif ( $req->{archive} ) { } elsif ( $req->{archive} ) {
return "archive"; return "archive";
} else { } else {
return "backup ($req->{backupType})" if ( $req->{backupType} ); return "backup ($req->{backupType})" if ( $req->{backupType} );
return "backup"; return "backup";
} }
} }
sub action sub action
{ {
my($strBg, $strUser, $strCmd); my($strBg, $strUser, $strCmd);
GetStatusInfo("queues"); GetStatusInfo("queues");
my $Privileged = CheckPermission(); my $Privileged = CheckPermission();
if ( !$Privileged ) { if ( !$Privileged ) {
ErrorExit($Lang->{Only_privileged_users_can_view_queues_}); ErrorExit($Lang->{Only_privileged_users_can_view_queues_});
} }
while ( @BgQueue ) { while ( @BgQueue ) {
my $req = pop(@BgQueue); my $req = pop(@BgQueue);
my($reqTime) = timeStamp2($req->{reqTime}); my($reqTime) = timeStamp2($req->{reqTime});
my $type = GetReqType($req); my $type = GetReqType($req);
$strBg .= <<EOF; $strBg .= <<EOF;
<tr><td> ${HostLink($req->{host})} </td> <tr><td> ${HostLink($req->{host})} </td>
<td align="center"> $type </td> <td align="center"> $type </td>
<td align="center" data-date_format="$Conf{CgiDateFormatMMDD}"> $reqTime </t d> <td align="center" data-date_format="$Conf{CgiDateFormatMMDD}"> $reqTime </t d>
<td align="center"> $req->{user} </td></tr> <td align="center"> $req->{user} </td></tr>
EOF EOF
} }
while ( @UserQueue ) { while ( @UserQueue ) {
my $req = pop(@UserQueue); my $req = pop(@UserQueue);
my $type = GetReqType($req); my $type = GetReqType($req);
my $reqTime = timeStamp2($req->{reqTime}); my $reqTime = timeStamp2($req->{reqTime});
$strUser .= <<EOF; $strUser .= <<EOF;
<tr><td> ${HostLink($req->{host})} </td> <tr><td> ${HostLink($req->{host})} </td>
<td align="center"> $type </td> <td align="center"> $type </td>
<td align="center" data-date_format="$Conf{CgiDateFormatMMDD}"> $reqTime </t d> <td align="center" data-date_format="$Conf{CgiDateFormatMMDD}"> $reqTime </t d>
<td align="center"> $req->{user} </td></tr> <td align="center"> $req->{user} </td></tr>
EOF EOF
} }
while ( @CmdQueue ) { while ( @CmdQueue ) {
my $req = pop(@CmdQueue); my $req = pop(@CmdQueue);
my $reqTime = timeStamp2($req->{reqTime}); my $reqTime = timeStamp2($req->{reqTime});
my $type = GetReqType($req); my $type = GetReqType($req);
(my $cmd = $bpc->execCmd2ShellCmd(@{$req->{cmd}})) =~ s/$BinDir\///; (my $cmd = $bpc->execCmd2ShellCmd(@{$req->{cmd}})) =~ s/$BinDir\///;
$strCmd .= <<EOF; $strCmd .= <<EOF;
<tr><td> ${HostLink($req->{host})} </td> <tr><td> ${HostLink($req->{host})} </td>
<td align="center"> $type </td> <td align="center"> $type </td>
<td align="center" data-date_format="$Conf{CgiDateFormatMMDD}"> $reqTime </t d> <td align="center" data-date_format="$Conf{CgiDateFormatMMDD}"> $reqTime </t d>
<td align="center"> $req->{user} </td> <td align="center"> $req->{user} </td>
<td> $cmd </td></tr> <td> $cmd </td></tr>
EOF EOF
} }
my $content = eval ( "qq{$Lang->{Backup_Queue_Summary}}"); my $content = eval("qq{$Lang->{Backup_Queue_Summary}}");
Header($Lang->{BackupPC__Queue_Summary}, $content); Header($Lang->{BackupPC__Queue_Summary}, $content);
Trailer(); Trailer();
} }
1; 1;
 End of changes. 9 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)