]> git.zerfleddert.de Git - upsgraph/blobdiff - upsgraph.pl
Add linebreaks to HTML output
[upsgraph] / upsgraph.pl
index 010d11445a9af2766dc1a5c2d9e67387798c13b5..0d19fb6cd0fae054eae8e579af8819044d408d24 100755 (executable)
@@ -443,7 +443,7 @@ while(1) {
                        print HTML "<a href=\"${hostname}.${var}.html\"><img src=\"${hostname}.${var}.png\" width=\"${width}\" height=\"${height}\" border=\"0\"></a><br>\n";
 
                        open (HTML2, ">${outdir}/${hostname}.${var}.html.new");
-                       print HTML2 '<html><head><meta http-equiv="refresh" content="60"/><meta http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma" content="no-cache"/><meta http_equiv="expires" content="Sat, 26 Jul 1997 05:00:00 GMT"/><title>' . $vars->{$var}->{'name'} . '</title></head>';
+                       print HTML2 '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="refresh" content="60"/><meta http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma" content="no-cache"/><meta http_equiv="expires" content="Sat, 26 Jul 1997 05:00:00 GMT"/><title>' . $vars->{$var}->{'name'} . '</title></head>';
                        print HTML2 '<body bgcolor="#ffffff">';
 
                        push @graphdef, "VDEF:min=${var},MINIMUM";
@@ -473,7 +473,7 @@ while(1) {
                                }
                        }
 
-                       print HTML2 "<img src=\"${hostname}.${var}.long.png\" width=\"${width}\" height=\"${height}\"><br>";
+                       print HTML2 "<img src=\"${hostname}.${var}.long.png\" width=\"${width}\" height=\"${height}\"><br>\n";
 
                        $mtime=(stat("${outdir}/${hostname}.${var}.week.png.work"))[9];
                        ($averages, $width, $height) =
@@ -490,7 +490,7 @@ while(1) {
                                }
                        }
 
-                       print HTML2 "<img src=\"${hostname}.${var}.week.png\" width=\"${width}\" height=\"${height}\"><br>";
+                       print HTML2 "<img src=\"${hostname}.${var}.week.png\" width=\"${width}\" height=\"${height}\"><br>\n";
 
                        $mtime=(stat("${outdir}/${hostname}.${var}.year.png.work"))[9];
                        ($averages, $width, $height) =
@@ -507,7 +507,7 @@ while(1) {
                                }
                        }
 
-                       print HTML2 "<img src=\"${hostname}.${var}.year.png\" width=\"${width}\" height=\"${height}\"><br>";
+                       print HTML2 "<img src=\"${hostname}.${var}.year.png\" width=\"${width}\" height=\"${height}\"><br>\n";
 
                        print HTML2 "</body></html>\n";
                        close(HTML2);
Impressum, Datenschutz