Changeset 175

Show
Ignore:
Timestamp:
07/23/08 14:27:59 (4 months ago)
Author:
pwh
Message:

Display the STP root port against bridge information on a device.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nethorus/app/models/l2_interface.rb

    r168 r175  
    7676 
    7777  belongs_to :device 
    78   belongs_to :stp_port 
     78  has_one :stp_port 
    7979 
    8080  acts_as_tree :order => "ifdescr_long" 
  • nethorus/app/models/stp_port.rb

    r148 r175  
    2929 
    3030  belongs_to :bridge 
    31   has_one :l2_interface 
     31  belongs_to :l2_interface 
    3232 
    3333  def before_validation 
  • nethorus/app/views/ieee8021d_bridge/_bridge_parameters.html.erb

    r173 r175  
    2828  </tr> 
    2929  <tr> 
    30    <th>Root port</th><td><%=h @device.bridge.dot1d_stp_root_port %></td> 
     30   <th>Root port</th><td><%=h @device.bridge.dot1d_stp_root_port %> (<%= @device.bridge.stp_ports.find(:first, :conditions => { :dot1d_base_port => @device.bridge.dot1d_stp_root_port }).l2_interface.ifdescr_short %>)</td> 
    3131  </tr> 
    3232  <tr>