From e31338a83ec0bd5e567c7f26d32eaa1b83a6f35f Mon Sep 17 00:00:00 2001
From: andrug <andrug@localhost>
Date: Wed, 16 Apr 2008 14:59:30 +0000
Subject: [PATCH] take into account new updates

---
 opendj-sdk/opends/tests/system-tests/report/result.xsl |   63 ++++++++++++++++++++++---------
 1 files changed, 44 insertions(+), 19 deletions(-)

diff --git a/opendj-sdk/opends/tests/system-tests/report/result.xsl b/opendj-sdk/opends/tests/system-tests/report/result.xsl
index 50249af..eadf554 100755
--- a/opendj-sdk/opends/tests/system-tests/report/result.xsl
+++ b/opendj-sdk/opends/tests/system-tests/report/result.xsl
@@ -481,24 +481,10 @@
         </xsl:when>
         <!--== instance node ==-->
         <xsl:when test="$nodeName = 'instance'">
-          <xsl:variable name="instanceName" select="normalize-space(@name)"/>
-          <xsl:variable name="instanceHost" select="normalize-space(@host)"/>
-          <xsl:variable name="instancePort" select="normalize-space(@port)"/>
-          <xsl:variable name="instanceProduct" 
-                        select="normalize-space(@product)"/>
-          
-          <li>
-            <b>
-              <xsl:value-of select="$phaseName"/> for instance 
-              <font color="blue"><xsl:value-of select="$instanceName"/></font> 
-              on <xsl:value-of select="$instanceHost"/> :
-              <xsl:value-of select="$instancePort"/>
-              (<xsl:value-of select="$instanceProduct" />)
-            </b><br/>
-            
-            <xsl:call-template name="parseChildPhase" />
-            
-          </li><br/><br/>
+          <xsl:call-template name="displayInstance" >
+            <xsl:with-param name="actionName" select="$phaseName" />
+          </xsl:call-template>
+          <br/>
         </xsl:when>
         <!--== client node ==-->
         <xsl:when test="$nodeName = 'client'">
@@ -541,6 +527,7 @@
 <!-- ================= Manage phase node childs ================ -->
 <xsl:template name="parseChildPhase">
   <!--== Generic sub childs can be a operation/operationResult/... nodes ==-->
+  <xsl:variable name="parentNodeName" select="normalize-space(@name)"/>
   <ul>
     <xsl:for-each select="child::*"> 
       <xsl:variable name="nodeName" select="normalize-space(local-name(.))"/>
@@ -560,6 +547,11 @@
         <xsl:when test="$nodeName = 'client'">
           <xsl:call-template name="displayClient" />
         </xsl:when>
+        <xsl:when test="$nodeName = 'instance'">
+          <xsl:call-template name="displayInstance" >
+            <xsl:with-param name="actionName" select="$parentNodeName" />
+          </xsl:call-template>
+        </xsl:when>
         
         <!--== Nothing to do, just for node recognition ==-->
         <xsl:when test="$nodeName = 'instances'">
@@ -586,10 +578,43 @@
 </xsl:template>
 
 
+
+<!-- ================= Manage instance node ================ -->
+<xsl:template name="displayInstance">
+  <xsl:param name="actionName"/>
+
+  <xsl:variable name="instanceName" select="normalize-space(@name)"/>
+  <xsl:variable name="instanceHost" select="normalize-space(@host)"/>
+  <xsl:variable name="instancePort" select="normalize-space(@port)"/>
+  <xsl:variable name="instanceProduct" 
+                select="normalize-space(@product)"/>
+
+  <li>
+    <b>
+      <xsl:value-of select="$actionName"/> for instance 
+      <font color="blue"><xsl:value-of select="$instanceName"/></font> 
+      on <xsl:value-of select="$instanceHost"/> :
+      <xsl:value-of select="$instancePort"/>
+      (<xsl:value-of select="$instanceProduct" />)
+    </b><br/>
+    
+    <xsl:call-template name="parseChildPhase" />
+    
+  </li><br/>
+</xsl:template>
+
 <!-- ================= Manage module node ================ -->
 <xsl:template name="displayModule">
   
-  <li> <b>Module</b> : <xsl:value-of select="normalize-space(@name)"/> <br/>
+  <li> <b>Module</b> : <xsl:value-of select="normalize-space(@name)"/> 
+      <xsl:variable name="moduleStatus" select="normalize-space(@enabled)"/>
+      <xsl:choose>
+        <xsl:when test="$moduleStatus='true'">
+          <i> (enabled)</i>
+        </xsl:when>
+        <xsl:otherwise><i> (disabled)</i></xsl:otherwise>
+      </xsl:choose>
+      <br/>
       <xsl:call-template name="parseChildPhase" />
   </li><br/>
 </xsl:template>

--
Gitblit v1.10.0