mirror of https://github.com/mikaku/Monitorix.git
added CSS theming support in 'emailreports.pm'
This commit is contained in:
parent
25b801d7dc
commit
50757dd088
|
@ -56,35 +56,34 @@ sub emailreports_send {
|
|||
|
||||
my $html = <<"EOF";
|
||||
<html>
|
||||
<body bgcolor='FFFFFF' vlink='#888888' link='#888888'>
|
||||
<table cellspacing='5' cellpadding='0' bgcolor='CCCCCC' border='1'>
|
||||
<head>
|
||||
<style>
|
||||
EOF
|
||||
|
||||
open(IN, "$config->{base_dir}/css/white.css");
|
||||
while(<IN>) { $html .= $_; }
|
||||
close(IN);
|
||||
|
||||
$html .= <<"EOF";
|
||||
</style>
|
||||
</head>
|
||||
<table class='cgi-header-table'>
|
||||
<tr>
|
||||
<td bgcolor='777777'>
|
||||
<font face='Verdana, sans-serif' color='CCCC00'>
|
||||
<font size='5'><b> Host: <b></font>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor='FFFFFF'>
|
||||
<font face='Verdana, sans-serif' color='000000'>
|
||||
<font size='5'><b> $hostname </b></font>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor='777777'>
|
||||
<font face='Verdana, sans-serif' color='CCCC00'>
|
||||
<font size='5'><b> $report <b></font>
|
||||
</font>
|
||||
</td>
|
||||
<th class='td-title'><b> Host: </b></th>
|
||||
<td class='td-title-host'>
|
||||
<b> $hostname </b>
|
||||
</td>
|
||||
<td class='td-title' ><b> $report </b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
EOF
|
||||
|
||||
my $html_footer = <<EOF;
|
||||
<p>
|
||||
<p class='text-copyright'>
|
||||
<a href='https://www.monitorix.org'><img src='cid:image_logo' border='0'></a>
|
||||
<br>
|
||||
<font face='Verdana, sans-serif' color='000000' size='-2'>
|
||||
Copyright © 2005-2022 Jordi Sanfeliu
|
||||
</font>
|
||||
Copyright © 2005-2022 Jordi Sanfeliu
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
@ -157,19 +156,18 @@ EOF
|
|||
# addendum data included in report
|
||||
if($emailreports->{$report}->{addendum_script}) {
|
||||
$html .= <<"EOF";
|
||||
<table cellspacing='5' cellpadding='0' width='100%' bgcolor='CCCCCC' border='1'>
|
||||
<tr>
|
||||
<td bgcolor='777777'>
|
||||
<font face='Verdana, sans-serif' color='CCCC00'>
|
||||
<b> Addendum data <b>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor='FFFFFF'>
|
||||
<table class='table-module' width='1'>
|
||||
<tr>
|
||||
<td class='td-title'><b> Addendum data </b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='td-addendum'>
|
||||
<pre>
|
||||
EOF
|
||||
|
||||
$html .= `$emailreports->{$report}->{addendum_script}`;
|
||||
$html .= "\n";
|
||||
$html .= " </pre>\n";
|
||||
$html .= " </td>\n";
|
||||
$html .= " </tr>\n";
|
||||
$html .= "</table>\n";
|
||||
|
|
Loading…
Reference in New Issue