[Openvas-commits] r11621 - in trunk/gsa: . src/html

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 16 11:09:57 CEST 2011


Author: hdoreau
Date: 2011-09-16 11:09:56 +0200 (Fri, 16 Sep 2011)
New Revision: 11621

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/html/omp.xsl
Log:
* src/html/omp.xsl (host): Add hardware information table.


Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2011-09-15 18:30:29 UTC (rev 11620)
+++ trunk/gsa/ChangeLog	2011-09-16 09:09:56 UTC (rev 11621)
@@ -1,3 +1,7 @@
+2011-09-16  Henri Doreau <henri.doreau at greenbone.net>
+
+	* src/html/omp.xsl (host): Add hardware information table.
+
 2011-09-15  Matthew Mundell <matthew.mundell at greenbone.net>
 
 	* src/gsad.c (init_validator): Add host filters.

Modified: trunk/gsa/src/html/omp.xsl
===================================================================
--- trunk/gsa/src/html/omp.xsl	2011-09-15 18:30:29 UTC (rev 11620)
+++ trunk/gsa/src/html/omp.xsl	2011-09-16 09:09:56 UTC (rev 11621)
@@ -10492,6 +10492,44 @@
           </td>
         </tr>
       </table>
+      <xsl:choose>
+        <xsl:when test="count (detail[name = 'cpuinfo']) = 0 and count (detail[name = 'meminfo']) = 0 and count (detail[name = 'netinfo']) = 0">
+          <h1>Hardware: Information not available</h1>
+        </xsl:when>
+        <xsl:otherwise>
+          <h1>Hardware</h1>
+          <table class="gbntable" cellspacing="2" cellpadding="4">
+            <tr class="gbntablehead2">
+              <td>Component</td>
+              <td>Values</td>
+            </tr>
+            <xsl:if test="count (detail[name = 'cpuinfo']) > 0">
+              <tr>
+                <td>CPU</td>
+                <td><xsl:value-of select="detail[name = 'cpuinfo']/value"/></td>
+              </tr>
+            </xsl:if>
+            <xsl:if test="count (detail[name = 'meminfo']) > 0">
+              <tr>
+                <td>Memory</td>
+                <td><xsl:value-of select="detail[name = 'meminfo']/value"/></td>
+              </tr>
+            </xsl:if>
+            <xsl:if test="count (detail[name = 'netinfo']) > 0">
+              <tr>
+                <td>Net</td>
+                <td>
+                  <table>
+                    <xsl:for-each select="str:split(detail[name = 'netinfo']/value, '\n')">
+                      <tr><td><xsl:value-of select="."/></td></tr>
+                    </xsl:for-each>
+                  </table>
+                </td>
+              </tr>
+            </xsl:if>
+          </table>
+        </xsl:otherwise>
+      </xsl:choose>
 
       <xsl:choose>
         <xsl:when test="count (detail[name = 'App']) = 0">



More information about the Openvas-commits mailing list