Changeset 177

Show
Ignore:
Timestamp:
07/25/08 20:29:23 (4 months ago)
Author:
pwh
Message:

Added further DS1/E1 detail

Files:

Legend:

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

    r176 r177  
    164164      end 
    165165 
     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 
    166177 
    167178      @ds1_send_code = Hash.new 
    168       @ds1_send_code['dsx1SendNoCode'] = "Normal/looped data
     179      @ds1_send_code['dsx1SendNoCode'] = "Normal
    169180      @ds1_send_code['dsx1SendLineCode'] = "Requesting line loopback" 
    170181      @ds1_send_code['dsx1SendPayloadCode'] = "Requesting payload loopback" 
     
    174185      @ds1_send_code['dsx1Send3in24Pattern'] = "Sending 3-in-24-bits-set test pattern" 
    175186      @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)       
    176206       
    177207       
     
    179209       
    180210      @ds1_line_status = Array.new 
    181       @ds1_line_status.push "No alarm present" if (@ds1_interface['dsx1LineStatus'] & 1 == 1) 
    182211      @ds1_line_status.push "Yellow Alarm: Far end Loss of Framing (LOF)" if (@ds1_interface['dsx1LineStatus'] & 2 == 2) 
    183212      @ds1_line_status.push "Near end sending Loss of Framing (LOF)" if (@ds1_interface['dsx1LineStatus'] & 4 == 4) 
     
    198227       
    199228 
     229      # Translate the dsx1LoopbackConfig value in to individual states 
    200230 
    201231      @ds1_loopback_config = Hash.new 
  • nethorus/app/views/common/_ds1_interface.html.erb

    r176 r177  
    33<table class="horiz"> 
    44 <tr> 
    5   <th>Loopback status</th> 
     5  <th>Loopback configuration</th> 
    66  <% if @ds1_interface['dsx1LoopbackConfig'] != "dsx1NoLoop" %> 
    77  <td style="background: red; color: white;"> 
     
    1010  <% end %> 
    1111   <%=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 %> 
    1226  </td> 
    1327 </tr> 
     
    2135 </tr> 
    2236 <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> 
    2345  <th>Circuit Identifier</th> 
    2446  <td><%=h variable_or_unavailable(@ds1_interface['dsx1CircuitIdentifier']) %></td> 
     
    2749  <th>Alarms</th> 
    2850  <td> 
     51   <% if !@ds1_line_status.blank? %> 
    2952   <ul> 
    3053    <% @ds1_line_status.each do |line_status| %> 
     
    3255    <% end %> 
    3356   </ul> 
     57   <% else %> 
     58   No alarms. 
     59   <% end %> 
    3460  </td> 
    3561 </tr>