Index: /trunk/web/addons/job_monarch/conf.php
===================================================================
--- /trunk/web/addons/job_monarch/conf.php	(revision 304)
+++ /trunk/web/addons/job_monarch/conf.php	(revision 305)
@@ -35,5 +35,18 @@
 // The size of a single node in the small clusterimage
 //
-$SMALL_CLUSTERIMAGE_NODEWIDTH = 11;
+$SMALL_CLUSTERIMAGE_NODEWIDTH = 7;
+
+// Max size of small clusterimage
+// (250 pixels is same width as Ganglia's pie chart)
+//
+$BIG_CLUSTERIMAGE_MAXWIDTH = 250;
+
+// The size of a single node in the small clusterimage
+//
+$BIG_CLUSTERIMAGE_NODEWIDTH = 11;
+
+// Max size of small host image
+//
+$SMALL_HOSTIMAGE_MAXWIDTH = 450;
 
 // How to mark nodes with a job in clusterimage
Index: /trunk/web/addons/job_monarch/image.php
===================================================================
--- /trunk/web/addons/job_monarch/image.php	(revision 304)
+++ /trunk/web/addons/job_monarch/image.php	(revision 305)
@@ -61,8 +61,10 @@
 	$data_gatherer->parseXML();
 
-	if( $data_gatherer->isJobmonRunning() )
+	if( $data_gatherer->isJobmonRunning() ) {
 		$ic = new ClusterImage( $clustername );
-	else
+		$ic->setSmall();
+	} else {
 		$ic = new EmptyImage();
+	}
 
 	$ic->draw();
@@ -74,4 +76,5 @@
 
 	$ic = new ClusterImage( $clustername );
+	$ic->setBig();
 
 	if( isset( $filter ) ) {
Index: /trunk/web/addons/job_monarch/libtoga.php
===================================================================
--- /trunk/web/addons/job_monarch/libtoga.php	(revision 304)
+++ /trunk/web/addons/job_monarch/libtoga.php	(revision 305)
@@ -769,4 +769,6 @@
 	function NodeImage( $hostname ) {
 
+		global $SMALL_CLUSTERIMAGE_NODEWIDTH;
+
 		$this->jobs = array();
 		//$this->image = $image;
@@ -777,4 +779,5 @@
 		$this->cpus = $this->determineCpus();
 		$this->showinfo = 1;
+		$this->size = $SMALL_CLUSTERIMAGE_NODEWIDTH;
 	}
 
@@ -844,20 +847,28 @@
 	}
 
+	function drawSmall() {
+
+		global $SMALL_CLUSTERIMAGE_NODEWIDTH;
+
+		$this->size	= $SMALL_CLUSTERIMAGE_NODEWIDTH;
+
+		$this->draw();
+	}
+
+	function drawBig() {
+
+		global $BIG_CLUSTERIMAGE_NODEWIDTH;
+
+		$this->size	= $BIG_CLUSTERIMAGE_NODEWIDTH;
+
+		$this->draw();
+	}
+
 	function draw() {
 
-		$this->drawSmall();
-	}
-
-	function drawBig() {
-
-	}
-
-	function drawSmall() {
-
-		global $SMALL_CLUSTERIMAGE_NODEWIDTH;
 		global $JOB_NODE_MARKING;
 
 		$black_color = imageColorAllocate( $this->image, 0, 0, 0 );
-		$size = $SMALL_CLUSTERIMAGE_NODEWIDTH;
+		$size = $this->size;
 
 		imageFilledRectangle( $this->image, $this->x, $this->y, $this->x+($size), $this->y+($size), $black_color );
@@ -920,16 +931,29 @@
 	function ClusterImage( $clustername ) {
 
-		//printf( "image cluster = %s\n", $clustername );
-		$this->dataget = new DataGatherer( $clustername );
-		$this->clustername = $clustername;
-		$this->filters = array();
+		$this->dataget		= new DataGatherer( $clustername );
+		$this->clustername	= $clustername;
+		$this->filters		= array();
+		$this->size		= 's';
+	}
+
+	function setSmall() {
+		$this->size	= 's';
+	}
+
+	function setBig() {
+		$this->size	= 'b';
+	}
+
+	function isSmall() {
+		return ($this->size == 's');
+	}
+
+	function isBig() {
+		return ($this->size == 'b');
 	}
 
 	function setFilter( $filtername, $filtervalue ) {
 
-		//printf("filter %s = %s\n", $filtername, $filtervalue );
-		//printf( "filter set to %s = %s\n", $filtername, $filtervalue );
 		$this->filters[$filtername] = $filtervalue;
-		//print_r($this->filters);
 	}
 
@@ -953,6 +977,4 @@
 
 						foreach( $this->filters as $filtername => $filtervalue ) {
-
-							//printf("filter bla %s = %s\n", $filtername,$filtervalue );
 
 							if( $filtername!=null && $filtername!='' ) {
@@ -960,9 +982,6 @@
 								if( $filtername == 'jobid' && !$node->hasJob( $filtervalue) ) {
 									$addhost = 0;
-									//printf("host %s has no job %s\n", $hostname, $filtervalue);
 								} else if( $filtername != 'jobid' ) {
-									//printf("myjob is %s\n", $myjob );
 									if( $jobs[$myjob][$filtername] != $filtervalue ) {
-										//printf("host %s has no job with %s=%s\n", $hostname, $filtername, $filtervalue);
 										$addhost = 0;
 									}
@@ -984,19 +1003,17 @@
 	function draw() {
 
-		//printf("stopt met uitvoer");
-		//return;
-
 		global $SMALL_CLUSTERIMAGE_MAXWIDTH, $SMALL_CLUSTERIMAGE_NODEWIDTH;
+		global $BIG_CLUSTERIMAGE_MAXWIDTH, $BIG_CLUSTERIMAGE_NODEWIDTH;
 	
 		$mydatag = $this->dataget;
 		$mydatag->parseXML();
 
-		//$max_width = 250;
-		//$node_width = 11;
-
-		$max_width = $SMALL_CLUSTERIMAGE_MAXWIDTH;
-		$node_width = $SMALL_CLUSTERIMAGE_NODEWIDTH;
-
-		//printf( "cmaxw %s nmaxw %s", $SMALL_CLUSTERIMAGE_MAXWIDTH, $SMALL_CLUSTERIMAGE_NODEWIDTH );
+		if( $this->isSmall() ) {
+			$max_width = $SMALL_CLUSTERIMAGE_MAXWIDTH;
+			$node_width = $SMALL_CLUSTERIMAGE_NODEWIDTH;
+		} else if( $this->isBig() ) {
+			$max_width = $BIG_CLUSTERIMAGE_MAXWIDTH;
+			$node_width = $BIG_CLUSTERIMAGE_NODEWIDTH;
+		}
 
 		$nodes = $mydatag->getNodes();
@@ -1056,5 +1073,8 @@
 						$nodes[$host]->setShowinfo( 0 );
 
-					$nodes[$host]->draw();
+					if( $this->isSmall() )
+						$nodes[$host]->drawSmall();
+					else if( $this->isBig() )
+						$nodes[$host]->drawBig();
 				}
 			}
