You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this commit we will leverage the reference URI-to-title mapping
within the `xccdf:Benchmark` element to visually improve the references
in HTML guide and report.
This improvements needs SCAP content to contain reference URI-to-title
mapping within the `xccdf:Benchmark` element to work nicely. The
ComplianceAsCode content upstream project started to provide this
mapping in the SCAP content recently, starting from
62513c391dc5a3fafd12741bd02565ca0e1e8db2.
However, the enhancement is compatible with SCAP content that doesn't
contain the reference URI-to-title mapping. If this mapping isn't
present, URIs are shown instead of titles in the HTML guides and report.
But it still provides a singificant UX improvement.
Moreover, the `Group by` dropdown feature will now also use the
URI-to-title mapping in the content as an additional source of dropdown
labels next to the hardcoded list. That means that addition of new reference
type to ComplianceAsCode will no longer require a need to update
OpenSCAP code to get nice labels for the new type to the `Group by` dropdown.
<spanclass="label label-info"title="A globally meaningful identifiers for this rule. MAY be the name or identifier of a security configuration issue or vulnerability that the rule remediates. By setting an identifier on a rule, the benchmark author effectively declares that the rule instantiates, implements, or remediates the issue for which the name was assigned.">Identifiers:</span> 
111
-
<xsl:for-eachselect="$item/cdf:ident">
112
-
<xsl:apply-templatesmode="ident"select="."/>
113
-
<xsl:iftest="position() != last()">, </xsl:if>
114
-
</xsl:for-each>
115
-
</p>
89
+
<tr>
90
+
<td>
91
+
<spanclass="label label-info"title="A globally meaningful identifiers for this rule. MAY be the name or identifier of a security configuration issue or vulnerability that the rule remediates. By setting an identifier on a rule, the benchmark author effectively declares that the rule instantiates, implements, or remediates the issue for which the name was assigned.">Identifiers:</span>
92
+
</td>
93
+
<tdclass="identifiers">
94
+
<xsl:call-templatename="item-idents">
95
+
<xsl:with-paramname="item"select="$item"/>
96
+
</xsl:call-template>
97
+
</td>
98
+
</tr>
116
99
</xsl:if>
117
100
<xsl:iftest="$item/cdf:reference">
101
+
<tr>
102
+
<td>
103
+
<spanclass="label label-default"title="Provide a reference to a document or resource where the user can learn more about the subject of the Rule or Group.">References:</span>
104
+
</td>
105
+
<tdclass="identifiers">
106
+
<xsl:call-templatename="item-refs">
107
+
<xsl:with-paramname="item"select="$item"/>
108
+
</xsl:call-template>
109
+
</td>
110
+
</tr>
111
+
</xsl:if>
112
+
</xsl:template>
113
+
114
+
<xsl:templatename="item-idents">
115
+
<xsl:paramname="item"/>
118
116
<p>
119
-
<spanclass="label label-default"title="Provide a reference to a document or resource where the user can learn more about the subject of the Rule or Group.">References:</span> 
0 commit comments