NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

Changeset 485

Show
Ignore:
Timestamp:
02/21/12 13:58:14
Author:
haines
Message:

added ABORT message to previous surface report

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pyglider/trunk/pyglider/pyglider.py

    r470 r485  
    298298            # but want to append info to last known surface report 
    299299            html_report = [ 
    300                 '<div id="main">', 
    301300                '<h2></h2>', 
    302301                '<table">', 
    303302                '<thead>', 
    304                 '<tr><th>Glider: %s</th><th>%s</th></tr>' % (glider, dt_str,), 
     303                '<tr><th>Glider: %s</th><th>ABORT Surfacing</th></tr>' % (subject_glider,), 
    305304                '</thead>', 
    306305                '<tbody>']         
    307306            html_report.extend( 
    308                 ['<tr><td><b>Glider Location</b></td><td>--</td></tr>', 
    309                  '<tr><td>GPS Fix:</td><td>%s</td></tr>' % (gps_posn_str,), 
    310                  '<tr><td>Time of Fix:</td><td>%s</td></tr>' % (gps_dt_str,) 
     307                [ 
     308                 '<tr><td>Surface Event:</td><td class="red_td">%s</td></tr>' % (subject_event,), 
     309                 '<tr><td>Surface Reason:</td><td class="red_td">%s</td></tr>' % (subject_reason,), 
    311310                 ]) 
    312311            # close the report tbody table div and CDATA 
     
    314313                ['</tbody>', 
    315314                '</table>', 
    316                  '</div>', 
    317315                 ' ' 
    318316                 ]) 
    319317             
     318            html_report_str = data[-1]['description'] 
     319            html_report_str = html_report_str + '\n'.join(html_report) 
     320            print html_report_str 
     321            data[-1]['description'] = html_report_str 
    320322    # close for-loop of msg in gms: 
    321323    return data