foreman/app/views/trends/index.html.erb @ bf4a13d3
f46e39c4 | Bryan Kearney | <% title _("Trends") %>
|
|
fe4629de | rbirnie | ||
f46e39c4 | Bryan Kearney | <% title_actions display_link_if_authorized(_("Add Trend Counter"), hash_for_new_trend_path) %>
|
|
4d4557e9 | Joseph Magen | <% if @trends.empty? %>
|
|
fe4629de | rbirnie | <div class="alert alert-message alert-info">
|
|
<a class="close" href="#" data-dismiss="alert">×</a>
|
|||
9a280163 | Dominic Cleal | <p><strong><%= _("No trend counter defined.") %></strong></p>
|
|
fe4629de | rbirnie | ||
f46e39c4 | Bryan Kearney | <p><%= _("To define trend counters, use the Add Trend Counter button.") %><br>
|
|
<%= _("To start collecting trend data, set a cron job to execute 'rake trends:counter' every Puppet Interval (%s minutes).") % Setting.puppet_interval %></p>
|
|||
fe4629de | rbirnie | </div>
|
|
<% end %>
|
|||
<% if @trends.any? and TrendCounter.unconfigured? %>
|
|||
<div class="alert alert-message alert-info">
|
|||
<a class="close" href="#" data-dismiss="alert">×</a>
|
|||
9a280163 | Dominic Cleal | <p><strong><%= _("No trend counter found.") %></strong></p>
|
|
fe4629de | rbirnie | ||
f46e39c4 | Bryan Kearney | <p><%= ( _("To start collecting trend data, set a cron job to execute <span class='black'>RAILS_ENV=production bundle exec rake trends:counter</span> every Puppet Interval (%s minutes)") % Setting.puppet_interval).html_safe %>
|
|
fe4629de | rbirnie | </p>
|
|
</div>
|
|||
<% end %>
|
|||
<table class="table table-bordered table-striped">
|
|||
<tr>
|
|||
bf4a13d3 | Walden Raines | <th class='col-md-10'><%= _("Name") %></th>
|
|
<th class='col-md-2'><%= _("Action") %></th>
|
|||
fe4629de | rbirnie | </tr>
|
|
<% @trends.each do |trend| %>
|
|||
<tr>
|
|||
ad4ab250 | Ohad Levy | <td><%= link_to trend.to_label, trend_path(:id => trend), :title => _("Show Trends") %></td>
|
|
fe4629de | rbirnie | <td>
|
|
<%= action_buttons(
|
|||
f46e39c4 | Bryan Kearney | display_link_if_authorized(_("Edit"), hash_for_edit_trend_path(:id => trend)),
|
|
display_delete_if_authorized(hash_for_trend_path(:id => trend), :confirm => _("Delete all the trend history for %s?") % trend.type_name)) %>
|
|||
fe4629de | rbirnie | </td>
|
|
</tr>
|
|||
<% end %>
|
|||
</table>
|
|||
4c268e83 | Joseph Mitchell Magen | <%= page_entries_info @trends %>
|
|
<%= will_paginate @trends %>
|
|||
fe4629de | rbirnie | <% unless TrendCounter.unconfigured? %>
|
|
f46e39c4 | Bryan Kearney | <%= _("Last updated %s ago") % (time_ago_in_words TrendCounter.order(:created_at).last.created_at) %>
|
|
<% end %>
|