Sha256: 7dcb6cedf4f06a67a5ec937591328900fd5f363c0a9cb5f22921942adbdfbccf

Contents?: true

Size: 1.86 KB

Versions: 4

Compression:

Stored size: 1.86 KB

Contents

<%= javascript 'charts' %>
<% title _("Trends") %>
<% title_actions new_link(_("Add Trend Counter")),
                 documentation_button('4.1.3Trends') %>
<% if @trends.empty? %>
  <%= alert :class => 'alert-info', :header => _("No trend counter defined"),
            :text => (_("To define trend counters, use the Add Trend Counter button.</br> To start collecting trend data, set a cron job to execute 'foreman-rake foreman_statistics:trends:counter' at least every %s minutes.") % Setting[:outofsync_interval]).html_safe %>
<% end %>

<% if @trends.any? and ForemanStatistics::TrendCounter.unconfigured? %>
  <%= alert :class => 'alert-info', :header => _("No trend counter found"),
            :text => (_("To start collecting trend data, set a cron job to execute <span class='black'>foreman-rake foreman_statistics:trends:counter</span> at least every %s minutes.") % Setting[:outofsync_interval]).html_safe %>
<% end %>

<table class="<%= table_css_classes 'table-fixed' %>">
  <thead>
    <tr>
      <th class='col-md-10'><%= _("Name") %></th>
      <th class='col-md-2'><%= _("Action") %></th>
    </tr>
  </thead>
  <tbody>
    <% @trends.each do |trend| %>
      <tr>
        <td class="ellipsis"><%= link_to trend.to_label, trend_path(:id => trend), :title => _("Show Trends") %></td>
        <td>
          <%= action_buttons(
                  display_link_if_authorized(_("Edit"), hash_for_edit_trend_path(:id => trend)),
                  display_delete_if_authorized(hash_for_trend_path(:id => trend), :data => { :confirm => _("Delete all the trend history for %s?") % trend.type_name })) %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
<%= will_paginate_with_info @trends %>
<% unless ForemanStatistics::TrendCounter.unconfigured? %>
  <%= _("Last update:") %>
  <%= date_time_relative(ForemanStatistics::TrendCounter.order(:created_at).last.created_at) %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_statistics-0.1.3 app/views/foreman_statistics/trends/index.html.erb
foreman_statistics-0.1.2 app/views/foreman_statistics/trends/index.html.erb
foreman_statistics-0.1.1 app/views/foreman_statistics/trends/index.html.erb
foreman_statistics-0.1.0 app/views/foreman_statistics/trends/index.html.erb