report.html 2.7 KB

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