Changeset 254
- Timestamp:
- 09/01/08 13:51:55 (4 months ago)
- Files:
-
- nethorus/app/helpers/application_helper.rb (modified) (1 diff)
- nethorus/app/views/search/index.html.erb (modified) (6 diffs)
- nethorus/test/unit/application_helper_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nethorus/app/helpers/application_helper.rb
r234 r254 172 172 173 173 174 # Output information and links about a specified device175 176 def device_information_box(device)177 178 render :partial => "common/device_information_box", :locals => { :device => device }179 180 end181 182 183 174 # Output a value or "Unavailable" if it is nil 184 175 nethorus/app/views/search/index.html.erb
r178 r254 31 31 <% for device in @devices %> 32 32 <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 33 <td><%= device_information_box(device)%></td>33 <td><%= render :partial => "common/device_information_box", :locals => { :device => device } %></td> 34 34 <td>Device</td> 35 35 <td>Matched hostname</td> … … 40 40 <% for l2_interface in @l2_interfaces_long %> 41 41 <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 42 <td><%= device_information_box(l2_interface.device)%></td>42 <td><%= render :partial => "common/device_information_box", :locals => { :device => l2_interface.device } %></td> 43 43 <td>Interface <strong><%= link_to l2_interface.ifdescr_short, :controller => 'manage', :action => 'interface', :device_id => l2_interface.device.id, :interface_id => l2_interface.id %></strong></td> 44 44 <td>Description is <strong><%=h l2_interface.ifdescr_long %></strong></td> … … 49 49 <% for l2_interface in @l2_interfaces_short %> 50 50 <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 51 <td><%= device_information_box(l2_interface.device)%></td>51 <td><%= render :partial => "common/device_information_box", :locals => { :device => l2_interface.device } %></td> 52 52 <td>Interface <strong><%= link_to l2_interface.ifdescr_short, :controller => 'manage', :action => 'interface', :device_id => l2_interface.device.id, :interface_id => l2_interface.id %></strong></td> 53 53 <td>Matched on interface name</td> … … 58 58 <% for l3_interface in @l3_interfaces_exact %> 59 59 <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 60 <td><%= device_information_box(l3_interface.l2_interface.device)%></td>60 <td><%= render :partial => "common/device_information_box", :locals => { :device => l3_interface.l2_interface.device } %></td> 61 61 <td>Interface <strong><%=h l3_interface.l2_interface.ifdescr_short %></strong></td> 62 62 <td>Exact match on IPv4 address</td> … … 66 66 <% for l2_interface in @l2_interfaces_address %> 67 67 <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 68 <td><%= device_information_box(l2_interface.device)%></td>68 <td><%= render :partial => "common/device_information_box", :locals => { :device => l2_interface.device } %></td> 69 69 <td>Interface <strong><%=h l2_interface.ifdescr_short %></strong></td> 70 70 <td>Exact match on Layer 2 address</td> … … 74 74 <% for element in @element_serial %> 75 75 <tr class="<%= cycle('even_row', 'odd_row', :name => 'row_class') %>"> 76 <td><%= device_information_box(element.device)%></td>76 <td><%= render :partial => "common/device_information_box", :locals => { :device => element.device } %></td> 77 77 <td>Element <strong><%=h element.phys_description %> (a <%=h element.phys_class %>)</strong></td> 78 78 <td>Exact match on serial number</td> nethorus/test/unit/application_helper_test.rb
r234 r254 44 44 45 45 46 # Test the device_information_box function47 48 def test_device_information_box49 50 # TODO: Write tests for device_information_box51 52 end53 54 55 46 # Test the ipv4_network_name function 56 47
