diff -urN RackTables-0.20.4-orig/wwwroot/inc/dictionary.php base/wwwroot/inc/dictionary.php
--- RackTables-0.20.4-orig/wwwroot/inc/dictionary.php	2013-04-14 21:27:19.000000000 +0100
+++ base/wwwroot/inc/dictionary.php	2013-05-16 12:49:23.681661125 +0100
@@ -1081,7 +1081,7 @@
 	991 => array ('chapter_id' => 11, 'dict_value' => 'Dell PowerEdge%GPASS%R710'),
 	992 => array ('chapter_id' => 11, 'dict_value' => 'Dell PowerEdge%GPASS%R805'),
 	993 => array ('chapter_id' => 11, 'dict_value' => 'Dell PowerEdge%GPASS%R905'),
-	994 => array ('chapter_id' => 31, 'dict_value' => 'Dell PowerEdge%GPASS%M1000e'),
+	994 => array ('chapter_id' => 31, 'dict_value' => 'Dell PowerEdge%GPASS%M1000e%L2,8V%'),
 	995 => array ('chapter_id' => 18, 'dict_value' => 'Dell PowerVault%GPASS%MD1000'),
 	996 => array ('chapter_id' => 18, 'dict_value' => 'Dell PowerVault%GPASS%MD1120'),
 	997 => array ('chapter_id' => 18, 'dict_value' => 'Dell EqualLogic PS5000'),
@@ -1601,7 +1601,7 @@
 	1514 => array ('chapter_id' => 13, 'dict_value' => 'Xen Hypervisor%GSKIP%XenServer 4.0'),
 	1515 => array ('chapter_id' => 13, 'dict_value' => 'Xen Hypervisor%GSKIP%XenServer 5.0'),
 	1516 => array ('chapter_id' => 13, 'dict_value' => 'Xen Hypervisor%GSKIP%XenServer 5.5'),
-	1517 => array ('chapter_id' => 31, 'dict_value' => 'Dell PowerEdge%GPASS%1855'),
+	1517 => array ('chapter_id' => 31, 'dict_value' => 'Dell PowerEdge%GPASS%1855%L1,10V%'),
 	1518 => array ('chapter_id' => 11, 'dict_value' => 'Dell PowerEdge (blade)%GPASS%1955'),
 	1519 => array ('chapter_id' => 11, 'dict_value' => 'Dell PowerEdge (blade)%GPASS%M605'),
 	1520 => array ('chapter_id' => 11, 'dict_value' => 'Dell PowerEdge (blade)%GPASS%M610'),
diff -urN RackTables-0.20.4-orig/wwwroot/inc/functions.php base/wwwroot/inc/functions.php
--- RackTables-0.20.4-orig/wwwroot/inc/functions.php	2013-04-14 21:27:19.000000000 +0100
+++ base/wwwroot/inc/functions.php	2013-05-16 12:49:23.681661125 +0100
@@ -1055,7 +1055,27 @@
 // FIXME: should this be saved as "P-data"?
 function execGMarker ($line)
 {
-	return preg_replace ('/^.+%GSKIP%/', '', preg_replace ('/^(.+)%GPASS%/', '\\1 ', $line));
+	return preg_replace ('/^.+%GSKIP%/', '',
+		 preg_replace ('/^(.+)%GPASS%/', '\\1 ',
+			preg_replace ('/%L\d+,\d+(H|V|)%/', '', $line)));
+}
+
+// extract the layout information from the %L...% marker in the dictionary info
+// This is somewhat similar to the %GPASS %GSKIP
+//
+function extractLayout (&$record)
+{
+	if ( preg_match ('/%L(\d+),(\d+)(H|V|)%/', $record['value'], $matches) )
+	{
+		$record['rows'] = $matches[1];
+		$record['cols'] = $matches[2];
+		$record['layout'] = $matches[3];
+		if (! strlen($record['layout']) )
+			if ( $record['cols'] >= 4 )
+				$record['layout'] = 'V';
+			else
+				$record['layout'] = 'H';
+	}
 }
 
 // rackspace usage for a single rack
@@ -3327,7 +3347,7 @@
 	$ifname = preg_replace ('@^BE(\d+)$@', 'bundle-ether\\1', $ifname); // IOS XR4
 	$ifname = strtolower ($ifname);
 	$ifname = preg_replace ('/^(e|fa|gi|te|po|xg|lo|ma)\s+(\d.*)/', '$1$2', $ifname);
-	return $ifname;
+	return ucfirst($ifname);
 }
 
 # Produce a list of integers from a string in the following format:
diff -urN RackTables-0.20.4-orig/wwwroot/inc/interface.php base/wwwroot/inc/interface.php
--- RackTables-0.20.4-orig/wwwroot/inc/interface.php	2013-04-14 21:27:19.000000000 +0100
+++ base/wwwroot/inc/interface.php	2013-05-16 12:54:16.711661568 +0100
@@ -594,7 +594,7 @@
 }
 
 // Used by renderRack()
-function printObjectDetailsForRenderRack ($object_id)
+function printObjectDetailsForRenderRack ($object_id, $hl_obj_id = 0)
 {
 	$objectData = spotEntity ('object', $object_id);
 	if (strlen ($objectData['asset_no']))
@@ -607,16 +607,80 @@
 		$body = ", visible label is \"${objectData['label']}\"";
 	// Display list of child objects, if any
 	$objectChildren = getEntityRelatives ('children', 'object', $objectData['id']);
+	$slotInfo = Array();
+	$slotData = Array();
+	$slotTitle = Array();
 	if (count($objectChildren) > 0)
 	{
 		foreach ($objectChildren as $child)
+		{
 			$childNames[] = $child['name'];
+			$childData = spotEntity ('object', $child['entity_id']);
+			$attrData = getAttrValues ($child['entity_id']);
+			if ( $attrData['28'] )
+			{
+				$slot = $attrData['28']['value'];
+				$slotInfo[$slot] = $child['name'];
+				$slotData[$slot] = $child['entity_id'];
+				if ( strlen ($childData['asset_no']) )
+					$slotTitle[$slot] = "<div title='${childData['asset_no']}";
+				else
+					$slotTitle[$slot] = "<div title='no asset tag";
+				if ( $child['name'] != $child['label'] and strlen ($child['label']) )
+					$slotTitle[$slot] .= ", visible label is \"${child['label']}\"";
+				$slotTitle[$slot] .= "'>";
+			}
+		}
 		natsort($childNames);
 		$suffix = sprintf(", contains %s'>", implode(', ', $childNames));
 	}
 	else
 		$suffix = "'>";
 	echo "${prefix}${body}${suffix}" . mkA ($objectData['dname'], 'object', $objectData['id']) . '</div>';
+	if ( in_array ($objectData['objtype_id'], array(1502,1503) ) )
+	{
+		$objAttr = getAttrValues ($objectData['id']);
+		if ( isset ($objAttr[2]) )
+		{
+			extractLayout($objAttr[2]);
+			if ( isset ($objAttr[2]['rows'] ) )
+			{
+				echo "<table width='100%' border='1'>";
+				for ($r=0; $r<$objAttr[2]['rows']; $r++)
+				{
+					echo "<tr>";
+					for ( $c=0; $c<$objAttr[2]['cols']; $c++)
+					{
+						$s = ($r * $objAttr[2]['cols']) + $c + 1;
+						if ( $slotData[$s] )
+						{
+							echo "<td class='state_T";
+							if ( $slotData[$s] == $hl_obj_id )
+								echo "h";
+							echo "'>";
+							echo $slotTitle[$s];
+							if ( $objAttr[2]['layout'] == "V" )
+							{
+								$tmp = substr ($slotInfo[$s], 0, 1);
+								foreach ( str_split (substr ($slotInfo[$s],1) ) as $letter )
+									$tmp .= "<br>" . $letter;
+								$slotInfo[$s] = $tmp;
+							}
+							echo mkA ($slotInfo[$s], 'object', $slotData[$s]);
+							echo "</div></td>";
+						}
+						else
+							echo "<td class='state_F'><div title=\"Free slot\">&nbsp;</div></td>";
+					}
+					echo "</tr>";
+				}
+				echo "</table>";
+			}
+			$fh = fopen("/tmp/rackData.lis","w");
+			fwrite($fh, print_r($objAttr, true));
+			fclose($fh);
+		}
+	}
 }
 
 // This function renders rack as HTML table.
@@ -661,7 +725,7 @@
 			switch ($state)
 			{
 				case 'T':
-					printObjectDetailsForRenderRack($rackData[$i][$locidx]['object_id']);
+					printObjectDetailsForRenderRack($rackData[$i][$locidx]['object_id'], $hl_obj_id);
 					break;
 				case 'A':
 					echo '<div title="This rackspace does not exist">&nbsp;</div>';
@@ -1310,8 +1374,22 @@
 	{
 		// rackspace portlet
 		startPortlet ('rackspace allocation');
-		foreach (getResidentRacksData ($object_id, FALSE) as $rack_id)
-			renderRack ($rack_id, $object_id);
+		if ( in_array( $info['objtype_id'], array(4,8) ) ) {
+			$parents = getEntityRelatives ('parents', 'object', $info['id']);
+			if (count ($parents))
+			{
+				foreach ($parents as $parent)
+					foreach (getResidentRacksData($parent['entity_id'], FALSE) as $rack_id)
+						renderRack( $rack_id, $object_id );
+			} 
+			else
+				foreach (getResidentRacksData ($object_id, FALSE) as $rack_id)
+					renderRack ($rack_id, $object_id);
+		}
+		else
+			foreach (getResidentRacksData ($object_id, FALSE) as $rack_id)
+				renderRack ($rack_id, $object_id);
+
 		echo '<br>';
 		finishPortlet();
 	}
