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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 30 15:51:38 CET 2011


Author: mattm
Date: 2011-11-30 15:51:37 +0100 (Wed, 30 Nov 2011)
New Revision: 12226

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/html/omp.xsl
Log:
	* src/html/omp.xsl (report [assets]): Only enable the Prognostic Report
	icon when there is a prognosis.

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2011-11-30 14:27:10 UTC (rev 12225)
+++ trunk/gsa/ChangeLog	2011-11-30 14:51:37 UTC (rev 12226)
@@ -1,5 +1,10 @@
 2011-11-30  Matthew Mundell <matthew.mundell at greenbone.net>
 
+	* src/html/omp.xsl (report [assets]): Only enable the Prognostic Report
+	icon when there is a prognosis.
+
+2011-11-30  Matthew Mundell <matthew.mundell at greenbone.net>
+
 	* src/gsad.c (init_validator): Allow space around numbers.
 	(params_mhd_validate_values, params_mhd_validate): If the rule is "number"
 	or an alias for "number", then strip any leading and trailing space from

Modified: trunk/gsa/src/html/omp.xsl
===================================================================
--- trunk/gsa/src/html/omp.xsl	2011-11-30 14:27:10 UTC (rev 12225)
+++ trunk/gsa/src/html/omp.xsl	2011-11-30 14:51:37 UTC (rev 12226)
@@ -12620,12 +12620,14 @@
           <xsl:value-of select="detail[name = 'report_count' and source/name = 'openvasmd']/value"/>
         </td>
         <td>
+          <xsl:variable name="threat"
+                        select="detail[name = 'prognosis']/value"/>
           <a href="/omp?cmd=get_report&amp;type=assets&amp;host={ip}&amp;pos=1&amp;search_phrase={../filters/phrase}&amp;levels={gsa:build-levels(../filters)}&amp;first_result={../hosts/@start}&amp;max_results={../hosts/@max}&amp;overrides={../filters/apply_overrides}&amp;token={/envelope/token}"
              title="Host Details" style="margin-left:3px;">
             <img src="/img/details.png" border="0" alt="Details"/>
           </a>
           <xsl:choose>
-            <xsl:when test="count (detail[name = 'App'])=0">
+            <xsl:when test="(count (detail[name = 'App']) = 0) or (string-length ($threat) = 0)">
               <img src="/img/prognosis_inactive.png" border="0" alt="Prognostic Report"
                    style="margin-left:3px;"/>
             </xsl:when>



More information about the Openvas-commits mailing list