Changeset 298 for trunk/web/addons/job_monarch
- Timestamp:
- 03/30/07 15:21:17 (17 years ago)
- Location:
- trunk/web/addons/job_monarch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/job_monarch/image.php
r231 r298 43 43 global $clustername; 44 44 45 $ic = new ClusterImage( $clustername ); 45 $data_gatherer = new DataGatherer( $clustername ); 46 $data_gatherer->parseXML(); 47 48 if( $data_gatherer->isJobmonRunning() ) 49 $ic = new ClusterImage( $clustername ); 50 else 51 $ic = new EmptyImage(); 52 46 53 $ic->draw(); 47 54 } -
trunk/web/addons/job_monarch/libtoga.php
r294 r298 502 502 return $handler->getHeartbeat(); 503 503 } 504 505 function isJobmonRunning() { 506 $handler = $this->xmlhandler; 507 return $handler->isJobmonRunning(); 508 } 504 509 } 505 510 … … 529 534 $cpus = $cpus + $mycpus; 530 535 } 536 } 537 538 function isJobmonRunning() { 539 540 if (isset( $this->heartbeat['time'] )) 541 return 1; 542 else 543 return 0; 531 544 } 532 545 … … 1018 1031 } 1019 1032 1033 class EmptyImage { 1034 1035 function draw() { 1036 $image = imageCreateTrueColor( 1, 1 ); 1037 $colorwhite = imageColorAllocate( $image, 255, 255, 255 ); 1038 imageFill( $image, 0, 0, $colorwhite ); 1039 1040 header( 'Content-type: image/png' ); 1041 imagePNG( $image ); 1042 imageDestroy( $image ); 1043 } 1044 } 1045 1020 1046 //$my_data = new DataGatherer(); 1021 1047 //$my_data->parseXML();
Note: See TracChangeset
for help on using the changeset viewer.