File: controls-template.html

package info (click to toggle)
scap-security-guide 0.1.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 110,644 kB
  • sloc: xml: 241,883; sh: 73,777; python: 32,527; makefile: 27
file content (48 lines) | stat: -rw-r--r-- 1,491 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{{% extends "html-template.html" %}}

{{% block body %}}
{{{ super() }}}

{{% if policy.source %}}
based on <a href="{{{ policy.source }}}">{{{ policy.source }}}</a>
{{% endif %}}

<div class="all_controls">
{{% for control in policy.controls -%}}
<div class="one_control">
  <h2>{{{ control.id }}}: {{{ control.title }}}</h2>
  <p>Description: {{{ control.description | safe }}}</p>
  Levels: 
  <ul>
    {{%- for level in control.levels -%}}
    <li>{{{ level }}}</li>
    {{%- endfor %}}
  </ul>
  <p>Automated: {{{ control.automated }}}</p>
  {{% if control.selections -%}}
  Selections:
  <ul>
    {{%- for selection in control.selections|sort -%}}
    {{%- if '=' in selection %}}
    {{% set value_id, value = selection.split('=') %}}
    {{%- if value_id in values %}}
    <li><a href="https://github.com/ComplianceAsCode/content/tree/master/{{{ values[value_id].relative_definition_location }}}">{{{ value_id }}}</a> = {{{ value }}}</li>
    {{%- endif -%}}
    {{%- else %}}
    {{%- if selection in rules %}}
    <li><a href="https://github.com/ComplianceAsCode/content/tree/master/{{{ rules[selection].relative_definition_location }}}">{{{ selection }}}</a>: {{{ rules[selection].title }}}</li>
    {{%- else %}}
    <li>{{{ selection }}} - not available for this product</li>
    {{%- endif -%}}
    {{%- endif -%}}
    {{%- endfor %}}
  </ul>
  {{% else -%}}
  <p>
  <strong>No rules selected</strong>
  </p>
  {{%- endif %}}
</div>  
{{% endfor -%}}
</div>  
{{% endblock %}}