Sha256: 1a48e33be2e1e9e27f2e7387362dd0642501d88d55aef102b5c2f594405142ef

Contents?: true

Size: 2 KB

Versions: 8

Compression:

Stored size: 2 KB

Contents

<% scope = ForemanVirtWhoConfigure::Config.for_organization(Organization.current) %>
<% scope = scope.authorized(:view_virt_who_config) %>
<% out_of_date = scope.out_of_date.order('out_of_date_at DESC') %>

<h4 class="header"><%= _('Virt-who Configurations Status') %></h4>
<table class="table table-striped ellipsis">
  <thead>
  <tr>
    <th><%= _("Configuration Status") %></th>
    <th><%= _("Count") %></th>
  </tr>
  </thead>
  <tbody>
  <tr>
    <td><%= link_to _("No Reports"), foreman_virt_who_configure_configs_path(:search => "status = unknown") %></td>
    <td><%= scope.where(:last_report_at => nil).count %></td>
  </tr>
  <tr>
    <td><%= link_to _("No Change"), foreman_virt_who_configure_configs_path(:search => "status = out_of_date") %></td>
    <td><%= out_of_date.count %></td>
  </tr>
  <tr>
    <td><%= link_to _("OK"), foreman_virt_who_configure_configs_path(:search => "status = ok") %></td>
    <td><%= scope.where.not(:last_report_at => nil).count - out_of_date.count %></td>
  </tr>
  <tr>
    <td><%= link_to _("Total Configurations"), foreman_virt_who_configure_configs_path %></td>
    <td><%= scope.count %></td>
  </tr>
  </tbody>
</table>

<h4 class="header" style="margin-top: 12px;"><%= _('Latest Configurations Without Change') %></h4>
  <% if out_of_date.empty? %>
    <div class="ca"><%= _("No configuration found") %></div>
  <% else %>
    <table class="table table-striped ellipsis">
      <thead>
        <tr>
          <th><%= s_("Config|Name") %></th>
          <th><%= s_("Config|Last Report") %></th>
          <th><%= s_("Config|Interval") %></th>
        </tr>
      </thead>
      <tbody>
        <% out_of_date.limit(3).each do |config| %>
          <tr>
            <td><%= config_report_status_icon(config) %><%= link_to config.name, foreman_virt_who_configure_config_path(config) %></td>
            <td><%= l(config.last_report_at, :format => :long) %></td>
            <td><%= config.humanized_interval %></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  <% end %>



Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_virt_who_configure-0.1.9 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.8 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.7 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.6 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.5 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.4 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.3 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb
foreman_virt_who_configure-0.1.2 app/views/dashboard/_foreman_virt_who_configs_status_widget.html.erb