Skip to content

Commit

Permalink
Added a test to prevent errors on Watches that don't monitor a CPU ti…
Browse files Browse the repository at this point in the history
…me or Memory usage
  • Loading branch information
Mathieu Ravaux authored and Mathieu Ravaux committed Aug 20, 2009
1 parent 83c7d3b commit ea32857
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/prophet/index.html.haml
Expand Up @@ -11,8 +11,8 @@
%tr{:id => svc, :class => 'service'}
%td= svc
%td= @watches[svc].group.nil? ? "--" : @watches[svc].group
%td= "%.2f%%" % @watches[svc].cpu_usage
%td= @watches[svc].memory_usage.to_s + "kb"
%td= (@watches[svc].respond_to? "cpu_usage")? ("%.2f%%" % @watches[svc].cpu_usage) : "N/A"
%td= (@watches[svc].respond_to? "memory_usage")? (@watches[svc].memory_usage.to_s + "kb") : "N/A"
%td= @watches[svc].state

%div{:id => "controls", :class => "jqmWindow", :style => "display: none;"}
Expand Down

0 comments on commit ea32857

Please sign in to comment.