Changeset 177
- Timestamp:
- 07/25/08 20:29:23 (4 months ago)
- Files:
-
- nethorus/app/controllers/manage_controller.rb (modified) (4 diffs)
- nethorus/app/views/common/_ds1_interface.html.erb (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nethorus/app/controllers/manage_controller.rb
r176 r177 164 164 end 165 165 166 167 # Translate the dsx1SignalMode in to human-readable descriptions 168 169 @ds1_signal_mode = Hash.new 170 @ds1_signal_mode['none'] = "No signalling" 171 @ds1_signal_mode['robbedBit'] = "Robbed Bit Signalling (RBS)" 172 @ds1_signal_mode['bitOriented'] = "Channel Associated Signalling (CAS)" 173 @ds1_signal_mode['messageOriented'] = "Common Channel Signalling (CCS)" 174 175 176 # Translate the dsx1SendCode in to human-readable descriptions 166 177 167 178 @ds1_send_code = Hash.new 168 @ds1_send_code['dsx1SendNoCode'] = "Normal /looped data"179 @ds1_send_code['dsx1SendNoCode'] = "Normal" 169 180 @ds1_send_code['dsx1SendLineCode'] = "Requesting line loopback" 170 181 @ds1_send_code['dsx1SendPayloadCode'] = "Requesting payload loopback" … … 174 185 @ds1_send_code['dsx1Send3in24Pattern'] = "Sending 3-in-24-bits-set test pattern" 175 186 @ds1_send_code['dsx1SendOtherTestPattern'] = "Sending other test pattern" 187 188 189 # Translate the dsx1TransmitClockSource in to individual states 190 191 @ds1_transmit_clock_source = Hash.new 192 @ds1_transmit_clock_source['loopTiming'] = "Line clock" 193 @ds1_transmit_clock_source['localTiming'] = "Local clock" 194 @ds1_transmit_clock_source['throughTiming'] = "Line clock from another circuit" 195 196 197 # Translate the dsx1LoopbackStatus in to individual states 198 199 @ds1_loopback_status = Array.new 200 @ds1_loopback_status.push "Near-end payload loopback" if (@ds1_interface['dsx1LoopbackStatus'] & 2 == 2) 201 @ds1_loopback_status.push "Near-end line loopback" if (@ds1_interface['dsx1LoopbackStatus'] & 4 == 4) 202 @ds1_loopback_status.push "Near-end other loopback" if (@ds1_interface['dsx1LoopbackStatus'] & 8 == 8) 203 @ds1_loopback_status.push "Near-end inward loopback" if (@ds1_interface['dsx1LoopbackStatus'] & 16 == 16) 204 @ds1_loopback_status.push "Far-end payload loopback" if (@ds1_interface['dsx1LoopbackStatus'] & 32 == 32) 205 @ds1_loopback_status.push "Far-end line loopback" if (@ds1_interface['dsx1LoopbackStatus'] & 64 == 64) 176 206 177 207 … … 179 209 180 210 @ds1_line_status = Array.new 181 @ds1_line_status.push "No alarm present" if (@ds1_interface['dsx1LineStatus'] & 1 == 1)182 211 @ds1_line_status.push "Yellow Alarm: Far end Loss of Framing (LOF)" if (@ds1_interface['dsx1LineStatus'] & 2 == 2) 183 212 @ds1_line_status.push "Near end sending Loss of Framing (LOF)" if (@ds1_interface['dsx1LineStatus'] & 4 == 4) … … 198 227 199 228 229 # Translate the dsx1LoopbackConfig value in to individual states 200 230 201 231 @ds1_loopback_config = Hash.new nethorus/app/views/common/_ds1_interface.html.erb
r176 r177 3 3 <table class="horiz"> 4 4 <tr> 5 <th>Loopback status</th>5 <th>Loopback configuration</th> 6 6 <% if @ds1_interface['dsx1LoopbackConfig'] != "dsx1NoLoop" %> 7 7 <td style="background: red; color: white;"> … … 10 10 <% end %> 11 11 <%=h @ds1_loopback_config[@ds1_interface['dsx1LoopbackConfig']] %> 12 </td> 13 </tr> 14 <tr> 15 <th>Loopback status</th> 16 <td> 17 <% if @ds1_loopback_status.blank? %> 18 No loopback set 19 <% else %> 20 <ul> 21 <% @ds1_loopback_status.each do |loopback_status| %> 22 <li><%=h loopback_status %></li> 23 <% end %> 24 </ul> 25 <% end %> 12 26 </td> 13 27 </tr> … … 21 35 </tr> 22 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> 23 45 <th>Circuit Identifier</th> 24 46 <td><%=h variable_or_unavailable(@ds1_interface['dsx1CircuitIdentifier']) %></td> … … 27 49 <th>Alarms</th> 28 50 <td> 51 <% if !@ds1_line_status.blank? %> 29 52 <ul> 30 53 <% @ds1_line_status.each do |line_status| %> … … 32 55 <% end %> 33 56 </ul> 57 <% else %> 58 No alarms. 59 <% end %> 34 60 </td> 35 61 </tr>
