Changeset 406
- Timestamp:
- 07/05/07 17:49:25 (16 years ago)
- Location:
- trunk/web/addons/job_monarch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/job_monarch/index.php
r399 r406 92 92 } 93 93 94 function makeHeader( $page_call ) {94 function makeHeader( $page_call, $title, $longtitle ) { 95 95 96 96 global $tpl, $grid, $context, $initgrid; 97 global $jobrange, $jobstart , $title, $longtitle;97 global $jobrange, $jobstart; 98 98 global $page, $gridwalk, $clustername; 99 99 global $parentgrid, $physical, $hostname; … … 154 154 exit; 155 155 } 156 $tpl->gotoBlock( "_ROOT" ); 156 157 157 158 if( $view != "search" ) … … 159 160 160 161 $tpl->assign( "date", date("r") ); 162 //printf("lg %s\n", $longtitle ); 163 //printf("title %s\n", $title ); 161 164 $tpl->assign( "longpage_title", $longtitle ); 162 165 $tpl->assign( "page_title", $title ); … … 207 210 208 211 if (!count($metrics)) { 209 echo "<h4>Cannot find any metrics for selected cluster \"$clustername\", exiting.</h4>\n"; echo "Check ganglia XML tree (telnet $ganglia_ip $ganglia_port)\n"; 212 echo "<h4>Cannot find any metrics for selected cluster \"$clustername\", exiting.</h4>\n"; 213 echo "Check ganglia XML tree (telnet $ganglia_ip $ganglia_port)\n"; 210 214 exit; 211 215 } 216 reset($metrics); 212 217 $firsthost = key($metrics); 213 foreach ($metrics[$firsthost] as $m => $foo) 214 $context_metrics[] = $m; 215 216 foreach ($reports as $r => $foo) 217 $context_metrics[] = $r; 218 219 $mmfh = array(); 220 221 $mmfh = $metrics[$firsthost]; 222 223 $context_metrics = array(); 224 225 //foreach ($mmfh as $mm => $mfoo) 226 foreach( $mmfh as $mm => $bla ) 227 { 228 $context_metrics[] = $mm; 229 } 230 231 foreach ($reports as $mr => $mfoo) 232 $context_metrics[] = $mr; 218 233 219 234 $node_menu .= "<B><A HREF=\"./?c=".rawurlencode($clustername)."\">Joblist</A></B> "; … … 329 344 } 330 345 331 if( $JOB_ARCHIVE && $page_call == ' index' ) {346 if( $JOB_ARCHIVE && $page_call == 'overview' ) { 332 347 $tpl->newBlock( "search" ); 333 348 $tpl->assignGlobal( "cluster_url", rawurlencode($clustername) ); … … 420 435 $longtitle = "Batch Report :: Powered by Job Monarch!"; 421 436 $title = "Batch Report"; 422 makeHeader( 'index' );437 //makeHeader( 'index' ); 423 438 $tpl->assign("cluster_url", rawurlencode($clustername) ); 424 439 $tpl->assign("cluster", $clustername ); -
trunk/web/addons/job_monarch/overview.php
r402 r406 25 25 global $GANGLIA_PATH, $clustername, $tpl, $filter, $cluster, $get_metric_string, $cluster_url, $sh; 26 26 global $hosts_up, $m, $start, $end, $filterorder, $COLUMN_REQUESTED_MEMORY, $COLUMN_QUEUED, $COLUMN_NODES, $hostname, $piefilter; 27 global $longtitle, $title; 27 28 28 29 $tpl->assign( "clustername", $clustername ); … … 62 63 session_start(); 63 64 65 unset( $_SESSION["data"] ); 64 66 $_SESSION["data"] = &$myxml_data; 65 67 … … 565 567 $last_displayed_job = null; 566 568 569 foreach( $metrics as $bhost => $bmetric ) 570 { 571 foreach( $bmetric as $mname => $mval ) 572 { 573 if( ( $mname == 'MONARCH-RJ' ) || ($mname == 'MONARCH-QJ') ) 574 { 575 $rjqj_host = $bhost; 576 } 577 } 578 } 579 //$rjqj_str = "<IMG SRC=\"../../graph.php?z=small&c=$cluster_url&h=$rjqj_host&m=MONARCH-QJ&r=job&jr=$jobrange&js=$jobstart\">"; 580 //printf( $rjqj_str, '' ); 581 567 582 foreach( $sorted_jobs as $jobid => $sortdec ) 568 583 { … … 869 884 } 870 885 871 makeHeader( 'overview' ); 886 //print_r( $metrics ); 887 888 global $longtitle, $title; 889 890 $longtitle = "Batch Report :: Powered by Job Monarch!"; 891 $title = "Batch Report"; 892 893 makeHeader( 'overview', $title, $longtitle ); 872 894 873 895 setupFilterSettings();
Note: See TracChangeset
for help on using the changeset viewer.