Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Dont sent report for empty dashboards

  • Loading branch information...
commit 2a8db0a34d60ffe005dbb168a194400d765fe822 1 parent a117309
@quirkey quirkey authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/dashboard.rb
View
1  lib/dashboard.rb
@@ -92,6 +92,7 @@ def self.send_report(slug)
dashboard = find(slug, true)
if dashboard
graphs = snapshot_graphs(slug)
+ return false if graphs.empty?
timestamp = Time.now.strftime "%a %b %d %I:%M%p"
haml = Haml::Engine.new(File.read(File.join(File.dirname(__FILE__), '..', 'views', 'report.haml')))
html = haml.render(Object.new, :dashboard => dashboard, :time => timestamp, :graphs => graphs)
Please sign in to comment.
Something went wrong with that request. Please try again.