summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7062b2)
raw | patch | inline | side by side (parent: a7062b2)
author | Timur Kirilichev <dontstay@pochta.ru> | |
Fri, 7 May 2010 02:31:26 +0000 (06:31 +0400) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 3 Jun 2010 14:25:54 +0000 (16:25 +0200) |
Signed-off-by: Sebastian Harl <sh@tokkee.org>
contrib/collectd2html.pl | patch | blob | history |
index 22c43e594d8f4294327604f198d30db58f220fcb..fe4e2bdb02663cf7777cf24553b443baf543faac 100644 (file)
--- a/contrib/collectd2html.pl
+++ b/contrib/collectd2html.pl
my $svg_p = ($IMG_FMT eq "SVG");
my $IMG_SFX = $svg_p ? ".svg" : ".png";
my $IMG_DIR = "${HOST}.dir";
-my $HTML = "${HOST}.html";
+my $HTML = "${HOST}.xhtml";
################################################################################
#
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="screen">
-body { text-align: center; }
+.graph { text-align: center; }
+object.graph { width: 670; height: 179; }
</style>
<title>$title</title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta http-equiv="Content-Type"
+ content="application/xhtml+xml; charset=us-ascii" />
</head>
<body>
END
my $cleaned_bn = $bn;
$cleaned_bn =~ tr/%\//__/;
print OUT <<END;
-<h1><a id="$cleaned_bn">$bn</a></h1>
+<h2><a id="$cleaned_bn">$bn</a></h2>
END
# graph various ranges
my $cleaned_img = $img; $cleaned_img =~ s/%/%25/g;
if (! $svg_p) {
print OUT <<END;
-<p><img src="$cleaned_img" alt="${bn} $span" /></p>
+<p class="graph"><img src="$cleaned_img" alt="${bn} $span" /></p>
END
} else {
print OUT <<END;
-<p><object data="$cleaned_img" type="image/svg+xml"
- width="670" height="179">
+<p class="graph"><object data="$cleaned_img" type="image/svg+xml">
${bn} $span</object></p>
END
}
}
print OUT <<END;
+<hr />
+<p>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml10"
+ alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
+</p>
</body>
</html>
END