All pastes #812840 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-12 01:28 UTC
rendered paste body
Index: graph.php
===================================================================
--- graph.php   (revision 905)
+++ graph.php   (working copy)
@@ -331,7 +331,7 @@
 # Generate the rrdtool graph command.
 #
 $fudge += $height;
-$command = RRDTOOL . " graph - --start $start --end $end ".
+$command = RRDTOOL . " graph - --font DEFAULT:11:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf -a SVG --start $start --end $end ".
    "--width $width --height $fudge $upper_limit $lower_limit ".
    "--title '$title' $vertical_label $extras $background ".
    $series;
@@ -351,7 +351,8 @@
      print "$command\n\n\n\n\n";
     }
    else {
-     header ("Content-type: image/gif");
+#     header ("Content-type: image/gif");
+     header ("Content-type: image/svg+xml");
      passthru($command);
     }
  }
Index: templates/default/cluster_view.tpl
===================================================================
--- templates/default/cluster_view.tpl  (revision 905)
+++ templates/default/cluster_view.tpl  (working copy)
@@ -20,8 +20,8 @@
 </TD>

 <TD ROWSPAN=2 ALIGN="CENTER" VALIGN=top>
-<IMG ALT="{cluster} LOAD"
-   SRC="./graph.php?g=load_report&amp;z=medium&amp;{graph_args}">
+<embed ALT="{cluster} LOAD"
+   SRC="./graph.php?g=load_report&amp;z=medium&amp;{graph_args}" type="image/svg+xml" height="200" width="397">
 <IMG ALT="{cluster} CPU"
    SRC="./graph.php?g=cpu_report&amp;z=medium&amp;{graph_args}">
 <IMG ALT="{cluster} MEM"