Skip to content

Commit 07ccfbe

Browse files
authored
Merge pull request #1452 from jan-cerny/printed_html
Improve printed HTML report
2 parents 43bb99a + 51dc9f9 commit 07ccfbe

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

xsl/xccdf-report-impl.xsl

Lines changed: 16 additions & 16 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>
@@ -891,7 +877,7 @@ Authors:
891877
</div></td></tr>
892878
</xsl:for-each>
893879
<xsl:for-each select="$item/cdf:fix">
894-
<tr><td colspan="2"><div class="remediation">
880+
<tr class="noprint"><td colspan="2"><div class="remediation">
895881
<xsl:call-template name="show-fix">
896882
<xsl:with-param name="fix" select="."/>
897883
<xsl:with-param name="testresult" select="$testresult"/>
@@ -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>
@@ -991,7 +991,7 @@ Authors:
991991
<xsl:with-param name="item" select="$benchmark"/>
992992
<xsl:with-param name="profile" select="$profile"/>
993993
</xsl:call-template>
994-
<a href="#result-details"><button type="button" class="btn btn-secondary">Scroll back to the first rule</button></a>
994+
<a href="#result-details"><button type="button" class="btn btn-secondary noprint">Scroll back to the first rule</button></a>
995995
</div>
996996
</xsl:template>
997997

xsl/xccdf-resources.xsl

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

xsl/xccdf-resources/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

xsl/xccdf-resources/openscap.css

Lines changed: 7 additions & 5 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
{
@@ -48,9 +48,11 @@ div.top-spacer-10
4848

4949
@media print
5050
{
51+
.noprint { display: none }
52+
.label { border: none; padding: 0px }
5153
.container { width: 100% }
52-
/* ":after" instead of "::after" is used for compatibility with IE8 */
53-
.rule-result abbr[title]:after { content: "" }
54-
.identifiers abbr[title]:after { content: "" }
55-
.identifiers a[href]:after { content: "" }
54+
abbr[title] { border: none; text-decoration: none }
55+
div.progress { overflow: visible ; height: auto }
56+
div.progress-bar { width: auto; float: none ; width: auto !important; text-align: left }
57+
div.panel-body { padding: 4px }
5658
}

0 commit comments

Comments
 (0)