Project

General

Profile

« Previous | Next » 

Revision 33d9f9ee

Added by Lukas Zapletal over 8 years ago

Fixes #12718 - smart proxy log table

This patch adds a table with logs fetched from Smart Proxy /logs new API. It
returns latest N log entries from a simple memory buffer. The table supports
filtering by level, custom filtering and it introduces several overview
status cards with error/warning counts, failed modules list with latest
known error messages.

View differences:

app/views/puppetca/_counts.html.erb
<div class="col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status card-pf-with-action">
<h2 class="card-pf-title">
<a href="#certificates" onclick="$('.puppetca-filters').val('').trigger('change')">
<a href="#certificates" onclick="$('#puppetca-filter').val('').trigger('change')">
<%= icon_text('lock', '', :kind => 'fa') %><span class="card-pf-aggregate-status-count"><%= @certificates.length.to_s %></span> <%= _("Certificates") %>
</a>
</h2>
......
<p class="card-pf-aggregate-status-notifications">
<% PuppetcaHelper::STATES.each do |state|%>
<span class="card-pf-aggregate-status-notification">
<a href="#certificates" title="<%= _(state) %>" onclick="$('.puppetca-filters').val('<%= _(state) %>').trigger('change')"><span class="<%= PuppetcaHelper::CA_ICONS[state] %>"></span><%= @certificates.count{|c| c.state == state}.to_s %></a>
<a href="#certificates" title="<%= _(state) %>" onclick="$('#puppetca-filter').val('<%= _(state) %>').trigger('change')"><span class="<%= PuppetcaHelper::CA_ICONS[state] %>"></span><%= @certificates.count{|c| c.state == state}.to_s %></a>
</span>
<% end %>
</p>

Also available in: Unified diff