From 0a70d268676d6effe2b1ceb5eeffcd1678d2821f Mon Sep 17 00:00:00 2001
From: Sebastian Harl
Date: Thu, 3 Jun 2010 16:32:43 +0200
Subject: [PATCH] patches: Added bts575029-collectd2html-xhtml.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
⦠adding support for XHTML to collectd2html.pl.
Thanks to Ivan Shmakov for reporting this and Max Henkel and Timur Kirilichev
for providing patches!
Closes: #575029
---
debian/changelog | 5 +-
debian/patches/00list | 1 +
.../bts575029-collectd2html-xhtml.dpatch | 114 ++++++++++++++++++
3 files changed, 119 insertions(+), 1 deletion(-)
create mode 100755 debian/patches/bts575029-collectd2html-xhtml.dpatch
diff --git a/debian/changelog b/debian/changelog
index 80a479b..3f7a037 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,12 +12,15 @@ collectd (4.10.0-1) unstable; urgency=low
* debian/patches:
- Removed bts566199_collection_hide_types -- applied upstream.
- Removed typo_fixes -- applied upstream.
+ - Added bts575029-collectd2html-xhtml, adding support for XHTML to
+ collectd2html.pl; thanks to Ivan Shmakov for reporting this and Max
+ Henkel and Timur Kirilichev for providing patches (Closes: #575029).
* debian/rules:
- Define (and pass to configure) $JAR.
- Added support for Renesas SH4 to the Java arch mapping; thanks to
Nobuhiro Iwamatsu for the patch (Closes: #564165).
- -- Sebastian Harl Thu, 03 Jun 2010 15:22:13 +0200
+ -- Sebastian Harl Thu, 03 Jun 2010 16:31:02 +0200
collectd (4.9.1-2) unstable; urgency=low
diff --git a/debian/patches/00list b/debian/patches/00list
index c3fbc66..2ba95f8 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -3,4 +3,5 @@ collection_conf_path.dpatch
bts561577_collectd2html_recursive_fix.dpatch
bts557599_powerdns_fix.dpatch
bts559801_plugin_find_fix.dpatch
+bts575029-collectd2html-xhtml.dpatch
diff --git a/debian/patches/bts575029-collectd2html-xhtml.dpatch b/debian/patches/bts575029-collectd2html-xhtml.dpatch
new file mode 100755
index 0000000..5481b88
--- /dev/null
+++ b/debian/patches/bts575029-collectd2html-xhtml.dpatch
@@ -0,0 +1,114 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bts575029-collectd2html-xhtml.dpatch by Max Henkel and
+## Timur Kirilichev
+##
+## DP: collectd2html.pl: Added support for XHTML.
+
+@DPATCH@
+
+diff a/contrib/collectd2html.pl b/contrib/collectd2html.pl
+--- a/contrib/collectd2html.pl
++++ b/contrib/collectd2html.pl
+@@ -68,7 +68,7 @@ $HOST = $tmp[0] if (! defined $HOST);
+ 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";
+
+ ################################################################################
+ #
+@@ -118,14 +118,20 @@ open(OUT, ">$HTML");
+ my $title="Rrd plot for $HOST";
+
+ print OUT <
+-
++
++
+
++
+ $title
++
+
+
+-
+ END
+
+ # list interesting rrd
+@@ -148,20 +154,20 @@ foreach my $rrd (@list){
+
+ # table of contents
+ print OUT <$title
+-
++
++
+ END
+
+ foreach my $bn (@rrds){
+ my $cleaned_bn = $bn;
+ $cleaned_bn =~ tr/%\//__/;
+ print OUT <$bn
++$bn
+ END
+ }
+
+ print OUT <
++
+ END
+
+ # graph interesting rrd
+@@ -206,7 +212,7 @@ for (my $i = 0; $i < scalar(@rrds); ++$i) {
+ my $cleaned_bn = $bn;
+ $cleaned_bn =~ tr/%\//__/;
+ print OUT <$bn
++
+ END
+
+ # graph various ranges
+@@ -223,24 +229,28 @@ END
+ my $cleaned_img = $img; $cleaned_img =~ s/%/%25/g;
+ if (! $svg_p) {
+ print OUT <
++
+ END
+ } else {
+ print OUT <
++
+ END
+ }
+ }
+
+ print OUT <[top]
++[top]
+ END
+ }
+
+ print OUT <
++
++
++
++
+
+
+ END
--
2.30.2