View Issue Details

IDProjectCategoryView StatusLast Update
1071RackTablesVMs/containerspublic2013-11-13 17:18
Reportermbrydon Assigned ToMWilkinson  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version12.04
Product Version0.20.5 
Target Version0.20.6Fixed in Version0.20.6 
Summary1071: Selecting a blade in a chassis as having problems does not change the colour when the rack/chassis is rendered
DescriptionIf the has problems checkbox is selected the blade will not show up red as a server object in a rack would
Steps To ReproduceAdd a blade to a slot in a chassis, check the 'has problems' box yet the cell background never changes
TagsNo tags attached.

Activities

adoom42

adoom42

2013-11-13 00:22

administrator   ~0001943

Mark, you improved the way blade servers are displayed. Would you please work on this?
MWilkinson

MWilkinson

2013-11-13 10:18

reporter   ~0001945

Pull request 44 fixes this issue in the same way that normal servers are highlighted when the 'has_problems' checkbox is checked. If the object in question is also the selected object for highlighting, this will override the warning highlight as per standard servers.

Patch attached for use by users wanting the fix before release 0.20.6
adoom42

adoom42

2013-11-13 17:18

administrator  

bug_1071.patch (1,676 bytes)   
diff --git a/wwwroot/inc/interface.php b/wwwroot/inc/interface.php
index 4233549..1218ce9 100644
--- a/wwwroot/inc/interface.php
+++ b/wwwroot/inc/interface.php
@@ -684,7 +684,7 @@ function printObjectDetailsForRenderRack ($object_id, $hl_obj_id = 0)
 		$body = ", visible label is \"${objectData['label']}\"";
 	// Display list of child objects, if any
 	$objectChildren = getEntityRelatives ('children', 'object', $objectData['id']);
-	$slotRows = $slotCols = $slotInfo = $slotData = $slotTitle = array ();
+	$slotRows = $slotCols = $slotInfo = $slotData = $slotTitle = $slotClass = array ();
 	if (count($objectChildren) > 0)
 	{
 		foreach ($objectChildren as $child)
@@ -718,6 +718,11 @@ function printObjectDetailsForRenderRack ($object_id, $hl_obj_id = 0)
 				if (strlen ($childData['label']) and $childData['label'] != $child['name'])
 					$slotTitle[$slot] .= ", visible label is \"${childData['label']}\"";
 				$slotTitle[$slot] .= "'>";
+				$slotClass[$slot] = "state_T";
+				if ( $childData['has_problems'] == 'yes' )
+					$slotClass[$slot] = "state_Tw";
+				if ( $child['entity_id'] == $hl_obj_id )
+					$slotClass[$slot] = "state_Th";
 			}
 		}
 		natsort($childNames);
@@ -760,10 +765,7 @@ function printObjectDetailsForRenderRack ($object_id, $hl_obj_id = 0)
 									echo " rowspan=$slotRows[$s]";
 								if ($slotCols[$s] > 1)
 									echo " colspan=$slotCols[$s]";
-								echo " class='state_T";
-								if ($slotData[$s] == $hl_obj_id)
-									echo 'h';
-								echo "'>${slotTitle[$s]}";
+								echo " class='${slotClass[$s]}'>${slotTitle[$s]}";
 								if ($layout == 'V')
 								{
 									$tmp = substr ($slotInfo[$s], 0, 1);
bug_1071.patch (1,676 bytes)   
adoom42

adoom42

2013-11-13 17:18

administrator   ~0001947

Thanks, Mark. The patch has been merged.

Issue History

Date Modified Username Field Change
2013-11-13 00:18 mbrydon New Issue
2013-11-13 00:18 mbrydon Status new => assigned
2013-11-13 00:18 mbrydon Assigned To => adoom42
2013-11-13 00:22 adoom42 Note Added: 0001943
2013-11-13 00:22 adoom42 Assigned To adoom42 => MWilkinson
2013-11-13 10:18 MWilkinson Note Added: 0001945
2013-11-13 10:18 MWilkinson Fixed in Version => 0.20.6
2013-11-13 10:18 MWilkinson Target Version => 0.20.6
2013-11-13 10:19 MWilkinson File Added: bug_1071.patch
2013-11-13 17:18 adoom42 File Deleted: bug_1071.patch
2013-11-13 17:18 adoom42 File Added: bug_1071.patch
2013-11-13 17:18 adoom42 Note Added: 0001947
2013-11-13 17:18 adoom42 Status assigned => closed
2013-11-13 17:18 adoom42 Resolution open => fixed