Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (39 sloc) 1.943 kB
<% title _("Trends") %>
<% title_actions display_link_if_authorized(_("Add Trend Counter"), hash_for_new_trend_path) %>
<% if @trends.empty? -%>
<div class="alert alert-message alert-info">
<a class="close" href="#" data-dismiss="alert">&times;</a>
<p><strong><%= _("No Trend Counter Defined.") %></strong></p>
<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>
</div>
<% end %>
<% if @trends.any? and TrendCounter.unconfigured? %>
<div class="alert alert-message alert-info">
<a class="close" href="#" data-dismiss="alert">&times;</a>
<p><strong><%= _("No Trend Counter Found.") %></strong></p>
<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 %>
</p>
</div>
<% end %>
<table class="table table-bordered table-striped">
<tr>
<th class='span10'><%= _("Name") %></th>
<th class='span2'><%= _("Action") %></th>
</tr>
<% @trends.each do |trend| %>
<tr>
<td><%= link_to trend.type_name, 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), :confirm => _("Delete all the trend history for %s?") % trend.type_name)) %>
</td>
</tr>
<% end %>
</table>
<%= page_entries_info @trend, :model => "trends" %>
<%= will_paginate @trend %>
<% unless TrendCounter.unconfigured? %>
<%= _("Last updated %s ago") % (time_ago_in_words TrendCounter.order(:created_at).last.created_at) %>
<% end %>
Jump to Line
Something went wrong with that request. Please try again.