validation_report.html 1.38 KB
Newer Older
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62
{% extends "base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}
{% block content %}
<h1>{{ title }}</h1>

<div class="card bg-faded" style="width: 30rem;">
    <div class="card-body">
        <h5 class="card-title">
            Schéma {{ val_info.code }}
            <span class="badge badge-primary">{{ val_info.version }}</span>
        </h5>
        <h6 class="card-subtitle mb-2 text-muted">{{ val_info.description }}</h6>
        <p class="text">
            {% if source_type == 'file' %}Fichier{% endif %}
            {% if source_type == 'url' %}URL{% endif %}
            à valider : {{ source }}
        </p>
    </div>
</div>

<h2>Aperçu</h2>
<table class="table table-striped table-bordered">
    <thead>
        <tr>
            {% for col in preview.header %}
            <th scope="col">{{ col }}</th>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for row in preview.data_rows %}
        <tr>
            {% for val in row %}
            <td>{{ val }}</td>
            {% endfor %}
        </tr>
        {% endfor %}
    </tbody>
</table>


{% if report.valid %}
<h2>La table est valide</h2>
<p>Aucune erreur détectée</p>
{% else %}
<h2>La table est invalide</h2>
<p>{{ report['error-count'] }} erreur(s) détectée(s)</p>
{% endif %}




<pre>
{{ report_str }}
</pre>

{% endblock %}
{% block footer %}
{% endblock %}