[! use strict; use Proxmox::Utils; use Proxmox::RuleDB; use Proxmox::HTMLTable; use Proxmox::HTMLDropDown; use Proxmox::Statistic; !] [- Execute ('date_selection.epl'); -]
[- my $stat = Proxmox::Statistic->new ($udat{statistic_from}, $udat{statistic_to}); my @cellwidth = ( '250px', '150','340px'); my @header_sum = ( '3', '200px', __('Detected Virus Mails')); my @header_bad = ( '3', '200px', __('Virus Charts') . ' (Top 10)'); my $table_sum = Proxmox::HTMLTable->new (\@cellwidth); my $table_bad = Proxmox::HTMLTable->new (\@cellwidth); $table_sum->add_headline (\@header_sum); $table_bad->add_headline (\@header_bad); my $rdb = Proxmox::RuleDB->new(); my $sres = $stat->total_mail_stat ($rdb); my $aref = $stat->total_virus_stat ($rdb); my $width = 200; $table_sum->add_row ('', __("Incoming Mails"), $sres->{count_in}, $stat->out_bar(0, $width)); $table_sum->add_row ('', sprintf (__("Virus Mails") . " (%.1f%)", $sres->{viruscount_in_per}), $sres->{viruscount_in}, $stat->out_bar(1, $sres->{viruscount_in_per}*$width/100)); $table_sum->add_row ('', __("Virus Outbreaks"), $sres->{viruscount_out}, "") if $sres->{viruscount_out}; my $c = 0; foreach my $ref (@$aref) { next if !$ref->{count}; last if $c == 10; $table_bad->add_row ('', $ref->{name}, $ref->{count}); $c++; } my $out = $table_sum->out_table(); $out .= "
" . $table_bad->out_table() if $c; print OUT $out; -]