Index: trunk/web/addons/job_monarch/image.php
===================================================================
--- trunk/web/addons/job_monarch/image.php	(revision 645)
+++ trunk/web/addons/job_monarch/image.php	(revision 646)
@@ -33,27 +33,81 @@
 }
 
-function checkSessionData()
-{
-	global $_SESSION;
-
-	session_start();
-
-	if( isset( $_SESSION['data'] ) )
-	{
-		$myxml_data	= &$_SESSION['data'];
-	}
-	else
-	{
-		$myxml_data	= 0;
-	}
-
-	if( !$myxml_data ) {
-		$ds             = new DataSource();
-		$myxml_data     = $ds->getData();
-
-	}
-	return $myxml_data;
-}
-
+function makeSession()
+{
+        $ds             = new DataSource();
+        $myxml_data     = &$ds->getData();
+
+        unset( $_SESSION['data'] );
+
+        $_SESSION['data']               = &$myxml_data;
+        $_SESSION['gather_time']        = time();
+}
+
+global $session_active, $_SESSION, $myxml_data;
+
+function checkSessionPollInterval( $poll_interval )
+{
+        global $session_active, $_SESSION;
+
+        if( ! session_active )
+        {
+                return 0;
+        }
+
+        if( isset( $_SESSION['poll_interval'] ) )
+        {
+                if( $poll_interval <> $_SESSION['poll_interval'] )
+                {
+                        $_SESSION['poll_interval']      = $poll_interval;
+                }
+        }
+        else
+        {
+                $_SESSION['poll_interval']      = $poll_interval;
+        }
+
+        session_write_close();
+
+        $session_active = false;
+}
+
+function checkSession()
+{
+        global $session_active, $_SESSION;
+
+        session_start();
+
+        $session_active         = true;
+
+        // I got nothing; create session
+        //
+        if( ! isset( $_SESSION['gather_time'] ) || ! isset( $_SESSION['data'] ) )
+        {
+                makeSession();
+
+                return 0;
+        }
+
+        if( isset( $_SESSION['poll_interval'] ) )
+        {
+                $gather_time    = $_SESSION['gather_time'];
+                $poll_interval  = $_SESSION['poll_interval'];
+
+                $cur_time       = time();
+
+                // If poll_interval time elapsed since last update; recreate session
+                //
+                if( ($cur_time - $gather_time) >= $poll_interval )
+                {
+                        makeSession();
+
+                        return 0;
+                }
+        }
+}
+
+checkSession();
+$myxml_data	= &$_SESSION['data'];
+session_write_close();
 
 $httpvars	= new HTTPVariables( $HTTP_GET_VARS, $_GET );
@@ -70,15 +124,11 @@
 if( isset($query) && ($query!='')) $filter['query']=$query;
 
-function drawHostImage() {
-
+$data_gatherer  = new DataGatherer( $clustername );
+$data_gatherer->parseXML( &$myxml_data );
+
+function drawHostImage()
+{
 	global $clustername, $hostname, $data_gatherer;
 
-	$ds             = new DataSource();
-	$myxml_data     = $ds->getData();
-
-	$data_gatherer	= new DataGatherer( $clustername );
-
-	$data_gatherer->parseXML( $myxml_data );
-
 	if( $data_gatherer->isJobmonRunning() )
 	{
@@ -93,14 +143,7 @@
 }
 
-function drawSmallClusterImage() {
-
-	global $clustername, $data_gatherer;
-
-	$ds             = new DataSource();
-	$myxml_data     = $ds->getData();
-
-	$data_gatherer	= new DataGatherer( $clustername );
-
-	$data_gatherer->parseXML( $myxml_data );
+function drawSmallClusterImage() 
+{
+	global $clustername, $data_gatherer, $myxml_data;
 
 	if( $data_gatherer->isJobmonRunning() )
@@ -117,9 +160,7 @@
 }
 
-function drawBigClusterImage() {
-
-	global $filter, $clustername;
-
-	$myxml_data	= checkSessionData();
+function drawBigClusterImage()
+{
+	global $filter, $clustername, $myxml_data;
 
 	$ic = new ClusterImage( $myxml_data, $clustername );
@@ -136,6 +177,6 @@
 }
 
-switch( $view ) {
-
+switch( $view ) 
+{
 	case "small-clusterimage":
 
Index: trunk/web/addons/job_monarch/jobstore.php
===================================================================
--- trunk/web/addons/job_monarch/jobstore.php	(revision 645)
+++ trunk/web/addons/job_monarch/jobstore.php	(revision 646)
@@ -57,15 +57,84 @@
 include_once "./libtoga.php";
 
-$ds             = new DataSource();
-$myxml_data     = &$ds->getData();
-
-session_start();
-unset( $_SESSION['data'] );
-$_SESSION['data']       = &$myxml_data;
+function makeSession()
+{
+	$ds             = new DataSource();
+	$myxml_data     = &$ds->getData();
+
+	unset( $_SESSION['data'] );
+
+	$_SESSION['data']		= &$myxml_data;
+	$_SESSION['gather_time']	= time();
+}
+
+global $session_active, $_SESSION;
+
+function checkSessionPollInterval( $poll_interval )
+{
+	global $session_active, $_SESSION;
+
+	if( ! session_active )
+	{
+		return 0;
+	}
+
+	if( isset( $_SESSION['poll_interval'] ) )
+	{
+		if( $poll_interval <> $_SESSION['poll_interval'] )
+		{
+			$_SESSION['poll_interval']	= $poll_interval;
+		}
+	}
+	else
+	{
+		$_SESSION['poll_interval']	= $poll_interval;
+	}	
+
+	session_write_close();
+
+	$session_active	= false;
+}
+
+function checkSession()
+{
+	global $session_active, $_SESSION;
+
+	session_start();
+
+	$session_active 	= true;
+
+	// I got nothing; create session
+	//
+	if( ! isset( $_SESSION['gather_time'] ) || ! isset( $_SESSION['data'] ) )
+	{
+		makeSession();
+
+		return 0;	
+	}
+
+	if( isset( $_SESSION['poll_interval'] ) )
+	{
+		$gather_time	= $_SESSION['gather_time'];
+		$poll_interval	= $_SESSION['poll_interval'];
+
+		$cur_time	= time();
+
+		// If poll_interval time elapsed since last update; recreate session
+		//
+		if( ($cur_time - $gather_time) >= $poll_interval )
+		{
+			makeSession();
+
+			return 0;	
+		}
+	}
+}
+
+checkSession();
 
 global $jobs, $metrics;
 
 $data_gatherer  = new DataGatherer( $clustername );
-$data_gatherer->parseXML( &$myxml_data );
+$data_gatherer->parseXML( &$_SESSION['data'] );
 
 $heartbeat      = &$data_gatherer->getHeartbeat();
@@ -495,4 +564,8 @@
 		$reported	= (int) $jobs[$jid]['reported'];
 
+		$poll_interval	= (int) $jobs[$jid]['poll_interval'];
+
+		checkSessionPollInterval( $poll_interval );
+
 		$time		= time();
 
@@ -501,5 +574,5 @@
 		$job_runtime	= $time - intval( $jobs[$jid]['start_timestamp'] );
 		//$job_runtime	= date( 'u' ) - intval( $jobs[$jid]['start_timestamp'] );
-		//$job_window	= intval( $job_runtime ) * 1.2;
+		$job_window	= intval( $job_runtime ) * 1.2;
 
 		$jobrange	= -$job_window;
@@ -508,4 +581,5 @@
 
 		$nr['jid']	= $jid;
+		$nr['nodename']	= $host;
 
 		$hostar		= array( $host );
@@ -523,5 +597,7 @@
 		// maybe later to popup?
 		//
-		//$host_link      = "\"../../?c=$cluster_url&h=$host_url&r=job&jr=$jobrange&job_start=$jobstart\"";
+		$host_link      = "../../?c=$cluster_url&h=$host_url&r=job&jr=$jobrange&job_start=$jobstart";
+
+		$nr['hostlink']	= $host_link;
 
 		if ( $val["TYPE"] == "timestamp" || $always_timestamp[$metricname] )
@@ -608,4 +684,8 @@
 		$jr['requested_time']	= makeTime( timeToEpoch( $jobs[$jobid]['requested_time'] ) );
 
+		$poll_interval		= (int) $jobs[$jobid]['poll_interval'];
+
+		checkSessionPollInterval( $poll_interval );
+
 		if( $jr['status'] == 'R' )
 		{
Index: trunk/web/addons/job_monarch/js/monarch.js
===================================================================
--- trunk/web/addons/job_monarch/js/monarch.js	(revision 645)
+++ trunk/web/addons/job_monarch/js/monarch.js	(revision 646)
@@ -764,5 +764,4 @@
 JobsColumnModel = new Ext.grid.ColumnModel(
 {
-	//CheckJobs,
 	defaults:
 	{
@@ -773,4 +772,5 @@
 	columns:
 	[
+		CheckJobs,
 		{
 			header:		'#',
@@ -926,5 +926,7 @@
 			},[
 				{name: 'jid', type: 'string', mapping: 'jid'},
-				{name: 'ga', type: 'string', mapping: 'ga'}
+				{name: 'ga', type: 'string', mapping: 'ga'},
+				{name: 'nodename', type: 'string', mapping: 'nodename'},
+				{name: 'hostlink', type: 'string', mapping: 'hostlink'}
 			]),
 			listeners:
@@ -976,5 +978,5 @@
 					'<tpl for=".">',
 					//'<div class="rrd-float"><a href="./graph.php?z=large&{ga}" border="0" rel="lightbox[{jid}.{[globalWindowCount]}]"><img src="./graph.php?z=small&{ga}" border="0"></a></div>',
-					'<div class="rrd-float"><img src="./graph.php?z=small&{ga}" border="0" style="cursor:pointer" onclick="nodeWindow(\'node x\', \'{ga}\');"></a></div>',
+					'<div class="rrd-float"><img src="./graph.php?z=small&{ga}" border="0" style="cursor:pointer" onclick="nodeWindow(\'{nodename}\', \'{hostlink}\');"></a></div>',
 					'</tpl>')
 		});
Index: trunk/web/addons/job_monarch/templates/header.tpl
===================================================================
--- trunk/web/addons/job_monarch/templates/header.tpl	(revision 645)
+++ trunk/web/addons/job_monarch/templates/header.tpl	(revision 646)
@@ -35,8 +35,9 @@
 	JobProxy.on('beforeload', function(p, params) 
 	{
-		params.c	= "{cluster}";
-		newparams	= joinMyArray( params, myfilters );
-		myparams	= newparams;
-		params		= newparams;
+		params['c']			= '{cluster}';
+		params['{session_name}']	= '{session_id}';
+		newparams			= joinMyArray( params, myfilters );
+		myparams			= newparams;
+		params				= newparams;
 	});
 
