Sha256: e4f6849b3951f4b731cbeb7ed5927e0e7ffaab1d66af06224a2f17c6ccd1924e

Contents?: true

Size: 1.27 KB

Versions: 1

Compression:

Stored size: 1.27 KB

Contents

<h1>System Overview</h1>
<% if @alerts.empty? %>
    <p>No alerts</p>
<% else %>
    <% @alerts.each do |alert| %>
        <div class="alert">
            <h1><%= alert.name %></h1>
            <% unless alert.execute_errors.nil? || alert.execute_errors.empty? %>
                <p>An error occurred running this alert: <%= alert.execute_errors.gsub('<', '&lt;').gsub('>', '&gt;') %></p>
            <% else %>
                <% 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 %>
                                <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 %>
                    </ul>
                <% end %>
            <% end %>
        </div>
    <% end %> 
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
perus-0.1.29 lib/perus/server/views/index.erb