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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Nov 24 15:53:45 CET 2011


Author: mattm
Date: 2011-11-24 15:53:43 +0100 (Thu, 24 Nov 2011)
New Revision: 12188

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/gsad_omp.c
   trunk/gsa/src/html/omp.xsl
Log:
	* src/gsad_omp.c (save_note_omp): Add missing days init.

	* src/html/omp.xsl (html-edit-note-form): Correct tag name.
	(note [details]): When note is off put "when Active" in heading.
	(result-detailed): Only show active notes.

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2011-11-24 14:35:55 UTC (rev 12187)
+++ trunk/gsa/ChangeLog	2011-11-24 14:53:43 UTC (rev 12188)
@@ -1,3 +1,11 @@
+2011-11-24  Matthew Mundell <matthew.mundell at greenbone.net>
+
+	* src/gsad_omp.c (save_note_omp): Add missing days init.
+
+	* src/html/omp.xsl (html-edit-note-form): Correct tag name.
+	(note [details]): When note is off put "when Active" in heading.
+	(result-detailed): Only show active notes.
+
 2011-11-23  Matthew Mundell <matthew.mundell at greenbone.net>
 
 	* src/gsad_omp.c (get_result): Set both overrides OMP flags from the

Modified: trunk/gsa/src/gsad_omp.c
===================================================================
--- trunk/gsa/src/gsad_omp.c	2011-11-24 14:35:55 UTC (rev 12187)
+++ trunk/gsa/src/gsad_omp.c	2011-11-24 14:53:43 UTC (rev 12188)
@@ -9878,6 +9878,7 @@
   task_name = params_value (params, "name");
   result_id = params_value (params, "result_id");
   active = params_value (params, "active");
+  days = params_value (params, "days");
 
   if (next == NULL || note_task_id == NULL || note_result_id == NULL
       || active == NULL)
@@ -9905,7 +9906,8 @@
       || text == NULL
       || hosts == NULL
       || port == NULL
-      || threat == NULL)
+      || threat == NULL
+      || days == NULL)
     return gsad_message (credentials,
                          "Internal error", __FUNCTION__, __LINE__,
                          "An internal error occurred while saving a note. "

Modified: trunk/gsa/src/html/omp.xsl
===================================================================
--- trunk/gsa/src/html/omp.xsl	2011-11-24 14:35:55 UTC (rev 12187)
+++ trunk/gsa/src/html/omp.xsl	2011-11-24 14:53:43 UTC (rev 12188)
@@ -9126,7 +9126,7 @@
             <td valign="center">Active</td>
             <td>
               <xsl:choose>
-                <xsl:when test="get_overrides_response/override/active='1' and string-length(get_overrides_response/override/end_time) &gt; 0">
+                <xsl:when test="get_notes_response/note/active='1' and string-length(get_notes_response/note/end_time) &gt; 0">
                   <div>
                     <input type="radio" name="active" value="-1"/>
                     yes, always
@@ -9134,7 +9134,7 @@
                   <div>
                     <input type="radio" name="active" value="-2" checked="1"/>
                     yes, until
-                    <xsl:value-of select="get_overrides_response/override/end_time"/>
+                    <xsl:value-of select="get_notes_response/note/end_time"/>
                   </div>
                   <div>
                     <input type="radio" name="active" value="1"/>
@@ -9147,7 +9147,7 @@
                     no
                   </div>
                 </xsl:when>
-                <xsl:when test="get_overrides_response/override/active='1'">
+                <xsl:when test="get_notes_response/note/active='1'">
                   <div>
                     <input type="radio" name="active" value="-1" checked="1"/>
                     yes, always
@@ -9605,7 +9605,14 @@
         </tr>
       </table>
 
-      <h1>Appearance</h1>
+      <xsl:choose>
+        <xsl:when test="active = '0'">
+          <h1>Appearance when Active</h1>
+        </xsl:when>
+        <xsl:otherwise>
+          <h1>Appearance</h1>
+        </xsl:otherwise>
+      </xsl:choose>
       <div class="note_top_line"></div>
       <xsl:call-template name="note-detailed">
         <xsl:with-param name="note-buttons">0</xsl:with-param>
@@ -12177,32 +12184,44 @@
   </xsl:variable>
   <a class="anchor" name="notes-{@id}"/>
   <xsl:for-each select="notes/note">
-    <xsl:call-template name="note-detailed">
-      <xsl:with-param name="note-buttons">
-        <xsl:value-of select="$note-buttons"/>
-      </xsl:with-param>
-      <xsl:with-param name="delta" select="$delta"/>
-      <xsl:with-param name="next">
-        <xsl:choose>
-          <xsl:when test="$result-details">get_result</xsl:when>
-          <xsl:otherwise>get_report</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
+    <xsl:choose>
+      <xsl:when test="active = 0">
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="note-detailed">
+          <xsl:with-param name="note-buttons">
+            <xsl:value-of select="$note-buttons"/>
+          </xsl:with-param>
+          <xsl:with-param name="delta" select="$delta"/>
+          <xsl:with-param name="next">
+            <xsl:choose>
+              <xsl:when test="$result-details">get_result</xsl:when>
+              <xsl:otherwise>get_report</xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:for-each>
   <xsl:for-each select="delta/notes/note">
-    <xsl:call-template name="note-detailed">
-      <xsl:with-param name="note-buttons">
-        <xsl:value-of select="$note-buttons"/>
-      </xsl:with-param>
-      <xsl:with-param name="delta" select="2"/>
-      <xsl:with-param name="next">
-        <xsl:choose>
-          <xsl:when test="$result-details">get_result</xsl:when>
-          <xsl:otherwise>get_report</xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
+    <xsl:choose>
+      <xsl:when test="active = 0">
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="note-detailed">
+          <xsl:with-param name="note-buttons">
+            <xsl:value-of select="$note-buttons"/>
+          </xsl:with-param>
+          <xsl:with-param name="delta" select="2"/>
+          <xsl:with-param name="next">
+            <xsl:choose>
+              <xsl:when test="$result-details">get_result</xsl:when>
+              <xsl:otherwise>get_report</xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:for-each>
   <xsl:choose>
     <xsl:when test="$show-overrides = 1 or ../../filters/apply_overrides = 1">



More information about the Openvas-commits mailing list