Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
validata-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
20
Issues
20
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Validata
validata-ui
Commits
3e1978f3
Commit
3e1978f3
authored
Nov 19, 2018
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add datetime in validation report
parent
6d2b8a64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
validata_ui/templates/validation_report.html
validata_ui/templates/validation_report.html
+1
-0
validata_ui/views.py
validata_ui/views.py
+10
-9
No files found.
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