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
3e1978f3
Commit
3e1978f3
authored
Nov 19, 2018
by
Pierre Dittgen
Browse files
Add datetime in validation report
parent
6d2b8a64
Changes
2
Hide whitespace changes
Inline
Side-by-side
validata_ui/templates/validation_report.html
View file @
3e1978f3
...
...
@@ -5,6 +5,7 @@
{% endblock %}
{% block content %}
<h1>
{{ title }}
</h1>
<p
class=
"text"
>
Validation effectuée {{ validation_date }}
</p>
{# Schema info #}
<div
class=
"row"
>
...
...
validata_ui/views.py
View file @
3e1978f3
...
...
@@ -6,19 +6,19 @@ import copy
import
json
import
os
from
collections
import
OrderedDict
from
datetime
import
datetime
from
io
import
BytesIO
from
pathlib
import
Path
from
validata_validate
import
csv_helpers
from
validata_validate.loaders
import
custom_loaders
from
validata_ui
import
app
from
validata_ui.util
import
flash_error
,
flash_info
,
flash_success
,
flash_warning
,
ValidataSource
from
validata_ui.validate_helper
import
ValidatorHelper
from
validata_ui
import
error_messages
from
flask
import
Flask
,
jsonify
,
redirect
,
render_template
,
request
,
url_for
import
tabulator
from
io
import
BytesIO
import
tabulator
from
validata_ui
import
app
,
error_messages
from
validata_ui.util
import
(
ValidataSource
,
flash_error
,
flash_info
,
flash_success
,
flash_warning
)
from
validata_ui.validate_helper
import
ValidatorHelper
from
validata_validate
import
csv_helpers
from
validata_validate.loaders
import
custom_loaders
def
extract_source_data
(
source
:
ValidataSource
,
preview_rows_nb
=
5
):
...
...
@@ -210,6 +210,7 @@ def validate(schema_code, source: ValidataSource):
val_info
=
ValidatorHelper
.
schema_info
(
schema_code
)
return
render_template
(
'validation_report.html'
,
title
=
'Rapport de validation'
,
val_info
=
ValidatorHelper
.
schema_info
(
schema_code
),
report
=
validata_report
,
validation_date
=
datetime
.
now
().
strftime
(
'le %d/%m/%Y à %Hh%M'
),
source
=
source
,
source_type
=
source
.
type
,
source_data
=
source_data
,
report_str
=
json
.
dumps
(
validata_report
,
sort_keys
=
True
,
indent
=
2
),
breadcrumbs
=
[{
'url'
:
url_for
(
'home'
),
'title'
:
'Accueil'
},
...
...
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