Changeset 179
- Timestamp:
- 07/26/08 16:53:37 (4 months ago)
- Files:
-
- nethorus/app/controllers/manage_controller.rb (modified) (2 diffs)
- nethorus/app/views/common/_ds1_interface.html.erb (modified) (3 diffs)
- nethorus/app/views/common/_interface_detail.html.erb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nethorus/app/controllers/manage_controller.rb
r177 r179 237 237 @ds1_loopback_config['dsx1DualLoop'] = "Local and remote loops set" 238 238 239 240 # Retrieve the dsx1CurrentTable for this interface 241 242 ds1_current_table_oids = [ ['dsx1CurrentESs', @interface.ifindex], ['dsx1CurrentSESs', @interface.ifindex], ['dsx1CurrentSEFSs', @interface.ifindex], ['dsx1CurrentUASs', @interface.ifindex], ['dsx1CurrentCSSs', @interface.ifindex], ['dsx1CurrentPCVs', @interface.ifindex], ['dsx1CurrentLESs', @interface.ifindex], ['dsx1CurrentBESs', @interface.ifindex], ['dsx1CurrentDMs', @interface.ifindex], ['dsx1CurrentLCVs', @interface.ifindex] ] 243 ds1_total_table_oids = [ ['dsx1TotalESs', @interface.ifindex], ['dsx1TotalSESs', @interface.ifindex], ['dsx1TotalSEFSs', @interface.ifindex], ['dsx1TotalUASs', @interface.ifindex], ['dsx1TotalCSSs', @interface.ifindex], ['dsx1TotalPCVs', @interface.ifindex], ['dsx1TotalLESs', @interface.ifindex], ['dsx1TotalBESs', @interface.ifindex], ['dsx1TotalDMs', @interface.ifindex], ['dsx1TotalLCVs', @interface.ifindex] ] 244 245 246 # Gather the current interval statistics table 247 248 begin 249 @ds1_current_table = @device.get_oid(ds1_current_table_oids, :format => :yes) 250 rescue Device::SNMPProxyConnectFailure 251 end 252 253 254 # Gather the last 24 hours statistics table 255 256 begin 257 @ds1_total_table = @device.get_oid(ds1_total_table_oids, :format => :yes) 258 rescue Device::SNMPProxyConnectFailure 259 end 260 261 262 # Render the gathered data 263 239 264 @interface_specific_partial = "ds1_interface" 240 265 … … 1077 1102 stp_port_record = device.bridge.stp_ports.find(:first, :conditions => { :dot1d_base_port => stp_port_key }) 1078 1103 1079 stp_port_settings = stp_ports[stp_port_key] 1080 1081 stp_port_record.dot1d_stp_port_priority = stp_port_settings['dot1dStpPortPriority'] 1082 stp_port_record.dot1d_stp_port_state = stp_port_settings['dot1dStpPortState'] 1083 stp_port_record.dot1d_stp_port_enable = stp_port_settings['dot1dStpPortEnable'] 1084 stp_port_record.dot1d_stp_port_path_cost = stp_port_settings['dot1dStpPortPathCost'] 1085 stp_port_record.dot1d_stp_port_designated_root = purify_mac_address(stp_port_settings['dot1dStpPortDesignatedRoot']) 1086 stp_port_record.dot1d_stp_port_designated_cost = stp_port_settings['dot1dStpPortDesignatedCost'] 1087 stp_port_record.dot1d_stp_port_designated_bridge = purify_mac_address(stp_port_settings['dot1dStpPortDesignatedBridge']) 1088 stp_port_record.dot1d_stp_port_designated_port = purify_mac_address(stp_port_settings['dot1dStpPortDesignatedPort']) 1089 stp_port_record.dot1d_stp_port_forward_transitions = stp_port_settings['dot1dStpPortForwardTransitions'] 1090 1091 stp_port_record.save 1104 unless stp_port_record.nil? 1105 1106 stp_port_settings = stp_ports[stp_port_key] 1107 1108 stp_port_record.dot1d_stp_port_priority = stp_port_settings['dot1dStpPortPriority'] 1109 stp_port_record.dot1d_stp_port_state = stp_port_settings['dot1dStpPortState'] 1110 stp_port_record.dot1d_stp_port_enable = stp_port_settings['dot1dStpPortEnable'] 1111 stp_port_record.dot1d_stp_port_path_cost = stp_port_settings['dot1dStpPortPathCost'] 1112 stp_port_record.dot1d_stp_port_designated_root = purify_mac_address(stp_port_settings['dot1dStpPortDesignatedRoot']) 1113 stp_port_record.dot1d_stp_port_designated_cost = stp_port_settings['dot1dStpPortDesignatedCost'] 1114 stp_port_record.dot1d_stp_port_designated_bridge = purify_mac_address(stp_port_settings['dot1dStpPortDesignatedBridge']) 1115 stp_port_record.dot1d_stp_port_designated_port = purify_mac_address(stp_port_settings['dot1dStpPortDesignatedPort']) 1116 stp_port_record.dot1d_stp_port_forward_transitions = stp_port_settings['dot1dStpPortForwardTransitions'] 1117 1118 stp_port_record.save 1119 1120 end 1092 1121 1093 1122 end nethorus/app/views/common/_ds1_interface.html.erb
r177 r179 1 1 <h2>DS1/E1 Interface Detail</h2> 2 3 <table class="horiz"> 4 <tr> 5 <th>Circuit Identifier</th> 6 <td><%=h variable_or_unavailable(@ds1_interface['dsx1CircuitIdentifier']) %></td> 7 </tr> 8 <tr> 9 <th>Line type/coding</th> 10 <td><%=h @ds1_interface['dsx1LineType'] %> using <%=h @ds1_interface['dsx1LineCoding'] %> encoding</td> 11 </tr> 12 <tr> 13 <th>Signalling</th> 14 <td><%=h @ds1_signal_mode[@ds1_interface['dsx1SignalMode']] %></td> 15 </tr> 16 <tr> 17 <th>TX Clock</th> 18 <td><%=h @ds1_transmit_clock_source[@ds1_interface['dsx1TransmitClockSource']] %></td> 19 </tr> 20 </table> 21 22 <h2>Loopback</h2> 2 23 3 24 <table class="horiz"> … … 27 48 </tr> 28 49 <tr> 29 <th>Line type/coding</th>30 <td><%=h @ds1_interface['dsx1LineType'] %> using <%=h @ds1_interface['dsx1LineCoding'] %> encoding</td>31 </tr>32 <tr>33 50 <th>Sending code</th> 34 51 <td><%=h @ds1_send_code[@ds1_interface['dsx1SendCode']] %></td> 35 52 </tr> 36 <tr> 37 <th>Signalling</th> 38 <td><%=h @ds1_signal_mode[@ds1_interface['dsx1SignalMode']] %></td> 39 </tr> 40 <tr> 41 <th>TX Clock</th> 42 <td><%=h @ds1_transmit_clock_source[@ds1_interface['dsx1TransmitClockSource']] %></td> 43 </tr> 44 <tr> 45 <th>Circuit Identifier</th> 46 <td><%=h variable_or_unavailable(@ds1_interface['dsx1CircuitIdentifier']) %></td> 47 </tr> 53 </table> 54 55 <h2>Alarms</h2> 56 57 <table class="horiz"> 48 58 <tr> 49 59 <th>Alarms</th> … … 61 71 </tr> 62 72 </table> 73 74 <h2>Errors</h2> 75 76 <table class="vert"> 77 <tr> 78 <th>Period</th> 79 <th><abbr title="Errored Seconds">ES</abbr></th> 80 <th><abbr title="Severely Errored Seconds">SES</abbr></th> 81 <th><abbr title="Severely Errored Framing Seconds">SEFS</abbr></th> 82 <th><abbr title="Unavailable Seconds">UAS</abbr></th> 83 <th><abbr title="Controlled Slip Seconds">CSS</abbr></th> 84 <th><abbr title="Path Coding Violations">PCV</abbr></th> 85 <th><abbr title="Line Errored Seconds">LES</abbr></th> 86 <th><abbr title="Bursty Errored Seconds">BES</abbr></th> 87 <th><abbr title="Degraded Minutes">DM</abbr></th> 88 <th><abbr title="Line Code Violations">LCV</abbr></th> 89 </tr> 90 <tr> 91 <td>Current</td> 92 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentESs') %></td> 93 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentSESs') %></td> 94 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentSEFSs') %></td> 95 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentUASs') %></td> 96 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentCSSs') %></td> 97 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentPCVs') %></td> 98 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentLESs') %></td> 99 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentBESs') %></td> 100 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentDMs') %></td> 101 <td><%=h value_or_unavailable(@ds1_current_table, 'dsx1CurrentLCVs') %></td> 102 </tr> 103 <tr> 104 <td>Last 24h</td> 105 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalSESs') %></td> 106 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalSEFSs') %></td> 107 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalUASs') %></td> 108 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalCSSs') %></td> 109 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalPCVs') %></td> 110 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalLESs') %></td> 111 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalBESs') %></td> 112 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalDMs') %></td> 113 <td><%=h value_or_unavailable(@ds1_total_table, 'dsx1TotalLCVs') %></td> 114 </tr> 115 </table> nethorus/app/views/common/_interface_detail.html.erb
r136 r179 23 23 </tr> 24 24 <tr> 25 <th>This interface</th>26 <td><%=h @interface.ifdescr_short %></td>27 </tr>28 <tr>29 25 <th>Children</th> 30 26 <td>
