aboutsummaryrefslogtreecommitdiff
path: root/rcynic/rcynic-html.py
diff options
context:
space:
mode:
Diffstat (limited to 'rcynic/rcynic-html.py')
-rw-r--r--rcynic/rcynic-html.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/rcynic/rcynic-html.py b/rcynic/rcynic-html.py
index 0531c8c1..97f88d08 100644
--- a/rcynic/rcynic-html.py
+++ b/rcynic/rcynic-html.py
@@ -309,14 +309,19 @@ class Host(object):
cmds.extend(self.field_defs(filebase))
cmds.extend(self.graph_cmds)
self.rrd_run(cmds)
- img = Element("img", src = "%s_%s.png" % (filebase, period),
+ img = Element("img", src = "%s_%s.png" % (self.hostname, period),
width = str(opt["png-width"]),
height = str(opt["png-height"]))
if self.graph is None:
self.graph = copy.copy(img)
html.BodyElement("h2").text = "%s over last %s" % (self.hostname, period)
- html.BodyElement("a", href = "%s_%s.svg" % (filebase, period)).append(img)
+ html.BodyElement("a", href = "%s_%s_svg.html" % (self.hostname, period)).append(img)
html.BodyElement("br")
+ svg_html = HTML("%s over last %s" % (self.hostname, period),
+ "%s_%s_svg" % (self.hostname, period))
+ svg_html.body.append(ElementTree(file = "%s_%s.svg" % (filebase, period)).getroot())
+ svg_html.close()
+
class Session(object):