aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-05-22 18:18:02 +0000
committerRob Austein <sra@hactrn.net>2012-05-22 18:18:02 +0000
commita0a29a80ccf5921fb749947fb232ba7c44d3761b (patch)
treeae0b02418ed148678862be995437bc4340f2e831
parent52dba1656e85250d9058fc86b6390f301f96eb83 (diff)
Get link filenames right. Wrap SVG in HTML so navigation bar is still
available. svn path=/trunk/; revision=4506
-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):