Skip to content

Instantly share code, notes, and snippets.

@chewmanfoo
Created December 3, 2010 15:07
Show Gist options
  • Save chewmanfoo/727072 to your computer and use it in GitHub Desktop.
Save chewmanfoo/727072 to your computer and use it in GitHub Desktop.
<%= render :partial => "common/admin_control_buttons", :locals => {:instance => network_host} %>
<% content_for :header %>
<style>
<% if network_host.server %>
.dell-server { background-image: url(<%= network_host.server.photo.url :small %>); }
<% end %> <!-- end of if network_host.server -->
</style>
<% end %> <!-- end of content_for header -->
<div class="host-number">
<%= host_count_string %>
</div>
<div class="host" id="#{network_host.name}">
<div class="server_box">
<div class="dell-server">
<b><%= network_host.name %></b><sup><%= network_host.id %></sup>
</div>
<% if network_host.service_tag %>
<%= dell_service_tag_link(network_host.service_tag, network_host.server.name) if network_host.server %>
<% else %>
<%= network_host.server.name %>
<% end %> <!-- end of if network_host.service_tag -->
<%=h network_host.os.name if network_host.os %> <%=h network_host.os.version if network_host.os %><br />
<div class="location_box">
<b>Site:</b> <%=h network_host.location.name if network_host.location %><br />
<b>Rack:</b> <%=h network_host.rack %> <b>Space:</b> <%=h network_host.space %>
</div><!--end of div location_box-->
</div><!-- end of div server_box-->
<div class="ip_box">
<%= render :partial => "network_host/ip_addresses", :locals => {:host => network_host} %>
<br />
<% if admin? %>
<% if @network %>
<%= link_to "Add an IP.", new_ip_address_path(:new_network_host_id => network_host, :new_network_id => @network) %>
<% else %>
<%= link_to "Add an IP.", new_ip_address_path(:new_network_host_id => network_host) %>
<% end %> <!-- end of if @network -->
<% end %> <!-- end of if admin? -->
</div><!-- end of div ip_box -->
<div class="services_box">
<% if network_host.has_functions? %>
<%= render :partial => "network_hosts/functions", :locals => {:network_host => network_host} %>
<% else %>
<i>none</i>
<% end %> <!-- end of if network_host.has_functions? -->
<% if current_user_is_interop? %>
<div class="nagios_box">
<b>Nagios Alerts</b><br />
<% network = network.nil? ? " " : network %>
<%= render :partial => "network_hosts/nagios_alerts", :locals => {:network_host => network_host, :network => network} %>
</div><!-- end of div nagios_box-->
<% end %> <!-- end of if current_user_is_interop? -->
</div><!-- end of div services_box-->
<div class="notes_box">
<%=h network_host.description %>
</div><!-- end of div notes_box-->
</div><!-- end of div host-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment