Project

General

Profile

« Previous | Next » 

Revision 2295ea88

Added by Ohad Levy about 14 years ago

  • ID 2295ea8815e3cddc0f2af7985da4d9bc253589ac

added titles to hosts show page actions

View differences:

app/views/hosts/show.html.erb
<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 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">
config/routes.rb
map.resources :hosts,
:member => {:report => :get, :reports => :get, :facts => :get,
:environment_selected => :post, :architecture_selected => :post, :os_selected => :post,
:storeconfig_klasses => :get},
:storeconfig_klasses => :get, :externalNodes => :get, :setBuild => :get, :puppetrun => :get},
:collection => { :show_search => :get}
map.dashboard '/dashboard', :controller => 'dashboard'
map.audit '/audit', :controller => 'audit'
public/stylesheets/style.css
/* host show page */
#title, td.last_row { font-weight: bold; }
#host_actions {
float: right;
font-size: 70%;
}
#host_overview {
float:right;
width:30%

Also available in: Unified diff