Index: trunk/web/addons/job_monarch/index.php
===================================================================
--- trunk/web/addons/job_monarch/index.php (revision 405)
+++ trunk/web/addons/job_monarch/index.php (revision 406)
@@ -92,8 +92,8 @@
}
-function makeHeader( $page_call ) {
+function makeHeader( $page_call, $title, $longtitle ) {
global $tpl, $grid, $context, $initgrid;
- global $jobrange, $jobstart, $title, $longtitle;
+ global $jobrange, $jobstart;
global $page, $gridwalk, $clustername;
global $parentgrid, $physical, $hostname;
@@ -154,4 +154,5 @@
exit;
}
+ $tpl->gotoBlock( "_ROOT" );
if( $view != "search" )
@@ -159,4 +160,6 @@
$tpl->assign( "date", date("r") );
+ //printf("lg %s\n", $longtitle );
+ //printf("title %s\n", $title );
$tpl->assign( "longpage_title", $longtitle );
$tpl->assign( "page_title", $title );
@@ -207,13 +210,25 @@
if (!count($metrics)) {
- echo "
Cannot find any metrics for selected cluster \"$clustername\", exiting.
\n"; echo "Check ganglia XML tree (telnet $ganglia_ip $ganglia_port)\n";
+ echo "Cannot find any metrics for selected cluster \"$clustername\", exiting.
\n";
+ echo "Check ganglia XML tree (telnet $ganglia_ip $ganglia_port)\n";
exit;
}
+ reset($metrics);
$firsthost = key($metrics);
- foreach ($metrics[$firsthost] as $m => $foo)
- $context_metrics[] = $m;
-
- foreach ($reports as $r => $foo)
- $context_metrics[] = $r;
+
+ $mmfh = array();
+
+ $mmfh = $metrics[$firsthost];
+
+ $context_metrics = array();
+
+ //foreach ($mmfh as $mm => $mfoo)
+ foreach( $mmfh as $mm => $bla )
+ {
+ $context_metrics[] = $mm;
+ }
+
+ foreach ($reports as $mr => $mfoo)
+ $context_metrics[] = $mr;
$node_menu .= "Joblist ";
@@ -329,5 +344,5 @@
}
- if( $JOB_ARCHIVE && $page_call == 'index' ) {
+ if( $JOB_ARCHIVE && $page_call == 'overview' ) {
$tpl->newBlock( "search" );
$tpl->assignGlobal( "cluster_url", rawurlencode($clustername) );
@@ -420,5 +435,5 @@
$longtitle = "Batch Report :: Powered by Job Monarch!";
$title = "Batch Report";
-makeHeader( 'index' );
+//makeHeader( 'index' );
$tpl->assign("cluster_url", rawurlencode($clustername) );
$tpl->assign("cluster", $clustername );
Index: trunk/web/addons/job_monarch/overview.php
===================================================================
--- trunk/web/addons/job_monarch/overview.php (revision 405)
+++ trunk/web/addons/job_monarch/overview.php (revision 406)
@@ -25,4 +25,5 @@
global $GANGLIA_PATH, $clustername, $tpl, $filter, $cluster, $get_metric_string, $cluster_url, $sh;
global $hosts_up, $m, $start, $end, $filterorder, $COLUMN_REQUESTED_MEMORY, $COLUMN_QUEUED, $COLUMN_NODES, $hostname, $piefilter;
+global $longtitle, $title;
$tpl->assign( "clustername", $clustername );
@@ -62,4 +63,5 @@
session_start();
+ unset( $_SESSION["data"] );
$_SESSION["data"] = &$myxml_data;
@@ -565,4 +567,17 @@
$last_displayed_job = null;
+ foreach( $metrics as $bhost => $bmetric )
+ {
+ foreach( $bmetric as $mname => $mval )
+ {
+ if( ( $mname == 'MONARCH-RJ' ) || ($mname == 'MONARCH-QJ') )
+ {
+ $rjqj_host = $bhost;
+ }
+ }
+ }
+ //$rjqj_str = "";
+ //printf( $rjqj_str, '' );
+
foreach( $sorted_jobs as $jobid => $sortdec )
{
@@ -869,5 +884,12 @@
}
- makeHeader( 'overview' );
+ //print_r( $metrics );
+
+ global $longtitle, $title;
+
+ $longtitle = "Batch Report :: Powered by Job Monarch!";
+ $title = "Batch Report";
+
+ makeHeader( 'overview', $title, $longtitle );
setupFilterSettings();