Skip to content

Commit

Permalink
feat: update module config ts (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
edelclaux authored Jan 9, 2025
1 parent 6b57ac7 commit 64b31f2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
5 changes: 4 additions & 1 deletion backend/gn_module_zh/conf_schema_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ class MapListConfig(Schema):

flora_view_name = {"schema_name": "pr_zh", "table_name": "vm_flora", "category": "flora"}

# Fréquence de mise à jour des vm de taxons
TAXON_VM_CRONTAB = "0 0,12 * * *"

# Name of the source of species data (tab5)
species_source_name = "GeoNature"

Expand Down Expand Up @@ -178,4 +181,4 @@ class GnModuleSchemaConf(Schema):
pdf_small_layer_number = fields.Integer(load_default=pdf_small_layer_number)
pdf_last_page_img = fields.String(load_default=pdf_last_page_img)
pdf_title = fields.String(load_default=pdf_title)
TAXON_VM_CRONTAB = fields.String(load_default="0 0,12 * * *")
TAXON_VM_CRONTAB = fields.String(load_default=TAXON_VM_CRONTAB)
7 changes: 4 additions & 3 deletions frontend/app/module.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const ModuleConfig = {
MODULE_CODE: 'ZONES_HUMIDES',
MODULE_URL: '/zones_humides',
TAXON_VM_CRONTAB: '0 0,12 * * *',
allowed_extensions: ['.pdf', '.jpg', '.png'],
available_maplist_column: [
{
Expand Down Expand Up @@ -77,12 +78,12 @@ export const ModuleConfig = {
flora_view_name: {
category: 'flora',
schema_name: 'pr_zh',
table_name: 'flora',
table_name: 'vm_flora',
},
invertebrates_view_name: {
category: 'invertebrates',
schema_name: 'pr_zh',
table_name: 'invertebrates',
table_name: 'vm_invertebrates',
},
max_jpg_size: 0.5,
max_pdf_size: 1.5,
Expand Down Expand Up @@ -163,6 +164,6 @@ export const ModuleConfig = {
vertebrates_view_name: {
category: 'vertebrates',
schema_name: 'pr_zh',
table_name: 'vertebrates',
table_name: 'vm_vertebrates',
},
};
16 changes: 11 additions & 5 deletions zones_humides_config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,21 @@ ref_geo_referentiels = [

# Renseigne le nom de la table permettant de remonter les observations
# de vertebrés effectuées à l'intérieur de la zones humide
vertebrates_view_name = { schema_name = "pr_zh", table_name = "vertebrates", category = "vertebrates" }
vertebrates_view_name = { schema_name = "pr_zh", table_name = "vm_vertebrates", category = "vertebrates" }

# Renseigne le nom de la table permettant de remonter les observations
# d'invertebrés effectuées à l'intérieur de la zones humide
invertebrates_view_name = { schema_name = "pr_zh", table_name = "invertebrates", category = "invertebrates" }
invertebrates_view_name = { schema_name = "pr_zh", table_name = "vm_invertebrates", category = "invertebrates" }

# Renseigne le nom de la table permettant de remonter les observations
# de flore effectuées à l'intérieur de la zones humide
flora_view_name = { schema_name = "pr_zh", table_name = "flora", category = "flora" }
flora_view_name = { schema_name = "pr_zh", table_name = "vm_flora", category = "flora" }

# Fréquence de mise à jour des vm de taxons
TAXON_VM_CRONTAB = "0 0,12 * * *"

# Nom de la source de données pour la liste des taxons (tab5)
species_source_name = "GeoNature"

# Extensions autorisées pour le téléversement
allowed_extensions = ['.pdf', '.jpg']
Expand Down Expand Up @@ -124,7 +130,7 @@ pdf_layer_number = 0
pdf_small_layer_number = 0
# Nom de l'image (dans le dossier static) qui sera utilisée comme
# pied de page
# Si None => ne sera pas affichée
pdf_last_page_img = 'entree_sortie.svg'
# Si "" => ne sera pas affichée
pdf_last_page_img = ''
# Titre du document
pdf_title = 'Inventaire des zones humides'

0 comments on commit 64b31f2

Please sign in to comment.