Changeset 21415 for trunk/pstamp/web/request.php
- Timestamp:
- Feb 6, 2009, 5:51:59 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/web/request.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/web/request.php
r20153 r21415 19 19 // BEGIN Local configuration 20 20 21 $WORKDIR = "/export/data1/bills/pstamp/work"; 22 23 $PSCONFDIR = "/export/data0/bills/psconfig"; 24 $PSCONFIG = "debug"; 25 $PSBINDIR = "$PSCONFDIR/$PSCONFIG.linrh64/bin"; 26 27 $dsroot = "/export/data1/datastore/dsroot"; 28 $dbname = "gpc1"; 21 $WORKDIR = "XXXX/pstamp-work/web"; 22 $dsroot = "XXXX/datastore/dsroot"; 23 $dbname = "XXXX"; 24 25 $PSCONFDIR = "XXXX"; 26 $PSCONFIG = "XXXX"; 27 $PSBINDIR = "$PSCONFDIR/$PSCONFIG.lin64/bin"; 29 28 30 29 // END Local configuration … … 49 48 $file_checked = ""; 50 49 $coord_checked = ""; 50 $diff_checked = ""; 51 51 $list_checked = ""; 52 52 $pstamp_checked = ""; … … 95 95 import_request_variables("gp", "rvar_"); 96 96 97 if ($rvar_project == "gpc1 ") {97 if ($rvar_project == "gpc1_rel_200901") { 98 98 $gpc1_selected = "selected"; 99 99 $require_class_id = 1; 100 } else if ($rvar_project == "simtest") { 100 } else if ($rvar_project == "megacam-mops") { 101 $mops_selected = "selected"; 102 $require_class_id = 0; 103 } else { // if ($rvar_project == "simtest") { 101 104 $simtest_selected = "selected"; 102 $require_class_id = 0;103 } else {104 $mops_selected = "selected";105 105 $require_class_id = 0; 106 106 } … … 114 114 } else if ($rvar_select_by == "coord") { 115 115 $coord_checked = "CHECKED"; 116 } else if ($rvar_select_by == "diff_image_id") { 117 $diff_checked = "CHECKED"; 116 118 } else { 117 119 // nothing checked default to By Exposure … … 248 250 global $rvar_X, $rvar_Y; 249 251 global $rvar_W, $rvar_H; 250 global $exp_checked, $file_checked, $coord_checked ;252 global $exp_checked, $file_checked, $coord_checked, $diff_checked; 251 253 global $rvar_img_type; 252 254 global $rvar_id, $rvar_class_id; … … 317 319 if ($exp_checked) { 318 320 if (! $rvar_id ) { 319 throw new Exception('Must set Exposure ID.');321 throw new Exception('Must set ID to the Exposure ID.'); 320 322 } 321 323 $cmd .= " -byexp $rvar_img_type $rvar_id"; 322 324 } else if ($file_checked) { 323 325 if (! $rvar_id ) { 324 throw new Exception('Must set ID .');326 throw new Exception('Must set ID to the exposure name.'); 325 327 } 326 328 $cmd .= " -byid $rvar_img_type $rvar_id"; … … 330 332 $exp_checked = "checked"; 331 333 throw new Exception("Image selection by coordinate not implemented yet."); 334 } else if ($diff_checked) { 335 if (! $rvar_id ) { 336 throw new Exception('Must set ID to Diff Image ID.'); 337 } 338 $cmd .= " -bydiff $rvar_img_type $rvar_id"; 332 339 } 333 340 … … 385 392 $doURL = 1; 386 393 if ($doURL) { 387 // echo "output_line: $line\n"; 394 // echo "<pre>output_line: $line\n</pre>"; 395 // Parse the output from pstamp_list_jobs.pl 388 396 $elements = explode(" ", $line); 389 if (count($elements) == 3) {397 if (count($elements) == 6) { 390 398 $job_id = $elements[0]; 391 399 $state = $elements[1]; 392 $path = $elements[2]; 400 $fault = $elements[2]; 401 $req_name = $elements[3]; 402 $product = $elements[4]; 403 $path = $elements[5]; 393 404 $fileName = basename($path); 394 405 if ($state == "stop") { 395 406 global $dsroot; 396 $fullpath = "$dsroot" . "$path"; 397 if (file_exists($fullpath)) { 407 $dirName = "$dsroot/$product/$req_name"; 408 $filesetURL = "/ds/$product/$req_name"; 409 $fullpath = "$dirName/$fileName"; 410 // echo "<pre>fullpath: $fullpath filesetURL: $filesetURL\n</pre>"; 411 if (file_exists($dirName)) { 398 412 // this job is done, list the url as a link 399 echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">"; 400 echo $fileName; 413 // echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">"; 414 echo "<a href=\"http:$filesetURL\">"; 415 # echo $fileName; 416 $filesetName = basename($dirName); 417 echo "Fileset: $filesetName"; 401 418 echo "</a>"; 402 echo " request_id: $last_request_id ";419 echo " Base: $fileName request id: $last_request_id "; 403 420 echo "job_id: $job_id state: $state"; 404 421 } else { 405 echo "request _id: $last_request_id job_id: $job_id failed";422 echo "request id: $last_request_id job id: $job_id failed"; 406 423 echo " $fullpath"; 407 424 } … … 549 566 <tr><td><b>Project:</b> </td> 550 567 <td><select name="project"> 551 <option <?php echo $gpc1_selected;?> >gpc1 568 <option <?php echo $gpc1_selected;?> >gpc1_rel_200901 552 569 <option <?php echo $mops_selected;?> >megacam-mops 553 570 <option <?php echo $simtest_selected;?> >simtest … … 563 580 564 581 <input type=radio name="select_by" value="coord" <?php echo $coord_checked; ?> >Coordinates 582 583 <input type=radio name="select_by" value="diff_image_id" <?php echo $diff_checked; ?> >Diff Image ID 565 584 </td> 566 585 </tr> … … 592 611 593 612 <b> 594 <?php if (0 && $rvar_project == "gpc1 ") {613 <?php if (0 && $rvar_project == "gpc1_rel_200901") { 595 614 echo "Chip ID:"; 596 615 } else { … … 820 839 <pre> 821 840 822 <!--- rvar_select_by = <?php echo $rvar_select_by; ?>823 --->824 841 825 842 <?php 843 844 // echo "select_by: $rvar_select_by diff_checked: $diff_checked exp_checked: $exp_checked file_checked: $file_checked coord_checked: $coord_checked\n"; 845 826 846 // dump parameters 827 847
Note:
See TracChangeset
for help on using the changeset viewer.
