Changeset 242

Show
Ignore:
Timestamp:
08/31/08 22:39:18 (4 months ago)
Author:
pwh
Message:
  • inventory_management_controller.rb: Whitespace cleanup.
  • views/manage/interface.html.erb: Delete, since the code has been moved
    elsewhere.
  • views/common/_all_devices.html.erb: Display the IP address when
    displaying all devices.
  • views/common/_all_interfaces.html.erb: Updated link_to links to
    reflect the new manage_interface controller, and ensure an L2Interface is
    passed to format_l3_interfaces, not the interfaces themselves.
  • views/common/_device_information_box.html.erb: Don't display the IP
    address of a device, and link to the new manage_device controller.
  • views/common/_device_search.html.erb: Simplify the search filtering.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nethorus/app/controllers/inventory_management_controller.rb

    r196 r242  
    2929 
    3030  # Display a list of inventories that may be gathered 
    31    
     31 
    3232  def index 
    33    
     33 
    3434    @subtitle = "Inventory Management" 
    3535 
  • nethorus/app/views/common/_all_devices.html.erb

    r135 r242  
    22 <tr> 
    33  <th>Hostname</th> 
     4  <th>IP Address</th> 
    45  <th>Site</th> 
    56  <th>Description</th> 
     
    1516  </td> 
    1617  <td> 
     18   <%= device.ipv4_address %> 
     19  </td> 
     20  <td> 
    1721   <%=h format_site(device.site) %> 
    1822  </td> 
  • nethorus/app/views/common/_all_interfaces.html.erb

    r144 r242  
    2222   <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 
    2323    <td> 
    24      <%= link_to l2_interface.ifdescr_short, :controller => "manage", :action => "interface", :device_id => @device.id, :interface_id => l2_interface.id %> 
     24     <%= link_to l2_interface.ifdescr_short, :controller => "manage_interface", :action => "interface", :device_id => @device.id, :interface_id => l2_interface.id %> 
    2525    </td> 
    2626 
     
    4545 
    4646   <td><tt><%=h format_l2_interface(l2_interface.address) %></tt></td> 
    47    <td><tt><%=h format_l3_interface(l2_interface.l3_interfaces) %></tt></td> 
     47   <td><tt><%=h format_l3_interfaces(l2_interface) %></tt></td> 
    4848    <td><%= number_to_human_size(l2_interface.ifspeed) %></td> 
    4949    <td><%= l2_interface.ifmtu %></td> 
  • nethorus/app/views/common/_device_information_box.html.erb

    r190 r242  
    11<% unless device.nil? %> 
    2  <% unless device.device_type.nil? %><%= image_tag("device_types/medium/" + device.device_type + ".png", :class => "device_icon" ) %><% end %> 
    3  <%= link_to device.hostname, { :controller => 'manage', :action => 'device', :id => device.id } %><br /><%=h device.ipv4_address %> 
     2 <%= link_to device.hostname, { :controller => 'manage_device', :action => 'index', :id => device.id } %> 
    43<% end %> 
  • nethorus/app/views/common/_device_search.html.erb

    r211 r242  
    66  <td> 
    77   <form method="post"> 
    8     <p>Only devices in <select name="site_id"> 
    9      <option value="0">all sites</option> 
    10     <% @sites.each do |site| %> 
    11      <% if params[:site_id].to_i == site.id %> 
    12      <option value="<%= site.id %>" selected><%=h site.description %></option> 
    13      <% else %> 
    14      <option value="<%= site.id %>"><%=h site.description %></option> 
    15      <% end %> 
    16     <% end %> 
    17     </select>.  
     8    <p>Only devices in <%= select('search_for', 'site_id', @sites.collect { |site| [ site.description, site.id ] } ) %></p> 
    189    <input type="submit" value="Go" /> 
    1910    </p>