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
10439149
Commit
10439149
authored
Jul 24, 2019
by
Pierre Dittgen
Browse files
Turn unknown column into red (danger!)
parent
fe40a3f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
validata_ui/templates/validation_macros.html
View file @
10439149
...
...
@@ -25,7 +25,9 @@
{% for row in source_data.preview_rows %}
<tr>
{% for val in row %}
<td>
{{ val }}
</td>
<td
{%
if
report.table.headers_alert
[
loop.index
-
1]
!=
""
%}
class=
"{{ report.table.headers_alert[loop.index - 1] }}"
{%
endif
%}
>
{{ val }}
</td>
{% endfor %}
</tr>
{% endfor %}
...
...
validata_ui/views.py
View file @
10439149
...
...
@@ -227,6 +227,7 @@ def create_validata_ui_report(validata_core_report, schema_dict):
report
[
'table'
][
'headers_title'
]
=
[
fields_dict
[
h
][
0
]
if
h
in
fields_dict
else
'Colonne inconnue'
for
h
in
headers
]
report
[
'table'
][
'headers_description'
]
=
[
fields_dict
[
h
][
1
]
if
h
in
fields_dict
else
'Cette colonne n
\'
est pas définie dans le schema'
for
h
in
headers
]
report
[
'table'
][
'headers_alert'
]
=
[
''
if
h
in
fields_dict
else
'table-danger'
for
h
in
headers
]
# Provide better (french) messages
errors
=
improve_errors
(
report
[
'table'
][
'errors'
])
...
...
Write
Preview
Supports
Markdown
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