diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/breadcrumbs.rb | 24 | ||||
| -rw-r--r-- | config/database/ci.yml | 2 | ||||
| -rw-r--r-- | config/environments/production.rb | 14 | ||||
| -rw-r--r-- | config/initializers/stif.rb | 31 | ||||
| -rw-r--r-- | config/locales/compliance_check_messages.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/compliance_check_messages.fr.yml | 1 | ||||
| -rw-r--r-- | config/locales/compliance_check_sets.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/compliance_check_sets.fr.yml | 1 | ||||
| -rw-r--r-- | config/locales/import_messages.en.yml | 3 | ||||
| -rw-r--r-- | config/locales/import_messages.fr.yml | 17 | ||||
| -rw-r--r-- | config/locales/import_resources.en.yml | 4 | ||||
| -rw-r--r-- | config/locales/import_resources.fr.yml | 9 | ||||
| -rw-r--r-- | config/locales/imports.en.yml | 18 | ||||
| -rw-r--r-- | config/locales/imports.fr.yml | 20 | ||||
| -rw-r--r-- | config/locales/layouts.en.yml | 3 | ||||
| -rw-r--r-- | config/locales/layouts.fr.yml | 3 | ||||
| -rw-r--r-- | config/locales/workbenches.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/workbenches.fr.yml | 1 | ||||
| -rw-r--r-- | config/locales/workgroups.en.yml | 12 | ||||
| -rw-r--r-- | config/locales/workgroups.fr.yml | 12 | ||||
| -rw-r--r-- | config/routes.rb | 2 |
21 files changed, 148 insertions, 33 deletions
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb index e60ff187f..af1dec3ae 100644 --- a/config/breadcrumbs.rb +++ b/config/breadcrumbs.rb @@ -6,6 +6,11 @@ crumb :workbench do |workbench| link workbench.name, workbench_path(workbench) end +crumb :workbench_configure do |workbench| + link I18n.t('workbenches.edit.title'), edit_workbench_path(workbench) + parent :workbench, workbench +end + crumb :workbench_output do |workbench| link I18n.t('workbench_outputs.show.title'), workbench_output_path(workbench) parent :workbench, mutual_workbench(workbench) @@ -121,6 +126,16 @@ crumb :import do |workbench, import| parent :imports, workbench end +crumb :netex_import do |workbench, netex_import| + link breadcrumb_name(netex_import), workbench_import_path(workbench, netex_import) + parent :import, workbench, netex_import.parent +end + +crumb :gtfs_import do |workbench, gtfs_import| + link breadcrumb_name(gtfs_import), workbench_import_path(workbench, gtfs_import) + parent :import, workbench, gtfs_import.parent +end + crumb :export do |workbench, export| link breadcrumb_name(export), workbench_export_path(workbench, export) parent :exports, workbench @@ -131,6 +146,11 @@ crumb :import_resources do |import, import_resources| parent :import, import.workbench, import.parent end +crumb :import_resource do |import_resource| + link I18n.t('import.resources.index.title'), workbench_import_import_resource_path(import_resource.root_import.workbench, import_resource.root_import, import_resource) + parent :import, import_resource.root_import.workbench, import_resource.root_import +end + crumb :organisation do |organisation| link breadcrumb_name(organisation), organisation_path(organisation) end @@ -267,6 +287,10 @@ crumb :vehicle_journeys do |referential, route| parent :route, referential, route end +crumb :workgroup do |w| + link I18n.t('workgroups.edit.title') +end + # crumb :compliance_controls do|compliance_control_sets| # link # parent :compliance_control_sets, compliance_control_sets diff --git a/config/database/ci.yml b/config/database/ci.yml index 5671cb6ad..849b6ebc9 100644 --- a/config/database/ci.yml +++ b/config/database/ci.yml @@ -6,7 +6,7 @@ test: &default port: <%= ENV.fetch 'RAILS_DB_PORT', '5432' %> schema_search_path: 'public,shared_extensions' postgis_schema: 'shared_extensions' - database: <%= ENV.fetch 'RAILS_DB_NAME', 'stif_boiv_test' %> + database: <%= ENV.fetch 'RAILS_DB_NAME', 'stif_boiv_test' %><%= ENV['TEST_ENV_NUMBER'] %> username: <%= ENV['RAILS_DB_USER'] || ENV['POSTGRESQL_ENV_POSTGRES_USER'] || 'jenkins' %> password: <%= ENV['RAILS_DB_PASSWORD'] || ENV['POSTGRESQL_ENV_POSTGRES_PASSWORD'] %> diff --git a/config/environments/production.rb b/config/environments/production.rb index 89b74154f..ea2252b57 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -138,12 +138,14 @@ Rails.application.configure do config.iev_url = ENV.fetch('IEV_URL',"http://iev:8080") config.rails_host = ENV.fetch('RAILS_HOST','http://front:3000') - config.middleware.insert_before ActionDispatch::Static, CacheSettings, { - /\/assets\/.*/ => { - cache_control: "max-age=#{1.year.to_i}, public", - expires: 1.year.to_i - } - } + # FIXME See #5896 + # config.middleware.insert_before ActionDispatch::Static, CacheSettings, { + # /\/assets\/.*/ => { + # cache_control: "max-age=#{1.year.to_i}, public", + # expires: 1.year.to_i + # } + # } + # Set node env for browserify-rails # config.browserify_rails.node_env = "production" end diff --git a/config/initializers/stif.rb b/config/initializers/stif.rb index 2ddadbc7e..be25a329f 100644 --- a/config/initializers/stif.rb +++ b/config/initializers/stif.rb @@ -1,24 +1,27 @@ # coding: utf-8 + Rails.application.config.to_prepare do Organisation.after_create do |organisation| - line_referential = LineReferential.find_by(name: "CodifLigne") - stop_area_referential = StopAreaReferential.find_by(name: "Reflex") + unless organisation.code == "STIF" # seed is in action + line_referential = LineReferential.find_by(name: "CodifLigne") + stop_area_referential = StopAreaReferential.find_by(name: "Reflex") - line_referential.organisations << organisation - stop_area_referential.organisations << organisation + line_referential.organisations << organisation + stop_area_referential.organisations << organisation - workgroup = Workgroup.find_or_create_by(name: "Gestion de l'offre théorique IDFm") do |w| - w.line_referential = line_referential - w.stop_area_referential = stop_area_referential - end + workgroup = Workgroup.find_or_create_by(name: "Gestion de l'offre théorique IDFm") do |w| + w.line_referential = line_referential + w.stop_area_referential = stop_area_referential + end - workbench = organisation.workbenches.find_or_create_by(name: "Gestion de l'offre") do |w| - w.line_referential = line_referential - w.stop_area_referential = stop_area_referential - w.objectid_format = Workbench.objectid_format.stif_netex - w.workgroup = workgroup + organisation.workbenches.find_or_create_by(name: "Gestion de l'offre") do |w| + w.line_referential = line_referential + w.stop_area_referential = stop_area_referential + w.objectid_format = Workbench.objectid_format.stif_netex + w.workgroup = workgroup - Rails.logger.debug "Create Workbench for #{organisation.name}" + Rails.logger.debug "Create Workbench for #{organisation.name}" + end end end end unless Rails.env.test? diff --git a/config/locales/compliance_check_messages.en.yml b/config/locales/compliance_check_messages.en.yml index ade4329a2..ea91c21f2 100644 --- a/config/locales/compliance_check_messages.en.yml +++ b/config/locales/compliance_check_messages.en.yml @@ -30,6 +30,7 @@ en: 3_shape_1: "Tracé %{source_objectid} : le tracé passe trop loin de l'arrêt %{target_0_label} (%{target_0_objectid}) : %{error_value} > %{reference_value}" 3_shape_2: "Tracé %{source_objectid} : le tracé n'est pas défini entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})" 3_shape_3: "Le tracé de l'itinéraire %{source_objectid} est en écart avec la voirie sur %{error_value} sections" + compliance_check_set_errors: compliance_check_set_errors activerecord: attributes: compliance_check_message: diff --git a/config/locales/compliance_check_messages.fr.yml b/config/locales/compliance_check_messages.fr.yml index 21f100f46..6c0b54aec 100644 --- a/config/locales/compliance_check_messages.fr.yml +++ b/config/locales/compliance_check_messages.fr.yml @@ -30,6 +30,7 @@ fr: 3_shape_1: "Tracé %{source_objectid} : le tracé passe trop loin de l'arrêt %{target_0_label} (%{target_0_objectid}) : %{error_value} > %{reference_value}" 3_shape_2: "Tracé %{source_objectid} : le tracé n'est pas défini entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})" 3_shape_3: "Le tracé de l'itinéraire %{source_objectid} est en écart avec la voirie sur %{error_value} sections" + compliance_check_set_errors: erreurs_validation activerecord: attributes: compliance_check_message: diff --git a/config/locales/compliance_check_sets.en.yml b/config/locales/compliance_check_sets.en.yml index 73ecf8996..217077d6b 100644 --- a/config/locales/compliance_check_sets.en.yml +++ b/config/locales/compliance_check_sets.en.yml @@ -30,6 +30,7 @@ en: compliance_check_set_executed: "Compliance check set executed" compliance_control_owner: "Compliance control owner" import: "Import" + status: Status errors: no_parent: "The compliance check set doesn't have any parent" activerecord: diff --git a/config/locales/compliance_check_sets.fr.yml b/config/locales/compliance_check_sets.fr.yml index 045fed4ce..be54effde 100644 --- a/config/locales/compliance_check_sets.fr.yml +++ b/config/locales/compliance_check_sets.fr.yml @@ -26,6 +26,7 @@ fr: compliance_check_set_executed: "Jeu de contrôles exécuté" compliance_control_owner: "Propriétaire du jeu de contrôles" import: "Rapport d'import" + status: Statut errors: no_parent: "Le jeux de contrôle n'a pas de parent" activerecord: diff --git a/config/locales/import_messages.en.yml b/config/locales/import_messages.en.yml index 3ed98aaa6..211ac426c 100644 --- a/config/locales/import_messages.en.yml +++ b/config/locales/import_messages.en.yml @@ -5,7 +5,7 @@ en: missing_calendar_in_zip_file: "The folder %{source_filename} lacks a calendar file" wrong_calendar_in_zip_file: "The calendar file %{source_filename} cannot be parsed, or contains inconsistant data" referential_creation: "The referential %{referential_name} has not been created because another referential with the same lines and periods already exists" - referential_creation_missing_lines: "The referential %{referential_name} has not been created because no matching line has been found" + referential_creation_missing_lines: "The referential %{referential_name} has not been created because a line has not be found in the organization" 1_netexstif_2: "Le fichier %{source_filename} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{error_value}' rencontré" 1_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a une date de mise à jour dans le futur" 2_netexstif_1_1: "Le fichier commun.xml ne contient pas de frame nommée NETEX_COMMUN" @@ -54,6 +54,7 @@ en: 2_netexstif_servicejourneypattern_3_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType" 2_netexstif_servicejourneypattern_3_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} a une valeur interdite %{error_value} pour l'attribut ServiceJourneyPatternType différente de 'passenger'" 2_netexstif_servicejourneypattern_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, objet ServiceJourneyPattern d'identifiant %{source_objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants." + import_errors: import_errors activerecord: attributes: import_message: diff --git a/config/locales/import_messages.fr.yml b/config/locales/import_messages.fr.yml index 5d82b9125..c15171ac4 100644 --- a/config/locales/import_messages.fr.yml +++ b/config/locales/import_messages.fr.yml @@ -4,8 +4,20 @@ fr: inconsistent_zip_file: "Le fichier zip contient des repertoires non prévus : %{spurious_dirs} qui seront ignorés" missing_calendar_in_zip_file: "Le dossier %{source_filename} ne contient pas de calendrier" wrong_calendar_in_zip_file: "Le calendrier contenu dans %{source_filename} contient des données incorrectes ou incohérentes" - referential_creation: "Le référentiel %{referential_name} n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes" - referential_creation_missing_lines: "Le référentiel %{referential_name} n'a pas pu être créé car aucune ligne ne correspond" + referential_creation: "Le référentiel %{referential_name} n'a pas pu être créé." + referential_creation_overlapping_existing_referential: "Le référentiel %{referential_name} n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes: <a href='%{overlapped_url}'>%{overlapped_name}</a>" + referential_creation_missing_lines: "Le référentiel %{referential_name} n'a pas pu être créé car au moins une ligne n'appartient pas à l'organisation" + gtfs: + agencies: + imported: "%{count} agence(s) importée(s)" + stops: + imported: "%{count} arrêt(s) importé(s)" + routes: + imported: "%{count} itinéraire(s) importé(s)" + trips: + imported: "%{count} course(s) importée(s)" + calendars: + imported: "%{count} calendrier(s) importé(s)" 1_netexstif_2: "Le fichier %{source_filename} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{error_value}' rencontré" 1_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a une date de mise à jour dans le futur" 2_netexstif_1_1: "Le fichier commun.xml ne contient pas de frame nommée NTEX_COMMUN" @@ -54,6 +66,7 @@ fr: 2_netexstif_servicejourneypattern_3_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType" 2_netexstif_servicejourneypattern_3_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} a une valeur interdite %{error_value} pour l'attribut ServiceJourneyPatternType différente de 'passenger'" 2_netexstif_servicejourneypattern_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, objet ServiceJourneyPattern d'identifiant %{source_objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants." + import_errors: erreurs_import activerecord: attributes: import_message: diff --git a/config/locales/import_resources.en.yml b/config/locales/import_resources.en.yml index 4b1f9c394..ebb481dcc 100644 --- a/config/locales/import_resources.en.yml +++ b/config/locales/import_resources.en.yml @@ -3,9 +3,7 @@ en: resources: &resources index: title: "NeTEx conformity" - table_state: "%{lines_imported} line(s) imported on %{lines_in_zipfile} presents in zipfile" - table_title: "Satus of anlyzed files" - table_explanation: "When calendriers.xml and/or commun.xml are not imported, then all lines file are not processed." + table_state: "%{lines_imported} line(s) imported on %{lines_in_zipfile} presents in zip file" metrics: "%{error_count} errors, %{warning_count} warnings" import_resources: <<: *resources diff --git a/config/locales/import_resources.fr.yml b/config/locales/import_resources.fr.yml index 93a576f01..ca9b6c8e5 100644 --- a/config/locales/import_resources.fr.yml +++ b/config/locales/import_resources.fr.yml @@ -1,12 +1,15 @@ fr: import: resources: &resources + table: &table + table_state: "%{lines_imported} ligne(s) importée(s) sur %{lines_in_zipfile} présente(s) dans l'archive" index: + <<: *table title: "Rapport de conformité NeTEx" - table_state: "%{lines_imported} ligne(s) importée(s) sur %{lines_in_zipfile} présente(s) dans l'archive" - table_title: "Etat des fichiers analysés" - table_explanation: "Dans le cas ou le(s) fichiers calendriers.xml et/ou commun.xml sont dans un état non importé, alors tous les fichiers lignes sont automatiquement dans un état non traité." metrics: "%{error_count} errors, %{warning_count} warnings" + show: + <<: *table + title: Rapport d'import import_resources: <<: *resources activerecord: diff --git a/config/locales/imports.en.yml b/config/locales/imports.en.yml index c8683a2a7..ed34043c5 100644 --- a/config/locales/imports.en.yml +++ b/config/locales/imports.en.yml @@ -33,6 +33,13 @@ en: organisation_control: Organization control results: "%{count} validated referential(s) out of %{total} in the file" summary: Summay of import compliance check sets <span title="Lorem ipsum..." class="fa fa-lg fa-info-circle text-info"></span> + parent: Parent + netex: + table_title: "Satus of anlyzed files" + table_explanation: "When calendriers.xml and/or commun.xml are not imported, then all lines file are not processed." + table: + test_results: Test results + download: Download compliance_check_task: "Validate Report" severities: info: "Information" @@ -41,6 +48,16 @@ en: warning: "Warning" error: "Error" fatal: "Fatal" + status: + new: New + pending: Pending + successful: Successful + ok: Successful + warning: Warning + failed: Failed + running: Running + aborted: Aborted + canceled: Canceled activerecord: models: import: @@ -85,6 +102,7 @@ en: max_distance_for_connection_link: "Max distance for connection link" ignore_last_word: "ignore last word" ignore_end_chars: "ignore last chars" + referential: Referential import: <<: *attrs base: diff --git a/config/locales/imports.fr.yml b/config/locales/imports.fr.yml index 733254fa4..5affd2c0c 100644 --- a/config/locales/imports.fr.yml +++ b/config/locales/imports.fr.yml @@ -33,6 +33,13 @@ fr: organisation_control: Contrôle organisation results: "%{count} jeu(x) de données validé(s) sur %{total}" summary: Bilan des jeux de contrôles d'import <span title="Lorem ipsum..." class="fa fa-lg fa-info-circle text-info"></span> + parent: Parent + netex: + table_title: "Etat des fichiers analysés" + table_explanation: "Dans le cas ou le(s) fichiers calendriers.xml et/ou commun.xml sont dans un état non importé, alors tous les fichiers lignes sont automatiquement dans un état non traité." + table: + test_results: Résultats des tests + download: Téléchargement compliance_check_task: "Validation" severities: info: "Information" @@ -41,6 +48,17 @@ fr: warning: "Alerte" error: "Erreur" fatal: "Fatal" + status: + new: Nouveau + pending: En attente + successful: Succès + ok: Succès + warning: Avertissement + failed: Échec + error: Échec + running: En cours + aborted: Annulé + canceled: Annulé import: base: <<: *imports @@ -88,7 +106,7 @@ fr: max_distance_for_connection_link: "Distance max pour créer les correspondances" ignore_last_word: "ignorer le dernier mot" ignore_end_chars: "ignorer les n derniers caractères" - + referential: Jeu de données import: <<: *attrs base: diff --git a/config/locales/layouts.en.yml b/config/locales/layouts.en.yml index 31bff403c..065437507 100644 --- a/config/locales/layouts.en.yml +++ b/config/locales/layouts.en.yml @@ -23,6 +23,9 @@ en: workbench_output: organisation: Organisation offers workgroup: Workgroup offers + configuration: Settings + workgroup_configuration: Application + workbench_configuration: Workbench tools: Tools sync: Synchronization sync_icar: iCAR synchronization diff --git a/config/locales/layouts.fr.yml b/config/locales/layouts.fr.yml index 019c72701..8e739b6c7 100644 --- a/config/locales/layouts.fr.yml +++ b/config/locales/layouts.fr.yml @@ -23,6 +23,9 @@ fr: workbench_outputs: organisation: Offre de mon organisation workgroup: Offre du groupe de travail + configuration: Paramétrages + workgroup_configuration: Application + workbench_configuration: Espace de travail tools: Outils sync: Synchronisation sync_icar: Synchronisation iCAR diff --git a/config/locales/workbenches.en.yml b/config/locales/workbenches.en.yml index 876f18766..99df24397 100644 --- a/config/locales/workbenches.en.yml +++ b/config/locales/workbenches.en.yml @@ -4,6 +4,7 @@ en: title: "Transport offer %{name}" edit: title: "Configure the workbench" + link: "Settings" update: title: "Configure the workbench" referential_count: @@ -33,4 +34,3 @@ en: workbench: import_compliance_control_set_id: Space data before import merge_compliance_control_set_id: Space data before merge - diff --git a/config/locales/workbenches.fr.yml b/config/locales/workbenches.fr.yml index 1d97ab623..e7e836169 100644 --- a/config/locales/workbenches.fr.yml +++ b/config/locales/workbenches.fr.yml @@ -4,6 +4,7 @@ fr: title: "Offre de transport %{name}" edit: title: "Configurer l'espace de travail" + link: "Paramétrages" update: title: "Configurer l'espace de travail" referential_count: diff --git a/config/locales/workgroups.en.yml b/config/locales/workgroups.en.yml new file mode 100644 index 000000000..935f1a5fa --- /dev/null +++ b/config/locales/workgroups.en.yml @@ -0,0 +1,12 @@ +en: + workgroups: + edit: + title: "Paramétrages de l'application" + compliance_control_sets: + after_import: after import + after_import_by_workgroup: after import (group) + before_merge: before merge + before_merge_by_workgroup: before merge (group) + after_merge: after merge + after_merge_by_workgroup: after merge (group) + automatic_by_workgroup: automatic diff --git a/config/locales/workgroups.fr.yml b/config/locales/workgroups.fr.yml new file mode 100644 index 000000000..d209410e7 --- /dev/null +++ b/config/locales/workgroups.fr.yml @@ -0,0 +1,12 @@ +fr: + workgroups: + edit: + title: "Paramétrages de l'application" + compliance_control_sets: + after_import: après import + after_import_by_workgroup: après import (groupe) + before_merge: avant finalisation + before_merge_by_workgroup: avant finalisation (groupe) + after_merge: après finalisation + after_merge_by_workgroup: après finalisation (groupe) + automatic_by_workgroup: automatique diff --git a/config/routes.rb b/config/routes.rb index 41b345aa5..cde1701f8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ ChouetteIhm::Application.routes.draw do delete :referentials, on: :member, action: :delete_referentials resources :imports do get :download, on: :member - resources :import_resources, only: [:index] do + resources :import_resources, only: [:index, :show] do resources :import_messages, only: [:index] end end |
