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
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
e5d0abd3
Commit
e5d0abd3
authored
Jun 24, 2019
by
Christophe Benz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display table out of container
parent
6be3cbdc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
158 deletions
+146
-158
validata_ui/templates/base_template.html
validata_ui/templates/base_template.html
+1
-1
validata_ui/templates/home.html
validata_ui/templates/home.html
+2
-1
validata_ui/templates/validation_form.html
validata_ui/templates/validation_form.html
+75
-73
validata_ui/templates/validation_report.html
validata_ui/templates/validation_report.html
+68
-83
No files found.
validata_ui/templates/base_template.html
View file @
e5d0abd3
...
...
@@ -69,7 +69,7 @@
{% endwith %}
<!-- main content -->
<div
id=
"content"
class=
"container"
>
<div
id=
"content"
>
{% block content %}{% endblock %}
</div>
...
...
validata_ui/templates/home.html
View file @
e5d0abd3
...
...
@@ -3,7 +3,7 @@
{% block title %}Accueil{% endblock %}
{% block content %}
<div
class=
"container"
>
{% for section in config.sections %}
{% if section.catalog %}
<div
class=
"mb-5"
>
...
...
@@ -80,4 +80,5 @@
{% endif %}
{% endfor %}
</div>
{% endblock %}
validata_ui/templates/validation_form.html
View file @
e5d0abd3
...
...
@@ -5,82 +5,84 @@
{% block title %}{{ section_title }} – {{ schema_info.title }}{% endblock %}
{% block content %}
<div
class=
"row my-4"
>
<div
class=
"col-lg-6 mb-4"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
{{ schema_info_macros.html(schema_info, branches, tags, schema_current_version, doc_url) }}
<div
class=
"container"
>
<div
class=
"row my-4"
>
<div
class=
"col-lg-6 mb-4"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
{{ schema_info_macros.html(schema_info, branches, tags, schema_current_version, doc_url) }}
</div>
</div>
</div>
</div>
<div
class=
"col-lg-6"
>
<ul
class=
"nav nav-tabs"
id=
"myTab"
role=
"tablist"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link active"
id=
"file-tab"
data-toggle=
"tab"
href=
"#file"
role=
"tab"
aria-controls=
"file"
aria-selected=
"true"
>
Fichier
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"url-tab"
data-toggle=
"tab"
href=
"#url"
role=
"tab"
aria-controls=
"url"
aria-selected=
"false"
>
URL
</a>
</li>
{% if schema_info.resources %}
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"examples-tab"
data-toggle=
"tab"
href=
"#example"
role=
"tab"
aria-controls=
"examples"
aria-selected=
"false"
>
Exemples
</a>
</li>
{% endif %}
</ul>
{% set padding_class = 'p-3' %}
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane show active {{ padding_class }}"
id=
"file"
role=
"tabpanel"
aria-labelledby=
"file-tab"
>
<form
method=
"POST"
enctype=
"multipart/form-data"
>
<input
type=
"hidden"
name=
"input"
value=
"file"
/>
{% for key, value in schema_params.items() %}
<input
type=
"hidden"
name=
"{{ key }}"
value=
"{{ value }}"
/>
{% endfor %}
<div
class=
"form-group"
>
<input
required
type=
"file"
class=
"form-control-file"
name=
"file"
id=
"file"
accept=
".csv, .xls, .xlsx, .ods"
aria-describedby=
"fileHelpBlock"
/>
<small
id=
"fileHelpBlock"
class=
"form-text text-muted"
>
Exemple : .xlsx, .xls, .ods, .csv, .tsv, etc.
</small>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Valider le fichier
</button>
</form>
</div>
<div
class=
"tab-pane {{ padding_class }}"
id=
"url"
role=
"tabpanel"
aria-labelledby=
"url-tab"
>
<form
method=
"GET"
>
<input
type=
"hidden"
name=
"input"
value=
"url"
/>
{% for key, value in schema_params.items() %}
<input
type=
"hidden"
name=
"{{ key }}"
value=
"{{ value }}"
/>
{% endfor %}
<div
class=
"form-group"
>
<input
required
name=
"url"
type=
"url"
class=
"form-control"
id=
"url"
aria-describedby=
"urlHelpBlock"
placeholder=
"https://example.com/file.csv"
/>
<small
id=
"urlHelpBlock"
class=
"form-text text-muted"
>
Exemple : .xlsx, .xls, .ods, .csv, .tsv, etc.
</small>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Valider le fichier
</button>
</form>
</div>
{% if schema_info.resources %}
<div
class=
"tab-pane {{ padding_class }}"
id=
"example"
role=
"tabpanel"
aria-labelledby=
"examples-tab"
>
<form
method=
"GET"
>
<input
name=
"input"
value=
"example"
type=
"hidden"
>
{% for key, value in schema_params.items() %}
<input
type=
"hidden"
name=
"{{ key }}"
value=
"{{ value }}"
/>
{% endfor %}
<div
class=
"form-group"
>
<select
required
name=
"url"
id=
"url"
class=
"form-control"
>
<option
selected
disabled
value=
""
>
Choisissez un fichier tabulaire d'exemple
</option>
{% for res in schema_info.resources %}
<option
value=
"{{ res.path }}"
>
{{ res.title }}
</option>
{% endfor %}
</select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Valider le fichier
</button>
</form>
<div
class=
"col-lg-6"
>
<ul
class=
"nav nav-tabs"
id=
"myTab"
role=
"tablist"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link active"
id=
"file-tab"
data-toggle=
"tab"
href=
"#file"
role=
"tab"
aria-controls=
"file"
aria-selected=
"true"
>
Fichier
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"url-tab"
data-toggle=
"tab"
href=
"#url"
role=
"tab"
aria-controls=
"url"
aria-selected=
"false"
>
URL
</a>
</li>
{% if schema_info.resources %}
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"examples-tab"
data-toggle=
"tab"
href=
"#example"
role=
"tab"
aria-controls=
"examples"
aria-selected=
"false"
>
Exemples
</a>
</li>
{% endif %}
</ul>
{% set padding_class = 'p-3' %}
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane show active {{ padding_class }}"
id=
"file"
role=
"tabpanel"
aria-labelledby=
"file-tab"
>
<form
method=
"POST"
enctype=
"multipart/form-data"
>
<input
type=
"hidden"
name=
"input"
value=
"file"
/>
{% for key, value in schema_params.items() %}
<input
type=
"hidden"
name=
"{{ key }}"
value=
"{{ value }}"
/>
{% endfor %}
<div
class=
"form-group"
>
<input
required
type=
"file"
class=
"form-control-file"
name=
"file"
id=
"file"
accept=
".csv, .xls, .xlsx, .ods"
aria-describedby=
"fileHelpBlock"
/>
<small
id=
"fileHelpBlock"
class=
"form-text text-muted"
>
Exemple : .xlsx, .xls, .ods, .csv, .tsv, etc.
</small>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Valider le fichier
</button>
</form>
</div>
<div
class=
"tab-pane {{ padding_class }}"
id=
"url"
role=
"tabpanel"
aria-labelledby=
"url-tab"
>
<form
method=
"GET"
>
<input
type=
"hidden"
name=
"input"
value=
"url"
/>
{% for key, value in schema_params.items() %}
<input
type=
"hidden"
name=
"{{ key }}"
value=
"{{ value }}"
/>
{% endfor %}
<div
class=
"form-group"
>
<input
required
name=
"url"
type=
"url"
class=
"form-control"
id=
"url"
aria-describedby=
"urlHelpBlock"
placeholder=
"https://example.com/file.csv"
/>
<small
id=
"urlHelpBlock"
class=
"form-text text-muted"
>
Exemple : .xlsx, .xls, .ods, .csv, .tsv, etc.
</small>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Valider le fichier
</button>
</form>
</div>
{% if schema_info.resources %}
<div
class=
"tab-pane {{ padding_class }}"
id=
"example"
role=
"tabpanel"
aria-labelledby=
"examples-tab"
>
<form
method=
"GET"
>
<input
name=
"input"
value=
"example"
type=
"hidden"
>
{% for key, value in schema_params.items() %}
<input
type=
"hidden"
name=
"{{ key }}"
value=
"{{ value }}"
/>
{% endfor %}
<div
class=
"form-group"
>
<select
required
name=
"url"
id=
"url"
class=
"form-control"
>
<option
selected
disabled
value=
""
>
Choisissez un fichier tabulaire d'exemple
</option>
{% for res in schema_info.resources %}
<option
value=
"{{ res.path }}"
>
{{ res.title }}
</option>
{% endfor %}
</select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Valider le fichier
</button>
</form>
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
...
...
validata_ui/templates/validation_report.html
View file @
e5d0abd3
...
...
@@ -26,16 +26,17 @@
{% endblock %}
{% block content %}
<div
class=
"container"
>
<p
class=
"text-muted"
>
Validation effectuée {{ validation_date }}
</p>
<p
class=
"text-muted"
>
Validation effectuée {{ validation_date }}
</p>
{% if source.type == 'url' %}
<p
class=
"hidden-print"
>
<a
class=
"btn btn-outline-secondary"
href=
"{{ pdf_report_url }}&url={{source.url|urlencode}}"
target=
"_blank"
>
Télécharger en PDF
</a>
</p>
{% endif %}
{% if source.type == 'url' %}
<p
class=
"hidden-print"
>
<a
class=
"btn btn-outline-secondary"
href=
"{{ pdf_report_url }}&url={{source.url|urlencode}}"
target=
"_blank"
>
Télécharger en PDF
</a>
</p>
{% endif %}
{# Schema info #}
<div
class=
"row my-4"
>
...
...
@@ -87,85 +88,69 @@
</div>
</div>
{% if report.error_count == 0 %}
{{ macros.preview(source_data) }}
{% else %}
{% if report.table.errors.structure %}
<h3
class=
"my-4"
>
Erreurs de structure
</h3>
{# Non-column errors #}
{% for err in report.table.errors.structure %}
{% if not err.in_column_comp %}
{{ err.content | safe }}
{% endif %}
{% endfor %}
{% if report.error_count > 0 %}
{% if report.table.errors.structure %}
<h3
class=
"my-4"
>
Erreurs de structure
</h3>
{# Non-column errors #}
{% for err in report.table.errors.structure %}
{% if not err.in_column_comp %}
{{ err.content | safe }}
{% endif %}
{% endfor %}
{# Column errors #}
{% for err in report.table.errors.structure %}
{% if err.in_column_comp %}
{{ err.content | safe }}
{% endif %}
{% endfor %}
{# Afficher un tableau de comparaison des colonnes #}
{% if report.table.column_comparison_needed %}
<table
class=
"table table-bordered table-sm table-striped table-hover"
>
<thead
class=
"thead-light"
>
<tr>
<th
scope=
"col"
>
Colonnes du fichier
</th>
<th
scope=
"col"
>
Colonnes attendues
</th>
</tr>
</thead>
<tbody>
{% for elt in report.table.column_comparison_info.table %}
<tr
{%
if
elt[2] =
=
'
ko
'
%}
class=
"table-danger"
{%
endif
%}
>
<td>
{{ elt[0] }}
</td>
<td>
{{ elt[1] }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if report.table.column_comparison_info.has_missing %}
<p>
Attention : toutes les colonnes attendues doivent être présentes dans le fichier à valider.
<p>
{% endif %}
{% if report.table.column_comparison_info.has_case_errors %}
<p>
Attention : la casse (minuscules/majuscules) doit être respectée dans les noms de colonne.
<p>
{% endif %}
{# Column errors #}
{% for err in report.table.errors.structure %}
{% if err.in_column_comp %}
{{ err.content | safe }}
{% endif %}
{% endfor %}
{# Afficher un tableau de comparaison des colonnes #}
{% if report.table.column_comparison_needed %}
<table
class=
"table table-bordered table-sm table-striped table-hover"
>
<thead
class=
"thead-light"
>
<tr>
<th
scope=
"col"
>
Colonnes du fichier
</th>
<th
scope=
"col"
>
Colonnes attendues
</th>
</tr>
</thead>
<tbody>
{% for elt in report.table.column_comparison_info.table %}
<tr
{%
if
elt[2] =
=
'
ko
'
%}
class=
"table-danger"
{%
endif
%}
>
<td>
{{ elt[0] }}
</td>
<td>
{{ elt[1] }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if report.table.column_comparison_info.has_missing %}
<p>
Attention : toutes les colonnes attendues doivent être présentes dans le fichier à valider.
<p>
{% endif %}
{% if report.table.column_comparison_info.has_case_errors %}
<p>
Attention : la casse (minuscules/majuscules) doit être respectée dans les noms de colonne.
<p>
{% endif %}
{% endif %}
{% endif %}
{# We do display body errors! #}
{% if report.table.do_display_body_errors %}
<h3
class=
"my-4"
>
Erreurs de contenu
</h3>
{# No errors - display preview #}
{% if not report.table.errors.body %}
<p>
Aucune erreur de contenu
</p>
{{ macros.preview(source_data) }}
{% else %}
{# display errors #}
{{ macros.body_errors(report, source_data, print_mode) }}
{% endif %}
{# do not display errors #}
{% else %}
<p>
Veuillez corriger ces erreurs pour visualiser les éventuelles erreurs de contenu.
</p>
{% endif %}
{% endif %}
{% endblock %}
</div>
{% if report.table.do_display_body_errors %} {# We do display body errors! #}
<div
class=
"mx-4"
>
{% if report.table.errors.body %}
<h3
class=
"my-4"
>
Erreurs de contenu
</h3>
{{ macros.body_errors(report, source_data, print_mode) }}
{% else %}
{{ macros.preview(source_data) }}
{% endif %}
</div>
{% else %} {# do not display errors #}
<p>
Veuillez corriger ces erreurs pour visualiser les éventuelles erreurs de contenu.
</p>
{% endif %}
{% endblock %}
{% block page_scripts %}
<script>
...
...
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