Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Validata
validata-ui
Commits
d5ee2f04
Commit
d5ee2f04
authored
Nov 09, 2018
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean report and adapt it to message transition
parent
c2b4e81b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
validata_ui/views.py
validata_ui/views.py
+3
-11
No files found.
validata_ui/views.py
View file @
d5ee2f04
...
...
@@ -6,28 +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
commonmark
import
commonmark
from
flask
import
Flask
,
jsonify
,
redirect
,
render_template
,
request
,
url_for
import
tabulator
from
validata_ui
import
app
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
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
def
extract_source_data
(
source
:
ValidataSource
,
preview_rows_nb
=
5
):
...
...
@@ -190,6 +181,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