Skip to content

Instantly share code, notes, and snippets.

@chewmanfoo
Created December 3, 2010 15:00
Show Gist options
  • Save chewmanfoo/727064 to your computer and use it in GitHub Desktop.
Save chewmanfoo/727064 to your computer and use it in GitHub Desktop.
## ugly error:
NetworkHost Load (0.0ms) SELECT * FROM `network_hosts` WHERE (`network_hosts`.net_profile_id = 78)
ERROR: compiling _run_erb_app47views47network_hosts47_network_host46html46erb_locals_host_count_string_network_host_object RAISED compile error
/home/jason/Code/Ruby/impress/app/views/network_hosts/_network_host.html.erb:57: syntax error
end ; @output_buffer.concat "\n"
^
Function body: def _run_erb_app47views47network_hosts47_network_host46html46erb_locals_host_count_string_network_host_object(local_assigns)
old_output_buffer = output_buffer;object = local_assigns[:object];network_host = local_assigns[:network_host];host_count_string = local_assigns[:host_count_string];;@output_buffer = ''; __in_erb_template=true ; @output_buffer.concat " "; @output_buffer.concat(( render :partial => "common/admin_control_buttons", :locals => {:instance => network_host} ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " "; content_for :header ; @output_buffer.concat "\n"
@output_buffer.concat " <style>\n"
@output_buffer.concat " "; if network_host.server ; @output_buffer.concat "\n"
@output_buffer.concat " .dell-server { background-image: url("; @output_buffer.concat(( network_host.server.photo.url :small ).to_s); @output_buffer.concat "); }\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of if network_host.server -->\n"
@output_buffer.concat " </style>\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of content_for header -->\n"
@output_buffer.concat " <div class=\"host-number\">\n"
@output_buffer.concat " "; @output_buffer.concat(( host_count_string ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " </div>\n"
@output_buffer.concat " <div class=\"host\" id=\"\#{network_host.name}\">\n"
@output_buffer.concat " <div class=\"server_box\">\n"
@output_buffer.concat " <div class=\"dell-server\">\n"
@output_buffer.concat " <b>"; @output_buffer.concat(( network_host.name ).to_s); @output_buffer.concat "</b><sup>"; @output_buffer.concat(( network_host.id ).to_s); @output_buffer.concat "</sup>\n"
@output_buffer.concat " </div> \n"
@output_buffer.concat " "; if network_host.service_tag ; @output_buffer.concat "\n"
@output_buffer.concat " "; @output_buffer.concat(( dell_service_tag_link(network_host.service_tag, network_host.server.name) if network_host.server ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " "; else ; @output_buffer.concat "\n"
@output_buffer.concat " "; @output_buffer.concat(( network_host.server.name ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of if network_host.service_tag -->\n"
@output_buffer.concat " "; @output_buffer.concat((h network_host.os.name if network_host.os ).to_s); @output_buffer.concat " "; @output_buffer.concat((h network_host.os.version if network_host.os ).to_s); @output_buffer.concat "<br />\n"
@output_buffer.concat " <div class=\"location_box\">\n"
@output_buffer.concat " <b>Site:</b> "; @output_buffer.concat((h network_host.location.name if network_host.location ).to_s); @output_buffer.concat "<br />\n"
@output_buffer.concat " <b>Rack:</b> "; @output_buffer.concat((h network_host.rack ).to_s); @output_buffer.concat " <b>Space:</b> "; @output_buffer.concat((h network_host.space ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " </div><!--end of div location_box-->\n"
@output_buffer.concat " </div><!-- end of div server_box-->\n"
@output_buffer.concat " <div class=\"ip_box\">\n"
@output_buffer.concat " "; @output_buffer.concat(( render :partial => "network_host/ip_addresses", :locals => {:host => network_host} ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " <br />\n"
@output_buffer.concat " "; if admin? ; @output_buffer.concat "\n"
@output_buffer.concat " "; if @network ; @output_buffer.concat "\n"
@output_buffer.concat " "; @output_buffer.concat(( link_to "Add an IP.", new_ip_address_path(:new_network_host_id => network_host, :new_network_id => @network) ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " "; else ; @output_buffer.concat "\n"
@output_buffer.concat " "; @output_buffer.concat(( link_to "Add an IP.", new_ip_address_path(:new_network_host_id => network_host) ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of if @network -->\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of if admin? -->\n"
@output_buffer.concat " </div><!-- end of div ip_box -->\n"
@output_buffer.concat " <div class=\"services_box\"> \n"
@output_buffer.concat " "; if network_host.has_functions? ; @output_buffer.concat "\n"
@output_buffer.concat " "; @output_buffer.concat(( render :partial => "network_hosts/functions", :locals => {:network_host => network_host} ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " "; else ; @output_buffer.concat "\n"
@output_buffer.concat " <i>none</i>\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of if network_host.has_functions? -->\n"
@output_buffer.concat " "; if current_user_is_interop? ; @output_buffer.concat "\n"
@output_buffer.concat " <div class=\"nagios_box\">\n"
@output_buffer.concat " <b>Nagios Alerts</b><br />\n"
@output_buffer.concat " "; network = network.nil? ? " " : network ; @output_buffer.concat "\n"
@output_buffer.concat " "; @output_buffer.concat(( render :partial => "network_hosts/nagios_alerts", :locals => {:network_host => network_host, :network => network} ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " </div><!-- end of div nagios_box-->\n"
@output_buffer.concat " "; end ; @output_buffer.concat " <!-- end of if current_user_is_interop? -->\n"
@output_buffer.concat " </div><!-- end of div services_box--> \n"
@output_buffer.concat " <div class=\"notes_box\">\n"
@output_buffer.concat " "; @output_buffer.concat((h network_host.description ).to_s); @output_buffer.concat "\n"
@output_buffer.concat " </div><!-- end of div notes_box-->\n"
@output_buffer.concat " </div><!-- end of div host-->\n"
end ; @output_buffer.concat "\n"
end ; @output_buffer.concat "\n"
@output_buffer
ensure
self.output_buffer = old_output_buffer
end
Backtrace: /home/jason/Code/Ruby/impress/app/views/network_hosts/_network_host.html.erb:57:in `compile!'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:61:in `compile'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:28:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable_partial.rb:20:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:26:in `benchmark'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:26:in `benchmark'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable_partial.rb:19:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/template.rb:194:in `render_template'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable_partial.rb:44:in `render_partial'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/partials.rb:184:in `render_partial'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:262:in `render'
/home/jason/Code/Ruby/impress/app/views/complete_configuration/_hardware.html.erb:6:in `_run_erb_app47views47complete_configuration47_hardware46html46erb_locals_carrier_hardware_hosts_object'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_collection.rb:364:in `method_missing'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `each'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `send'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_collection.rb:364:in `method_missing'
/home/jason/Code/Ruby/impress/app/views/complete_configuration/_hardware.html.erb:4:in `_run_erb_app47views47complete_configuration47_hardware46html46erb_locals_carrier_hardware_hosts_object'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:34:in `send'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:34:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:301:in `with_template'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:30:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable_partial.rb:20:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:26:in `benchmark'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:26:in `benchmark'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable_partial.rb:19:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/template.rb:194:in `render_template'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable_partial.rb:44:in `render_partial'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/partials.rb:184:in `render_partial'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:262:in `render'
/home/jason/Code/Ruby/impress/app/views/complete_configuration/index.html.erb:6:in `_run_erb_app47views47complete_configuration47index46html46erb'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:34:in `send'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:34:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:301:in `with_template'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/renderable.rb:30:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/template.rb:194:in `render_template'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:260:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:343:in `_render_with_layout'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:257:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1241:in `render_for_file'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:937:in `render_without_benchmark'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:51:in `render'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:51:in `render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1317:in `default_render'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1323:in `perform_action_without_filters'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:617:in `call_filters'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/flash.rb:141:in `perform_action'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:523:in `send'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:523:in `process_without_filters'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:606:in `process'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:391:in `process'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:386:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route_set.rb:433:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:88:in `dispatch'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:111:in `_call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:82:in `initialize'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:29:in `call'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:29:in `call'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:9:in `cache'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:28:in `call'
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib64/ruby/gems/1.8/gems/warden-0.10.7/lib/warden/manager.rb:35:in `call'
/usr/lib64/ruby/gems/1.8/gems/warden-0.10.7/lib/warden/manager.rb:34:in `catch'
/usr/lib64/ruby/gems/1.8/gems/warden-0.10.7/lib/warden/manager.rb:34:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params_parser.rb:15:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:93:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/reloader.rb:9:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsafe.rb:11:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:106:in `call'
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/static.rb:31:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/log_tailer.rb:17:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in `process'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:34:in `run'
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
ActionView::TemplateError (compile error
/home/jason/Code/Ruby/impress/app/views/network_hosts/_network_host.html.erb:57: syntax error
end ; @output_buffer.concat "\n"
^) on line #57 of app/views/network_hosts/_network_host.html.erb:
54: <%=h network_host.description %>
55: </div><!-- end of div notes_box-->
56: </div><!-- end of div host-->
57: <% end %>
58: <% end %>
app/views/network_hosts/_network_host.html.erb:57:in `compile!'
app/views/complete_configuration/_hardware.html.erb:6
app/views/complete_configuration/_hardware.html.erb:4
app/views/complete_configuration/index.html.erb:6
warden (0.10.7) lib/warden/manager.rb:35:in `call'
warden (0.10.7) lib/warden/manager.rb:34:in `catch'
warden (0.10.7) lib/warden/manager.rb:34:in `call'
Rendering /home/jason/Code/Ruby/impress/public/500.html (500 Internal Server Error)
## code:
<%= 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