report.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. <tr>
  32. <th>Temps de traitement</th>
  33. <td>{{ report['exec_time'] }}</td>
  34. </tr>
  35. </table>
  36. <h3>Check-Points</h3>
  37. <table style="border: none;">
  38. {% for chk in report['checkpoints'] %}
  39. <tr>
  40. {%- if chk['valid'] -%}
  41. <th><i class="fa fa-check valid"></i></th> <td>{{ chk['name'] }}</td>
  42. {% else %}
  43. <th><i class="fa fa-times error"></i></th> <td>{{ chk['name'] }}</td>
  44. {% endif %}
  45. </tr>
  46. {% endfor %}
  47. </table>
  48. {%- if report['errors'] -%}
  49. <h3>Détail des erreurs</h3>
  50. <table class="datatable cell-border display compact stripe">
  51. <thead>
  52. <tr>
  53. <th>Erreur</th>
  54. <th>Fichier</th>
  55. <th>Champs</th>
  56. <th>Description</th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. {% for typeerr in report['errors'] %}
  61. {% for err in report['errors'][typeerr]['list'] %}
  62. <tr>
  63. <td data-sort='{{ report['errors'][typeerr]['order_'] }}'>{{ typeerr }}</td>
  64. <td>{{ err['filename'] }}</td>
  65. <td>{{ err['field'] }}</td>
  66. <td>{{ err['message'] }}</td>
  67. </tr>
  68. {% endfor %}
  69. {% endfor %}
  70. </tbody>
  71. </table>
  72. {% endif %}
  73. </section>
  74. </body>
  75. </html>