Project

General

Profile

Download (1.55 KB) Statistics
| Branch: | Tag: | Revision:
<div id="title"><%= @host.to_label %>
<%= link_to "Edit", edit_host_path(@host) %>
<%= link_to "Reports", reports_host_path(@host) %>
<%= link_to "YAML", :action=>"externalNodes", :id => @host %>
<%= link_to_if @host.build == false, "Build", {:action=>"setBuild", :id => @host} %>
<%= link_to_if SETTINGS[:puppetrun], "Run Puppet", {:action=>"puppetrun", :id => @host} %>
<%= link_to_if @host.resources.count > 0, "All Puppet Classes", storeconfig_klasses_host_path(@host) %>
<%= link_to "Delete", host_path(@host), :confirm => 'Are you sure?', :method => :delete%>
</div>

<div id="host_overview">
<%= render :partial => "hosts/overview", :locals => {:host => @host} %>
<% if @report_summary.size == 0 -%>
<p>No puppet activity for this host in the last <%= time_ago_in_words(@range.days.ago) %></p>
<% else -%>
<%= render :partial => "hosts/metrics", :locals => {:report_summary => @report_summary[@host.name][:metrics]} %>
<% end -%>
</div>

<div id="host_report">
<div id="runtime_graph" style='width: 800px; height: 240px;'></div>
<%= @runtime_graph.render('runtime_graph') %>

<div id="resource_graph"></div>
<%= @resource_graph.render('resource_graph') %>

<% if @host.reports.size > 0 -%>
<%= form_tag @host, :method => :get %>
<p><%= select(nil, 'range', 1..days_ago(@host.reports.first.reported_at), {:selected => @range} )%>
<%= submit_tag "filter", :disable_with => "Updating..." %>
<%= @host.reports.recent(@range.days.ago).count %> reports in the last <%= time_ago_in_words(@range.days.ago) %></p>
<% end -%>
</div>
(16-16/17)