report.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <title>{{ report['title'] }}</title>
  5. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='font-awesome-4.7.0/css/font-awesome.min.css') }}">
  6. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='jquery-ui/jquery-ui.min.css') }}"/>
  7. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='DataTables/datatables.min.css') }}"/>
  8. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='datachecker.css') }}"/>
  9. <script type="text/javascript" src="{{ url_for('static', filename='jquery-3.3.1.min.js') }}"></script>
  10. <script type="text/javascript" src="{{ url_for('static', filename='jquery-ui/jquery-ui.min.js') }}"></script>
  11. <script type="text/javascript" src="{{ url_for('static', filename='DataTables/datatables.min.js') }}"></script>
  12. <script type="text/javascript" src="{{ url_for('static', filename='datachecker.js') }}"> </script>
  13. </head>
  14. <body>
  15. <header>
  16. <a id="logo" href="\" title="Retour à l'accueil">
  17. <img src="{{ url_for('static', filename='mn_logo_mini.png') }}" />
  18. </a>
  19. <h1>Rapport de contrôle</h1>
  20. </header>
  21. <section id=main>
  22. <table style="text-align: left;">
  23. <tr>
  24. <th style="width: 150px;">Schéma</th>
  25. <td>{{ report['schema'] }}</td>
  26. </tr>
  27. <tr>
  28. <th>Fichier contrôlé</th>
  29. <td>{{ report['filename'] }}</td>
  30. </tr>
  31. </table>
  32. <h3>Check-Points</h3>
  33. <ul>
  34. {% for chk in report['checkpoints'] %}
  35. {%- if chk['valid'] -%}
  36. <li><i class="fa fa-check valid"></i> <span>{{ chk['name'] }}</span></li>
  37. {% else %}
  38. <li><i class="fa fa-times error"></i> <span>{{ chk['name'] }}</span></li>
  39. {% endif %}
  40. {% endfor %}
  41. </ul>
  42. {%- if report['errors'] -%}
  43. <h3>Détail des erreurs</h3>
  44. <table class="datatable cell-border display compact stripe">
  45. <thead>
  46. <tr>
  47. <th>Erreur</th>
  48. <th>Fichier</th>
  49. <th>Champs</th>
  50. <th>Description</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. {% for typeerr in report['errors'] %}
  55. {% for err in report['errors'][typeerr]['list'] %}
  56. <tr>
  57. <td>{{ typeerr }}</td>
  58. <td>{{ err['filename'] }}</td>
  59. <td>{{ err['field'] }}</td>
  60. <td>{{ err['message'] }}</td>
  61. </tr>
  62. {% endfor %}
  63. {% endfor %}
  64. </tbody>
  65. </table>
  66. {% endif %}
  67. </section>
  68. </body>
  69. </html>