lib/perus/server/views/index.erb in perus-0.1.29 vs lib/perus/server/views/index.erb in perus-0.1.30
- old
+ new
@@ -11,10 +11,10 @@
<% if alert.active_alerts.empty? %>
<p>All systems functioning normally</p>
<% else %>
<ul class="alerts">
<% alert.active_alerts.each do |active_alert| %>
- <% if alert.system %>
+ <% if active_alert.system %>
<li class="<%= alert.severity %>"><a href="<%= url_prefix %>systems/<%= active_alert.system.id %>"><%= active_alert.system.name %> (<%= active_alert.active_for %>)</a></li>
<% else %>
<li class="<%= alert.severity %>">Alert for deleted system: <%= active_alert.system_id %> (<%= active_alert.active_for %>)</li>
<% end %>
<% end %>