{# Copyright 2022, Red Hat, Inc. #}
{# SPDX-License-Identifier: LGPL-2.1-or-later #}
{% extends 'base_report.html' %}

{% block interactive_script %}
<script>
    {%- include './js/interactive_script.js' -%}
</script>
{% endblock %}

{% block oval_graph_generation_script %}
<script>
    {%- include './js/oval_graph_generation_script.js' -%}
</script>
{% endblock %}

{% block debug_script %}
<script>
    {%- include './js/debug_script.js' -%}
</script>
{% endblock %}

{% block patternfly_css %}
{% if  debug_setting.use_online_css %}
 <link rel="stylesheet" href="https://unpkg.com/@patternfly/patternfly/patternfly.css" crossorigin="anonymous">
{% else %}
<style>
    {%- include './css/patternfly.css' -%}
</style>
{% endif %}
{% endblock %}

{% block style %}
<style>
    {%- include './css/style.css' -%}
</style>
{% endblock %}

{% block title%}SCAP Evaluation Report{% endblock %}

{% block content %}

{% if report.profile_info.title|length and report.profile_info.description|length -%}
<h2 id="top" class="pf-c-title pf-m-3xl">About profile</h2>
<br>
{% include 'profile_info.html' %}
<br>
{%- endif -%}

<h2 class="pf-c-title pf-m-3xl">Compliance and Scoring</h2>
<br>
{% set rule_result_stats = report.get_rule_results_stats() %}
{% include 'summary_banner.html' %}
<br>
<div class="row_with_statistic_of_scan">
    <div class="column_with_statistic_of_scan">
        <h2 class="pf-c-title pf-m-2xl">Rule results</h2>
        <br>
        {% include 'rule_results.html' %}
    </div>
{% if report.get_failed_rules()|length != 0 %}
    <div class="column_with_statistic_of_scan">
        <h2 class="pf-c-title pf-m-2xl">Severity of failed rules</h2>
        <br>
        {% include 'severity_of_failed_rules.html'%}
    </div>
{% endif %}
</div>
<br>
<div class="tooltip-wrapper" style="position: relative;">
    <h2 class="pf-c-title pf-m-2xl">Score&nbsp;<i class="pf-icon pf-icon-help" aria-hidden="true"></i></h2>
    <div class="pf-c-tooltip pf-m-right-top tooltip-box-right-side tooltip-box-score-position" role="tooltip">
        <div class="pf-c-tooltip__arrow"></div>
        <div class="pf-c-tooltip__content tooltip__content-width">{{ report.scan_result.get_explanation_of_score_computation() }}</div>
    </div>
</div>

{% include 'score_bar.html' %}
<br>

<br>
{% include 'evaluation_characteristics.html' %}
<br>
<h2 class="pf-c-title pf-m-3xl">Rule Overview</h2>
<br>
{% include 'search_input.html' %}
<br>
{% include 'rules_overview.html' %}
<hr>
{% endblock %}
