Skip to content

Commit dc3c6a9

Browse files
committed
Do not show OVAL state when no item was found
It doesn't make sense to present OVAL states when no item that would conform to the related OVAL object was found on the system. In other words, the user doesn't have anything to compare the state with.
1 parent 0bc3740 commit dc3c6a9

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

xsl/xccdf-report-oval-details.xsl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Authors:
123123
<xsl:variable name='object_id' select='key("oval-testdef", @test_id)/*[local-name()="object"]/@object_ref'/>
124124
<xsl:variable name='object_info' select='key("oval-objectdef",$object_id)'/>
125125
<xsl:variable name='state_id' select='key("oval-testdef", @test_id)/*[local-name()="state"]/@state_ref'/>
126-
<xsl:variable name='state_info' select='key("oval-statedef",$state_id)'/>
127126
<xsl:variable name='comment' select='$object_info[1]/@comment'/>
128127
<xsl:if test="$object_info">
129128
<h4>
@@ -176,27 +175,6 @@ Authors:
176175
</tr>
177176
</tbody>
178177
</table>
179-
<xsl:if test="$state_info">
180-
<h5>State <strong><xsl:value-of select='$state_id'/></strong> of type
181-
<strong><xsl:value-of select='local-name($state_info)'/></strong></h5>
182-
<table class="table table-striped table-bordered">
183-
<thead>
184-
<xsl:apply-templates mode='item-head' select='$state_info[1]'/>
185-
</thead>
186-
<tbody>
187-
<tr>
188-
<xsl:variable name='variable_id' select='$state_info/*/@var_ref'/>
189-
<xsl:if test='$variable_id'>
190-
<td>
191-
<xsl:apply-templates mode='normal' select='ovalres:tested_variable'/>
192-
<xsl:apply-templates mode='message' select='key("ovalsys-object",$object_id)'/>
193-
</td>
194-
</xsl:if>
195-
<xsl:apply-templates mode='state' select='$state_info[1]'/>
196-
</tr>
197-
</tbody>
198-
</table>
199-
</xsl:if>
200178
</xsl:if>
201179
</xsl:otherwise>
202180
</xsl:choose>

0 commit comments

Comments
 (0)