<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/colored-pngs/.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -84,7 +84,11 @@ class ServicesController &lt; ApplicationController
                &quot;ARROW&quot; =&gt; &quot;#BDBDBD&quot; }
     @graph.update_image yesterday, Time.now.to_i, lines, title, width, height, colors, options
 
-    render :text =&gt; &quot;&lt;img src=\&quot;/images/colored-graphs/service-#{@service.id}.png?#{rand(9001)}\&quot; alt=\&quot;Graph\&quot; /&gt;&quot;
+    # Read the graph.
+    graph_file = File.new @graph.get_path_of_png, &quot;r&quot;
+
+    # Return the inlined image HTML code to avoid AJAX madness.
+    render :text =&gt; &quot;&lt;img src=\&quot;data:image/png;base64,#{Base64.encode64(graph_file.read)}\&quot; alt=\&quot;Graph\&quot;&gt;&quot;
   end
 
   def show_ms</diff>
      <filename>app/controllers/services_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,7 @@ module Colored
 			# Constructor.
 			def initialize rrd_name
 				@@rrd_name = rrd_name
+        @@rrd_name = &quot;&quot; if rrd_name.include? &quot;../&quot;
 			end
 
 			# Returns the timestamp of the last update of the RRD.
@@ -104,7 +105,7 @@ module Colored
 
 			# Get the full path to the PNG file of a graph.
 			def get_path_of_png
-				img_dir = File.dirname(__FILE__) + &quot;/../../../../../public/images/colored-graphs/&quot;
+				img_dir = File.dirname(__FILE__) + &quot;/../../../../../db/colored-pngs/&quot;
 				
 				# Check if the graph directory exists.
 				return false if !File.directory? img_dir</diff>
      <filename>vendor/plugins/colored/lib/colored/core_ext.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>public/images/colored-graphs/.gitignore</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>d46f0d36affef21d99f06a65795fbade6797606f</id>
    </parent>
  </parents>
  <author>
    <name>Lennart</name>
    <email>lennart@sundaysister.(none)</email>
  </author>
  <url>http://github.com/lennartkoopmann/scopeport-web-interface/commit/564d8d62b60b8a0006375e143d5f76bc98e4ded7</url>
  <id>564d8d62b60b8a0006375e143d5f76bc98e4ded7</id>
  <committed-date>2009-04-14T08:15:46-07:00</committed-date>
  <authored-date>2009-04-14T08:15:46-07:00</authored-date>
  <message>Graphs are no longer accessible from the outside</message>
  <tree>9144a5937e727a3652bbf2c26e9104fb8fbeb52a</tree>
  <committer>
    <name>Lennart</name>
    <email>lennart@sundaysister.(none)</email>
  </committer>
</commit>
