<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -22,4 +22,15 @@ class DashboardController &lt; ApplicationController
     end
   end
 
+  def api
+    begin
+      @dashboard_settings = Setting.get_dashboard_settings
+      @new_messages = Logentry.get_new_messages @dashboard_settings[&quot;timespan&quot;], build_conditions_from_blacklist
+      json = { &quot;status&quot; =&gt; &quot;success&quot;, &quot;messages&quot; =&gt; @new_messages, &quot;last_message&quot; =&gt; Logentry.last.Message, &quot;timespan&quot; =&gt; @dashboard_settings[&quot;timespan&quot;] }
+    rescue
+      json = { &quot;status&quot; =&gt; &quot;error&quot; }
+    end
+      render :text =&gt; json.to_json
+  end
+
 end</diff>
      <filename>app/controllers/dashboard_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>29f3acc0d021e0fa0305f567f06fa05e3a56bcb0</id>
    </parent>
  </parents>
  <author>
    <name>Lennart Koopmann</name>
    <email>lennart@linux.jimdo.office</email>
  </author>
  <url>http://github.com/lennartkoopmann/Graylog/commit/bd658040c75ca4144d21069b201eb5f2afef6d07</url>
  <id>bd658040c75ca4144d21069b201eb5f2afef6d07</id>
  <committed-date>2009-10-28T05:48:21-07:00</committed-date>
  <authored-date>2009-10-28T05:48:21-07:00</authored-date>
  <message>The dashboard now has an API</message>
  <tree>255ac24cf88f596116bdaa27f7eb5595d6eeeecf</tree>
  <committer>
    <name>Lennart Koopmann</name>
    <email>lennart@linux.jimdo.office</email>
  </committer>
</commit>
