Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
041266fe
Commit
041266fe
authored
Sep 28, 2018
by
Pierre Dittgen
Browse files
Group errors by line
parent
2f2089f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
validata_ui_next/templates/validation_report.html
View file @
041266fe
...
...
@@ -51,14 +51,20 @@
<div>
<h3>
Erreurs de valeurs
</h3>
{% set line = {'no': 0} %}
{% for err in report['tables'][0]['errors'] %}
{% if err.context == 'body' %}
{% if line.no != err['row-number'] %}
{% if line.update({'no': err['row-number']}) %}{% endif %}
<h4>
Ligne {{ line.no - 1}}
</h4>
{% endif %}
<div
class=
"table-responsive-sm"
>
<table
class=
"table-sm table-bordered table-striped table-hover"
>
<thead>
<th
scope=
"col"
>
#
</th>
<table
class=
"table-sm table-bordered"
>
<thead
class=
"thead-light"
>
{% for h in report['tables'][0]['headers'] %}
<th
scope=
"col"
>
{{ h }}
</th>
{% endfor %}
...
...
@@ -66,7 +72,6 @@
<!-- TODO: regrouper les erreurs par ligne ? -->
<tbody>
<tr>
<th
scope=
"row"
>
{{ err['row-number'] - 1 }}
</th>
{% for d in source_data.data_rows[err['row-number'] - 2] %}
{% if loop.index == err['column-number'] %}
<td
class=
"table-danger"
>
{{ d }}
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment