Sha256: 62e8d7391e97ac45bd9b45a2cd8da63b1b84cd58ad14537889a78c862e6bd392

Contents?: true

Size: 1.9 KB

Versions: 5

Compression:

Stored size: 1.9 KB

Contents

<% 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 %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/views/trends/index.html.erb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/views/trends/index.html.erb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/views/trends/index.html.erb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/views/trends/index.html.erb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/views/trends/index.html.erb