Index: /trunk/web2/addons/job_monarch/jobstore.php
===================================================================
--- /trunk/web2/addons/job_monarch/jobstore.php	(revision 561)
+++ /trunk/web2/addons/job_monarch/jobstore.php	(revision 562)
@@ -251,8 +251,8 @@
 				        foreach( $jobattrs[nodes] as $mynode )
 					{
-						if( $use_fqdn == 1)
-						{
-							$mynode = $mynode.".".$jobattrs[domain];
-						}
+						//if( $use_fqdn == 1)
+						//{
+						//	$mynode = $mynode.".".$jobattrs[domain];
+						//}
 						$mynodehosts[]  = $mynode;
 					}
Index: /trunk/web2/addons/job_monarch/js/jobgrid.js
===================================================================
--- /trunk/web2/addons/job_monarch/js/jobgrid.js	(revision 561)
+++ /trunk/web2/addons/job_monarch/js/jobgrid.js	(revision 562)
@@ -507,4 +507,5 @@
 							}
 							win.show( this );
+							alert( CheckJobs.getSelections() );
 						}
 					}
Index: /trunk/web2/addons/job_monarch/libtoga.php
===================================================================
--- /trunk/web2/addons/job_monarch/libtoga.php	(revision 561)
+++ /trunk/web2/addons/job_monarch/libtoga.php	(revision 562)
@@ -591,5 +591,6 @@
 		$offline_nodes		= array();
 		$this->clustername	= $clustername;
-		$this->fqdn		= 1;
+		$this->fqdn		= 0;
+		$this->fqdnFound	= 0;
 	}
 
@@ -634,30 +635,7 @@
 		$nodes = &$this->nodes;
 
-		$fqdn = 1;
-
-		//$tdomain = explode( '.', $thostname );
-		//
-		// TODO?: extract domain from hostname or something?
-
-		if( $tdomain )
-		{
-			$domain_len	= 0 - strlen( $tdomain );
-
-			// Let's see if Ganglia use's FQDN or short hostnames
-			//
-			foreach( $nodes as $hostname => $nimage )
-			{
-				if( substr( $hostname, $domain_len ) != $tdomain )
-				{
-					$fqdn	= 0;
-				}
-			}
-		}
-		else
-		{
-			$fqdn	= 0;
-		}
+		$domain_len	= 0 - strlen( $tdomain );
 	
-		if( $tdomain && $fqdn )
+		if( $tdomain && $this->fqdn )
 		{
 			if( substr( $thostname, $domain_len ) != $tdomain )
@@ -665,8 +643,4 @@
 				$thostname = $thostname . '.'.$tdomain;
 			} 
-			else
-			{
-				$thostname = $thostname;
-			}
 		}
 
@@ -697,4 +671,23 @@
 		{
 			$hostname = $attrs[NAME];
+
+			// Assume to use FQDN if we find a '.' in the hostname
+			//
+			if( strpos( $hostname, '.' ) !== false )
+			{
+				if( !$this->fqdnFound )
+				{
+					$this->fqdn		= 1;
+					$this->fqdnFound	= 1;
+				}
+			}
+			else
+			{
+				if( !$this->fqdnFound )
+				{
+					$this->fqdn		= 0;
+					$this->fqdnFound	= 1;
+				}
+			}
 
 			$location = $attrs[LOCATION];
@@ -746,4 +739,10 @@
 					}
 				}
+				$down_nodes	= $nodes_down;
+
+				foreach( $down_nodes as $node )
+				{
+					$nodes_down[] = $this->makeHostname( $node, $down_domain );
+				}
 			}
 			else if( strstr( $attrs[NAME], 'MONARCH-OFFLINE' ) )
@@ -782,4 +781,10 @@
 					}
 				}
+				$offline_nodes	= $nodes_offline;
+
+				foreach( $offline_nodes as $node )
+				{
+					$nodes_offline[] = $this->makeHostname( $node, $offline_domain );
+				}
 			}
 			else if( strstr( $attrs[NAME], 'MONARCH-JOB' ) )
@@ -838,45 +843,15 @@
 					if( $jobs[$jobid][status] == 'R' )
 					{
-
 						if( isset( $jobs[$jobid][domain] ) )
 						{
 							$domain		= $jobs[$jobid][domain];
-							$domain_len	= 0 - strlen( $domain );
-
-							// Let's see if Ganglia use's FQDN or short hostnames
-							//
-							foreach( $nodes as $hostname => $nimage )
-							{
-					
-								if( substr( $hostname, $domain_len ) != $domain )
-								{
-									$this->fqdn	= 0;
-								}
-							}
 						}
-						else
-						{
-							$this->fqdn	= 0;
-						}
+						$job_nodes	= array();
 
 						foreach( $jobs[$jobid][nodes] as $node )
 						{
-
 							// Only add domain name to the hostname if Ganglia is doing that too
 							//
-							if( $this->fqdn && isset( $jobs[$jobid][domain] ) )
-							{
-								if( substr( $node, $domain_len ) != $domain )
-								{
-									$host = $node. '.'.$domain;
-								} else
-								{
-									$host = $node;
-								}
-							}
-							else
-							{
-								$host	= $node;
-							}
+							$host	= $this->makeHostname( $node, $domain );
 
 							if( !isset( $nodes[$host] ) )
@@ -901,6 +876,8 @@
 							}
 
-							$nodes[$host] = $my_node;
+							$nodes[$host]	= $my_node;
+							$job_nodes[]	= $host;
 						}
+						$jobs[$jobid][nodes]	= $job_nodes;
 					}
 				}
@@ -1371,7 +1348,17 @@
 								if( $filtername != 'jobid' && $filtername != 'host' ) 
 								{
-									if( $jobs[$myjob][$filtername] != $filtervalue )
+									//if( $filtername == 'owner' )
+									//{
+									//	printf( "%s ?= %s\n", $jobs[$myjob][$filtername], $filtervalue );
+									//}
+									if( $jobs[$myjob][$filtername] == $filtervalue )
+									{
+										$addhost = 1;
+										continue;
+									}
+									else if( $jobs[$myjob][$filtername] != $filtervalue )
 									{
 										$addhost = 0;
+									//	printf( "vergeet host\n" );
 									}
 								}
