Project

General

Profile

Download (1.99 KB) Statistics
| Branch: | Tag: | Revision:
<div id="title">
<%= @host.to_label %>
<span id="host_actions">
<%= link_to "Edit", edit_host_path(@host), :title => "Edit your host" %> |
<%= link_to "Facts", facts_host_path(@host), :title => "Browse host facts" %> |
<%= link_to "Reports", reports_host_path(@host), :title => "Browse host reports" %> |
<%= link_to "YAML", externalNodes_host_path(@host), :title => "Puppet external nodes YAML dump" %> |
<%= link_to_if @host.build == false, "Build", setBuild_host_path(@host), :title => "prepare this host for build" %> |
<span title="trigger a puppetrun on a node; requires that Puppet run is enabled">
<%= link_to_if SETTINGS[:puppetrun], "Run Puppet", puppetrun_host_path(@host) %>
</span> |
<span title="Show all host puppet classes, requires storeconfigs">
<%= link_to_if @host.resources.count > 0, "All Puppet Classes", storeconfig_klasses_host_path(@host) %>
</span> |
<%= link_to "Delete", host_path(@host), :confirm => 'Are you sure?', :method => :delete%>
</span>
</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)