Show quota_graph.html syntax highlighted
% # vim:set syntax=mason:
<%args>
$free => 0
$used => 0
$inbox => 0
$folders => 0
$other => 0
$web => 0
</%args>
<%init>
eval {
$r->content_type("image/gif");
my $graph = new GD::Graph::pie(300, 300);
$graph->set( title => "Disk Usage",
dclrs => ["#6495ED","#40E0D0","#FF6347","#FF8C00","#44ff44"]);
my @data = (
[ "Inbox", "Mail Folders", "Web Site", "Other", "Free" ],
[ $inbox, $folders, $web, $other, $free ]
);
$graph->set_label_font(GD::gdMediumBoldFont);
my $plot = $graph->plot(\@data);
$m->print($plot->gif());
};
if($@) {
$logger->error("unable to generate graph: $@");
}
</%init>
<%once>
use Carp;
use Net::SSH::Perl;
use GD;
use GD::Graph;
use GD::Graph::pie;
our $logger = Log::Log4perl->get_logger('alphamail');
</%once>
See more files for this project here