diff -uNr RackTables-0.20.3-orig/wwwroot/css/pi.css RackTables-0.20.3-dev/wwwroot/css/pi.css
--- RackTables-0.20.3-orig/wwwroot/css/pi.css	2012-12-19 16:30:47.000000000 +0000
+++ RackTables-0.20.3-dev/wwwroot/css/pi.css	2013-02-12 16:28:19.499575592 +0000
@@ -15,6 +15,11 @@
 	width: 200px;
 }
 
+.chassis {
+	width: 100%;
+	height: 100%;
+}
+
 .molecule {
 	font: bold 12px Verdana, sans-serif;
 	border: 1px solid black;
diff -uNr RackTables-0.20.3-orig/wwwroot/inc/interface.php RackTables-0.20.3-dev/wwwroot/inc/interface.php
--- RackTables-0.20.3-orig/wwwroot/inc/interface.php	2012-12-19 16:30:47.000000000 +0000
+++ RackTables-0.20.3-dev/wwwroot/inc/interface.php	2013-02-13 10:21:35.889569068 +0000
@@ -600,7 +600,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']))
@@ -613,10 +613,29 @@
 		$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 \"${objectData['label']}\"";
+				$slotTitle[$slot] .= "'>";
+			}
+		}
 		natsort($childNames);
 		$suffix = sprintf(", contains %s'>", implode(', ', $childNames));
 	}
@@ -624,6 +643,48 @@
 		$suffix = "'>";
 	echo $prefix . $body . $suffix;
 	echo "<a href='".makeHref(array('page'=>'object', 'object_id'=>$objectData['id']))."'>${objectData['dname']}</a></div>";
+        if ( $objectData['objtype_id'] == 1502 )
+	{
+        	$objectAttr = getAttrValues($objectData['id']);
+		$oRows = 0;
+		$oCols = 0;
+		foreach ($objectAttr as $attr)
+		{
+			if ($attr['name'] == 'Num Rows' )
+				$oRows = $attr['value'];
+			if ($attr['name'] == 'Num Cols' )
+				$oCols = $attr['value'];
+		}
+		echo "<table class='chassis' border='1'>";
+		for ($rRow=0; $rRow<$oRows; $rRow++)
+		{
+			echo "<tr>";
+			for ($rCol=0; $rCol<$oCols; $rCol++)
+			{
+				$slot = ($rRow * $oCols) + $rCol + 1;
+                                if ($slotData[$slot])
+				{
+					echo "<td class='state_T";
+                                        if ( $slotData[$slot] == $hl_obj_id )
+                                          echo "h";
+                                        echo "'>";
+					echo $slotTitle[$slot];
+					echo "<a href='".makeHref(array('page'=>'object', 'object_id'=>$slotData[$slot]))."'>";
+					foreach ( str_split($slotInfo[$slot]) as $letter ) {
+						echo $letter . "<br>";
+					}
+					echo "</a></div>";
+					echo "</td>";
+				}
+				else
+				{
+					echo "<td class='state_F'><div title=\"Free rackspace\">&nbsp;</div></td>";
+				}
+			}
+			echo "</tr>";
+		}
+		echo "</table>";
+	}
 }
 
 // This function renders rack as HTML table.
@@ -677,7 +738,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>';
@@ -1326,8 +1387,21 @@
 	{
 		// rackspace portlet
 		startPortlet ('rackspace allocation');
-		foreach (getResidentRacksData ($object_id, FALSE) as $rack_id)
-			renderRack ($rack_id, $object_id);
+               if ( $info['objtype_id'] == 4 ) {
+                        $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();
 	}
