Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feat/report-158 #228

Merged
merged 35 commits into from
Sep 1, 2021
Merged

Feat/report-158 #228

merged 35 commits into from
Sep 1, 2021

Conversation

mvergez
Copy link
Contributor

@mvergez mvergez commented Aug 24, 2021

Objectif

Créer un rapport d'import quelque soit le statut de l'import (en erreur ou non)

Intègre

  • Une liste d'informations sur l'import
  • Un résumé des données importées et des données totales
  • Une liste des correspondances de champs et de nomenclatures
  • Un tableau des erreurs avec possibilité de masquer les lignes en erreurs pour plus de lisibilité
  • La possibilité d'exporter le rapport en pdf et d'exporter le mapping des champs
  • Une carte avec la "bounding box" des points d'observations
  • Un graphique montrant la répartition des espèces

Changements principaux dans le code

  • Essentiellement le frontend a été modifié au niveau de la liste d'import et du rapport d'erreur qui est devenu rapport d'import
  • 2 fichiers ont été modifiés dans le backend :
    • import.py pour ajouter une route POST pour l'export de pdf (basé sur template) et déplacement d'une portion de code dans une fonction pour réutilisation dans cette route
    • blueprint.py pour ajouter le chemin vers le dossier de templates (pour le pdf)

Closes #158

camillemonchicourt and others added 25 commits June 30, 2021 12:20
Begin transforming the error report into a report that aims at
providing the user a summary of the imported data and the potential
errors.
Add expansion panels to separate sections add data in their title
Add variable for the size of a closed panel (to fit the h3)
Optimized the requests to load additionnal data only if there is
at least one piece of data
Added map to the report
Renamed all files name and changed files containing
an old reference to the error report which is now a report.
Renamed the angular Component to ImportReportComponent
Renamed the url (before: /errors ; now: report)
Changed icon to info/warning depending on errors.
Always keep the info icon and add next to it a warning icon if
there are errors
Expension of data and errors section is triggered if there are
respectively data and errors.
Add css to set colors for the latter sections
Corrected url for the report button at the end of the import
Changed label to indicate that this is a "general" report
Removed the ngIf to always display the button even if there is no
error
Began styling the report according to the specs, see pdf in issue
158
Added map and button and customized them
Refactor the columns layout
Add mapping feature (get mappings with api)
Add button to export error lines to a CSV file
Added responsiveness to the card layout
Added router to have a link to the synthese
Added TOP10 taxons
Added types to doughnutChartColors and variables in updateChart so
that it compiles successfully
Changed title sizes to match the sizes of metadata, move them to
card header when possible
Changed buttons to match the metadata page
Add link for the dataset to metadata
Add warning icon next to the errors
Add a button to expand each error line in the error table
Align all the info button to the left in the table under the Report
column
Corrected display of icons in import list
Added some responsiveness to the report and added tooltips
Added correspondances export
Added the directory for static and template.
Added a route to export pdf but it is not working for now
Export works now in dev mode. Need to add more content.
Static files are taken from GeoNature and not the local static
files of import (because cannot make static files work in import
module)
export_pdf is now a POST method since it has to receive an image
which is the map with the bounding box.
The map is transfered to the template and displayed as an img
Added the error table to display errors. Removed some columns
Added a new POST route to export the pdf (the backend does the job)
Added leaflet-image to export the map as an image (sent to backend)
Added leaflet-image to package-lock.json
Added a new table for nomenclature correspondances.
@mvergez mvergez changed the title Feat/report Feat/report-158 Aug 24, 2021
Maxime Vergez added 4 commits August 24, 2021 15:12
Changed by mistake a route name if get_imports_by_dataset
Added export of the donut Chart.
Changed the http post request with a FormData. Now sends only
the img.src (of the chart and the map)
Done some css for the report and reorganized things
Removed width and height attributes of img which are useless
Maxime Vergez added 6 commits August 26, 2021 13:50
Did some Css to reorganise some elements in the pdf report, to
match the desired layout.
Call to the synthese api route /api/taxa_distribution of GeoNature
to get the taxa distribution
This route had been updated to take a new query: id_source
This route provides a taxa distribution which is used to update the
donut graph.
A select widget had been implemented to change the rank
Need to implement a check if the route do not implements this query
Add default value for the graph combobox in the conf_schema_toml.py
so that it can be copied in the module.config.ts
Removed "top10" from the taxonomic repartition title and ajust
the width
Corrected a bug in the display of nomenclature that displayed
empty fields.
Added export of nomenclature. Need to hide buttons when there is
no nomenclature or no matching
When mapping or nomenclature is not available, disable the
associated button.
Corrected css for the button content not to break
@DonovanMaillard DonovanMaillard merged commit 25950e6 into PnX-SI:project-FLA_NS Sep 1, 2021
@mvergez mvergez mentioned this pull request Mar 10, 2022
2 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants