IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17892


Ignore:
Timestamp:
Jun 3, 2008, 9:36:40 AM (18 years ago)
Author:
bills
Message:

Various changes to the prototype web interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/web/request.php

    r16977 r17892  
    1313
    1414$COMMAND_DIR = "/export/data0/bills/src/ipp/pstamp/scripts";
    15 //$STAMPS_DIR = "/export/data1/bills/pstamp/work/stamps";
     15$dsroot = "/export/data1/datastore/dsroot";
    1616
    1717// Initialize variables
     
    346346            $fileName = basename($path);
    347347            if ($state == "stop") {
    348                 // this job is done, list the url as a link
    349                 echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">";
    350                 echo $fileName;
    351                 echo "</a>";
    352                 echo "&nbsp;&nbsp;&nbsp; request_id: $last_request_id &nbsp;&nbsp;";
    353                 echo "job_id: $job_id &nbsp;&nbsp;&nbsp; state: $state";
     348                global $dsroot;
     349                $fullpath = "$dsroot" . "$path";
     350                if (file_exists($fullpath)) {
     351                    // this job is done, list the url as a link
     352                    echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">";
     353                    echo $fileName;
     354                    echo "</a>";
     355                    echo "&nbsp;&nbsp;&nbsp; request_id: $last_request_id &nbsp;&nbsp;";
     356                    echo "job_id: $job_id &nbsp;&nbsp;&nbsp; state: $state";
     357                } else {
     358                    echo "request_id: $last_request_id  job_id: $job_id failed";
     359                    echo "   $fullpath";
     360                }
    354361            } else {
    355362                // TODO: refine this output
     
    392399    if ($jobFinished) {
    393400        global $outFileset;
    394         $parse_error = "/var/www/html/ds/dsroot/$outFileset/parse_error";
     401        global $dsroot;
     402        $parse_error = "$dsroot/$outFileset/parse_error";
    395403        #echo "reading $parse_error\n";
    396404        // readfile( $parse_error );
    397         $fhandle = fopen($parse_error, "r");
    398         if ($fhandle) {
    399             $contents = fread($fhandle, 1024);
    400             if ($contents) {
    401                 global $last_request_id;
    402                 global $error_line;
    403                 $error_line = "Request $last_request_id: $contents\n";
     405        if (file_exists($parse_error)) {
     406            $fhandle = fopen($parse_error, "r");
     407            if ($fhandle) {
     408                $contents = fread($fhandle, 1024);
     409                if ($contents) {
     410                    global $last_request_id;
     411                    global $error_line;
     412                    $error_line = "Request $last_request_id: $contents\n";
     413                }
    404414            }
    405415        }
     
    457467
    458468<H1 align=center>
    459 Postage Stamp Request Form
     469Postage Stamp Request
    460470</h1>
    461471
     
    485495<td>
    486496&nbsp;<b>Select Images By:</b>&nbsp;&nbsp;&nbsp;
    487 <input type=radio name="select_by" value="exposure_id" <?php echo $exp_checked; ?> >Exposure ID
     497<input type=radio name="select_by" value="exposure_id" <?php echo $exp_checked; ?> >Exposure Name
    488498&nbsp;
    489499<input type=radio name="select_by" value="db_id" <?php echo $file_checked; ?> >Database ID
    490500&nbsp;
    491 <!--
    492501<input type=radio name="select_by" value="coord" <?php echo $coord_checked; ?> >Coordinates
    493 -->
    494502</td>
    495503</tr>
     
    517525
    518526<td>
    519 &nbsp;<b>ID:</b>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     527&nbsp;<b>ID/Name:</b>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    520528<input type="text" name="id" value= <?php echo $rvar_id; ?> >
    521529&nbsp;&nbsp;&nbsp;&nbsp;
     
    547555<td width=20% > </td>
    548556<!-- user tag input text -->
    549 <td>&nbsp;<b>Stamp Name:</b>&nbsp;<input type="text" name="user_tag" size=60 value=<?php echo $rvar_user_tag; ?> ></td>
     557<td>&nbsp;<b>Stamp Name:</b>&nbsp;<input type="text" name="user_tag" size=20 value=<?php echo $rvar_user_tag; ?> ></td>
    550558</tr>
    551559
     
    575583            &nbsp;
    576584            &nbsp;
    577             <input type="text" name="RA" size=15  value= <?php echo $rvar_RA; ?> >
     585            <input type="text" name="RA" size=10  value= <?php echo $rvar_RA; ?> >
    578586        </td>
    579587        <td>
     
    581589            DEC:
    582590            &nbsp;
    583             <input type="text" name="DEC" size=15 value="<?php echo $rvar_DEC;?>" >
     591            <input type="text" name="DEC" size=10 value="<?php echo $rvar_DEC;?>" >
    584592        </td>
    585593        <td>
     
    591599            &nbsp;
    592600            &nbsp;
    593             &nbsp;
    594             <input type="text" name="dRA" size=15  value= <?php echo $rvar_dRA; ?> >
     601            <input type="text" name="dRA" size=10  value= <?php echo $rvar_dRA; ?> >
    595602        </td>
    596603        <td>
     
    598605            dDEC:
    599606            &nbsp;
    600             <input type="text" name="dDEC" size=15 value="<?php echo $rvar_dDEC;?>" >
     607            <input type="text" name="dDEC" size=10 value="<?php echo $rvar_dDEC;?>" >
    601608        </td>
    602609    </tr>
     
    611618            &nbsp;
    612619            &nbsp;
    613             <input type="text" name="X" size=15  value= <?php echo $rvar_X; ?> >
     620            <input type="text" name="X" size=10  value= <?php echo $rvar_X; ?> >
    614621        </td>
    615622        <td>
     
    619626            &nbsp;
    620627            &nbsp;
    621             <input type="text" name="Y" size=15 value="<?php echo $rvar_Y;?>" >
     628            <input type="text" name="Y" size=10 value="<?php echo $rvar_Y;?>" >
    622629        </td>
    623630        <td>
     
    629636            &nbsp;
    630637            &nbsp;
    631             <input type="text" name="W" size=15  value= <?php echo $rvar_W; ?> >
     638            <input type="text" name="W" size=10  value= <?php echo $rvar_W; ?> >
    632639        </td>
    633640        <td>
     
    635642            height:
    636643            &nbsp;
    637             <input type="text" name="H" size=15 value="<?php echo $rvar_H;?>" >
     644            <input type="text" name="H" size=10 value="<?php echo $rvar_H;?>" >
    638645        </td>
    639646    </tr>
     
    643650
    644651
    645 <!-- next row of the main table just contains the Submit button -->
     652<!-- next row of the main table contains the Submit button and the Mode radio buttons -->
    646653
    647654<tr align=center width=100% height=50>
    648655  <td>
    649   <table width=40%>
     656  <table width=80%>
    650657  <tr>
    651658
Note: See TracChangeset for help on using the changeset viewer.