Skip to content

Commit 51dc9f9

Browse files
committed
Improve printed HTML report
There was a problem that the OVAL details section got cropped if it was longer than 1 page of paper. That happened because the whole OVAL details section was inside a table row (inside <tr> element) and table rows are not allowed by Bootstrap to have a page break inside. Also, it had set display:inline-block which also seems to prevent line breaks. It can be solved by moving the OVAL details section outside the big table and then remove the display:inline-block property from CSS class. The patch also improves padding around the rule details panel body to prevent melding the border lines together, which was very ugly with failed rules where the gray border mixed with the red border.
1 parent d419d8c commit 51dc9f9

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

xsl/xccdf-report-impl.xsl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -847,20 +847,6 @@ Authors:
847847
</xsl:for-each>
848848
</td></tr>
849849
</xsl:if>
850-
<xsl:variable name="check_system_details_ret">
851-
<xsl:call-template name="check-system-details">
852-
<xsl:with-param name="check" select="cdf:check"/>
853-
<xsl:with-param name="oval-tmpl" select="$oval-tmpl"/>
854-
<xsl:with-param name="sce-tmpl" select="$sce-tmpl"/>
855-
<xsl:with-param name="result" select="$result"/>
856-
</xsl:call-template>
857-
</xsl:variable>
858-
859-
<xsl:if test="normalize-space($check_system_details_ret)">
860-
<tr><td colspan="2"><div class="check-system-details">
861-
<xsl:copy-of select="$check_system_details_ret"/>
862-
</div></td></tr>
863-
</xsl:if>
864850
<xsl:if test="cdf:message">
865851
<tr><td colspan="2"><div class="evaluation-messages">
866852
<span class="label label-default"><abbr title="Messages taken from rule-result">Evaluation messages</abbr></span>
@@ -947,6 +933,20 @@ Authors:
947933
<xsl:with-param name="profile" select="$profile"/>
948934
<xsl:with-param name="result" select="$result"/>
949935
</xsl:call-template>
936+
<xsl:variable name="check_system_details_ret">
937+
<xsl:call-template name="check-system-details">
938+
<xsl:with-param name="check" select="cdf:check"/>
939+
<xsl:with-param name="oval-tmpl" select="$oval-tmpl"/>
940+
<xsl:with-param name="sce-tmpl" select="$sce-tmpl"/>
941+
<xsl:with-param name="result" select="$result"/>
942+
</xsl:call-template>
943+
</xsl:variable>
944+
945+
<xsl:if test="normalize-space($check_system_details_ret)">
946+
<div class="check-system-details">
947+
<xsl:copy-of select="$check_system_details_ret"/>
948+
</div>
949+
</xsl:if>
950950
</div>
951951
</div>
952952
</xsl:if>

xsl/xccdf-resources.xsl

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

xsl/xccdf-resources/openscap.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pre
2323
white-space: pre-wrap;
2424
}
2525

26-
div.check-system-details, div.remediation, div.description { display: inline-block; width: 0; min-width: 100%; overflow-x: auto }
26+
div.check-system-details, div.remediation, div.description { width: 0; min-width: 100%; overflow-x: auto }
2727

2828
div.profile-description
2929
{
@@ -54,5 +54,5 @@ div.top-spacer-10
5454
abbr[title] { border: none; text-decoration: none }
5555
div.progress { overflow: visible ; height: auto }
5656
div.progress-bar { width: auto; float: none ; width: auto !important; text-align: left }
57-
div.panel-body { padding: 0px }
57+
div.panel-body { padding: 4px }
5858
}

0 commit comments

Comments
 (0)