Project

General

Profile

Download (1.42 KB) Statistics
| Branch: | Tag: | Revision:
<% title "Fact Values" %>

<table class="list">
<tr>
<% unless params[:host_id] -%>
<th><%= sort :host %></th>
<% end %>
<th><%= sort :name %></th>
<th><%= sort :value %></th>
<th>Reported at</th>
</tr>
<% for fact_value in @fact_values %>
<tr class="<%= cycle("even", "odd") -%>">
<% unless params[:host_id] -%>
<td>
<% if fact_value.host -%>
<%= link_to(fact_value.host, host_facts_path(:host_id => fact_value.host), :title => "Show host facts") %>
<% else -%>
N/A
<% end %>
</td>
<% end %>
<td>
<%= link_to_function image_tag("pie_chart_icon.png", :alt => "Show distribution chart"),
"get_pie_chart('fact_chart-#{fact_value.fact_name_id}', '#{fact_path(fact_value.fact_name_id)}')" %>
<%= link_to h(fact_value.fact_name.name),
fact_values_path("search" => "name = #{fact_value.name}"),
:title => "Show all #{fact_value.name} fact values" %>
</td>
<td>
<%= link_to h(truncate fact_value.value, :length => 40),
fact_values_path("search" => "facts.#{fact_value.name} = \"#{fact_value.value}\""),
:title => "Show all #{fact_value.name} facts where they are equal to #{fact_value.value}" %>
</td>
<td><%= fact_from fact_value %></td>
</tr>
<% end %>
</table>
<%= page_entries_info @fact_values %>
<%= will_paginate @fact_values %>
(1-1/2)