aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2017-09-06 13:40:50 +0200
committerLuc Donnet2017-09-06 13:40:50 +0200
commit155faedfb87943af3227c9c09cff6996e988db1b (patch)
treef10865da1a4e902ac0ec9d049a795d0b9f0ec0ad
parentf1c825ee0fecb2dba771f8ea45a1dc4674bd69c4 (diff)
parentcb87df36c48482b1eb08972be7adcf1a0811cc64 (diff)
downloadchouette-core-155faedfb87943af3227c9c09cff6996e988db1b.tar.bz2
Merge branch 'master' into staging
-rw-r--r--app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js5
-rw-r--r--app/assets/javascripts/es6_browserified/vehicle_journeys/actions/index.js5
-rw-r--r--app/assets/javascripts/filters/calendar.js6
-rw-r--r--app/assets/javascripts/filters/import.js6
-rw-r--r--app/assets/javascripts/filters/time_table.js7
-rw-r--r--app/assets/javascripts/filters/workbench.js6
-rw-r--r--app/assets/javascripts/helpers/date_filters.js38
-rw-r--r--app/assets/javascripts/time_table.coffee14
-rw-r--r--app/assets/javascripts/workbench.coffee18
-rw-r--r--app/assets/stylesheets/application.sass1
-rw-r--r--app/assets/stylesheets/main/access_links.sass18
-rw-r--r--app/assets/stylesheets/main/access_points.sass78
-rw-r--r--app/assets/stylesheets/main/api_keys.sass7
-rw-r--r--app/assets/stylesheets/main/calendar.sass98
-rw-r--r--app/assets/stylesheets/main/calendars.sass11
-rw-r--r--app/assets/stylesheets/main/companies.sass9
-rw-r--r--app/assets/stylesheets/main/compliance_checks.sass157
-rw-r--r--app/assets/stylesheets/main/connection_links.sass30
-rw-r--r--app/assets/stylesheets/main/errors.sass21
-rw-r--r--app/assets/stylesheets/main/export_tasks.sass10
-rw-r--r--app/assets/stylesheets/main/exports.sass19
-rw-r--r--app/assets/stylesheets/main/group_of_lines.sass15
-rw-r--r--app/assets/stylesheets/main/help.sass121
-rw-r--r--app/assets/stylesheets/main/import_tasks.sass11
-rw-r--r--app/assets/stylesheets/main/imports.sass40
-rw-r--r--app/assets/stylesheets/main/journey_patterns.sass49
-rw-r--r--app/assets/stylesheets/main/layout.sass133
-rw-r--r--app/assets/stylesheets/main/lines.sass87
-rw-r--r--app/assets/stylesheets/main/multiple_selection.sass17
-rw-r--r--app/assets/stylesheets/main/networks.sass9
-rw-r--r--app/assets/stylesheets/main/organisations.sass5
-rw-r--r--app/assets/stylesheets/main/referentials.sass34
-rw-r--r--app/assets/stylesheets/main/route_sections.sass54
-rw-r--r--app/assets/stylesheets/main/routes.sass46
-rw-r--r--app/assets/stylesheets/main/rule_parameter_sets.sass45
-rw-r--r--app/assets/stylesheets/main/simple_form.sass3
-rw-r--r--app/assets/stylesheets/main/stop_areas.sass165
-rw-r--r--app/assets/stylesheets/main/stop_points.sass26
-rw-r--r--app/assets/stylesheets/main/time_table_combinations.sass7
-rw-r--r--app/assets/stylesheets/main/time_tables.sass135
-rw-r--r--app/assets/stylesheets/main/vehicle_journey_frequencies.sass155
-rw-r--r--app/assets/stylesheets/main/vehicle_journeys.sass118
-rw-r--r--app/assets/stylesheets/main/vehicle_translation.sass10
-rw-r--r--app/assets/stylesheets/modules/import_messages.sass5
-rw-r--r--app/controllers/api/v1/netex_imports_controller.rb2
-rw-r--r--app/controllers/application_controller.rb3
-rw-r--r--app/controllers/autocomplete_time_tables_controller.rb2
-rw-r--r--app/controllers/compliance_check_tasks_controller.rb49
-rw-r--r--app/controllers/compliance_checks_controller.rb83
-rw-r--r--app/controllers/import_messages_controller.rb2
-rw-r--r--app/controllers/imports_controller.rb12
-rw-r--r--app/controllers/referentials_controller.rb3
-rw-r--r--app/controllers/workbenches_controller.rb9
-rw-r--r--app/decorators/referential_decorator.rb2
-rw-r--r--app/helpers/compliance_check_tasks_helper.rb11
-rw-r--r--app/helpers/compliance_checks_helper.rb96
-rw-r--r--app/models/chouette/access_point.rb8
-rw-r--r--app/models/chouette/company.rb2
-rw-r--r--app/models/chouette/group_of_line.rb2
-rw-r--r--app/models/chouette/journey_pattern.rb5
-rw-r--r--app/models/chouette/network.rb2
-rw-r--r--app/models/chouette/route.rb4
-rw-r--r--app/models/chouette/routing_constraint_zone.rb4
-rw-r--r--app/models/chouette/stif_netex_objectid.rb38
-rw-r--r--app/models/chouette/time_table.rb7
-rw-r--r--app/models/chouette/trident_active_record.rb2
-rw-r--r--app/models/chouette/vehicle_journey.rb4
-rw-r--r--app/models/compliance_check.rb55
-rw-r--r--app/models/compliance_check_export.rb56
-rw-r--r--app/models/compliance_check_report.rb9
-rw-r--r--app/models/compliance_check_result.rb73
-rw-r--r--app/models/compliance_check_service.rb23
-rw-r--r--app/models/compliance_check_task.rb114
-rw-r--r--app/models/concerns/line_referential_support.rb8
-rw-r--r--app/models/concerns/report_concern.rb170
-rw-r--r--app/models/concerns/stif_netex_attributes_support.rb58
-rw-r--r--app/models/concerns/stop_area_referential_support.rb7
-rw-r--r--app/models/data_format_enumerations.rb4
-rw-r--r--app/models/export_report.rb5
-rw-r--r--app/models/import.rb9
-rw-r--r--app/models/import_message_export.rb13
-rw-r--r--app/models/import_report.rb7
-rw-r--r--app/models/vehicle_journey_import.rb80
-rw-r--r--app/models/workbench.rb1
-rw-r--r--app/views/calendars/_filters.html.slim2
-rw-r--r--app/views/calendars/index.html.slim6
-rw-r--r--app/views/compliance_check_tasks/new.html.erb39
-rw-r--r--app/views/compliance_check_tasks/new.js.coffee7
-rw-r--r--app/views/compliance_checks/_compliance_check.html.slim17
-rw-r--r--app/views/compliance_checks/_compliance_check_results.html.slim92
-rw-r--r--app/views/compliance_checks/_compliance_checks.html.slim9
-rw-r--r--app/views/compliance_checks/detailed_errors_index.csv.slim37
-rw-r--r--app/views/compliance_checks/index.html.slim14
-rw-r--r--app/views/compliance_checks/index.js.slim1
-rw-r--r--app/views/compliance_checks/report.html.slim41
-rw-r--r--app/views/compliance_checks/show.html.slim22
-rw-r--r--app/views/compliance_checks/summary_errors_index.csv.slim34
-rw-r--r--app/views/import_resources/index.html.slim85
-rw-r--r--app/views/imports/_filters.html.slim6
-rw-r--r--app/views/imports/index.html.slim2
-rw-r--r--app/views/time_tables/index.html.slim2
-rw-r--r--app/views/workbenches/index.html.slim2
-rw-r--r--app/views/workbenches/show.html.slim4
-rw-r--r--app/workers/workbench_import_worker.rb7
-rw-r--r--config/initializers/assets.rb2
-rw-r--r--config/locales/compliance_check_results.en.yml457
-rw-r--r--config/locales/compliance_check_results.fr.yml456
-rw-r--r--config/locales/compliance_check_tasks.en.yml17
-rw-r--r--config/locales/compliance_check_tasks.fr.yml17
-rw-r--r--config/locales/compliance_checks.en.yml91
-rw-r--r--config/locales/compliance_checks.fr.yml92
-rw-r--r--config/locales/import_messages.en.yml96
-rw-r--r--config/locales/import_messages.fr.yml94
-rw-r--r--config/routes.rb17
-rw-r--r--db/migrate/20170808083322_change_referential_date_format_to_netex.rb9
-rw-r--r--db/migrate/20170808091929_change_objectid_suffix.rb17
-rw-r--r--spec/controllers/import_tasks_controller_spec.rb34
-rw-r--r--spec/factories/chouette_access_links.rb6
-rw-r--r--spec/factories/chouette_companies.rb2
-rw-r--r--spec/factories/chouette_connection_links.rb4
-rw-r--r--spec/factories/chouette_group_of_lines.rb2
-rw-r--r--spec/factories/chouette_journey_pattern.rb3
-rw-r--r--spec/factories/chouette_networks.rb2
-rw-r--r--spec/factories/chouette_routes.rb2
-rw-r--r--spec/factories/chouette_routing_constraint_zones.rb1
-rw-r--r--spec/factories/chouette_stop_points.rb2
-rw-r--r--spec/factories/chouette_time_table.rb2
-rw-r--r--spec/factories/chouette_timeband.rb4
-rw-r--r--spec/factories/chouette_vehicle_journey.rb2
-rw-r--r--spec/factories/compliance_check_results.rb8
-rw-r--r--spec/factories/compliance_check_tasks.rb8
-rw-r--r--spec/features/connection_links_spec.rb2
-rw-r--r--spec/features/workbenches_spec.rb30
-rw-r--r--spec/models/chouette/access_link_spec.rb12
-rw-r--r--spec/models/chouette/company_spec.rb7
-rw-r--r--spec/models/chouette/connection_link_spec.rb2
-rw-r--r--spec/models/chouette/group_of_line_spec.rb6
-rw-r--r--spec/models/chouette/network_spec.rb7
-rw-r--r--spec/models/chouette/route/route_base_spec.rb2
-rw-r--r--spec/models/chouette/routing_constraint_zone_spec.rb19
-rw-r--r--spec/models/chouette/stop_point_spec.rb2
-rw-r--r--spec/models/chouette/time_table_spec.rb208
-rw-r--r--spec/models/chouette/trident_active_record_spec.rb128
-rw-r--r--spec/models/compliance_check_result_spec.rb100
-rw-r--r--spec/models/compliance_check_task_spec.rb317
-rw-r--r--spec/models/vehicle_journey_export_spec.rb34
-rw-r--r--spec/models/vehicle_journey_import_spec.rb8
-rw-r--r--spec/models/vehicle_translation_spec.rb1
-rw-r--r--spec/requests/api/v1/netex_import_spec.rb44
-rw-r--r--spec/support/devise.rb4
-rw-r--r--spec/workers/workbench_import_worker_spec.rb81
151 files changed, 859 insertions, 4929 deletions
diff --git a/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js b/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js
index 3577df2b6..34689070d 100644
--- a/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js
+++ b/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js
@@ -90,10 +90,7 @@ const actions = {
resetValidation: (target) => {
$(target).parent().removeClass('has-error').children('.help-block').remove()
},
- humanOID : (oid) => {
- var a = oid.split(':')
- return a[a.length - 1]
- },
+ humanOID : (oid) => oid.split(':')[2],
validateFields : (fields) => {
const test = []
diff --git a/app/assets/javascripts/es6_browserified/vehicle_journeys/actions/index.js b/app/assets/javascripts/es6_browserified/vehicle_journeys/actions/index.js
index 2fde0d76f..de87c14af 100644
--- a/app/assets/javascripts/es6_browserified/vehicle_journeys/actions/index.js
+++ b/app/assets/javascripts/es6_browserified/vehicle_journeys/actions/index.js
@@ -269,10 +269,7 @@ const actions = {
type: 'RECEIVE_TOTAL_COUNT',
total
}),
- humanOID : (oid) => {
- var a = oid.split(':')
- return a[a.length - 1]
- },
+ humanOID: (oid) => oid.split(':')[2],
fetchVehicleJourneys : (dispatch, currentPage, nextPage, queryString) => {
if(currentPage == undefined){
currentPage = 1
diff --git a/app/assets/javascripts/filters/calendar.js b/app/assets/javascripts/filters/calendar.js
new file mode 100644
index 000000000..a4e84777c
--- /dev/null
+++ b/app/assets/javascripts/filters/calendar.js
@@ -0,0 +1,6 @@
+const DateFilter = require('../helpers/date_filters')
+
+$(document).ready(function(){
+ const calendarDF = new DateFilter("#calendar_filter_btn", "Tous les champs du filtre de date doivent être remplis", "#q_contains_date_NUMi")
+ calendarDF()
+})
diff --git a/app/assets/javascripts/filters/import.js b/app/assets/javascripts/filters/import.js
new file mode 100644
index 000000000..d0b96da10
--- /dev/null
+++ b/app/assets/javascripts/filters/import.js
@@ -0,0 +1,6 @@
+const DateFilter = require('../helpers/date_filters')
+
+$(document).ready(function(){
+ const importDF = new DateFilter("#import_filter_btn", "Tous les champs du filtre de date doivent être remplis", "#q_started_on_date_NUMi")
+ importDF()
+})
diff --git a/app/assets/javascripts/filters/time_table.js b/app/assets/javascripts/filters/time_table.js
new file mode 100644
index 000000000..9e24d03fe
--- /dev/null
+++ b/app/assets/javascripts/filters/time_table.js
@@ -0,0 +1,7 @@
+$(document).ready(function(){
+ const DateFilter = require('../helpers/date_filters')
+
+ const timetableDF = new DateFilter("#time_table_filter_btn", window.I18n.fr.time_tables.error_period_filter, "#q_start_date_gteq_NUMi", "#q_end_date_lteq_NUMi")
+
+ timetableDF()
+})
diff --git a/app/assets/javascripts/filters/workbench.js b/app/assets/javascripts/filters/workbench.js
new file mode 100644
index 000000000..af3e13c59
--- /dev/null
+++ b/app/assets/javascripts/filters/workbench.js
@@ -0,0 +1,6 @@
+const DateFilter = require('../helpers/date_filters')
+
+$(document).ready(function(){
+ const workbenchDF = new DateFilter("#referential_filter_btn", window.I18n.fr.referentials.error_period_filter, "#q_validity_period_begin_gteq_NUMi", "#q_validity_period_end_lteq_NUMi")
+ workbenchDF()
+})
diff --git a/app/assets/javascripts/helpers/date_filters.js b/app/assets/javascripts/helpers/date_filters.js
new file mode 100644
index 000000000..1f48bb28f
--- /dev/null
+++ b/app/assets/javascripts/helpers/date_filters.js
@@ -0,0 +1,38 @@
+const DateFilter = function(buttonId, message, ...inputIds) {
+ this.buttonId = buttonId
+ this.inputIds = inputIds
+ this.message = message
+
+ const getVal = (str, key) => {
+ let newStr = str.replace(/NUM/, key)
+ return $(newStr).val()
+ }
+
+ const getDates = () => {
+ return this.inputIds.reduce((arr, id) => {
+ let newIds = [1, 2, 3].map(key => getVal(id, key))
+ arr.push(...newIds)
+ return arr
+ },[])
+ }
+
+ const allInputFilled = () => {
+ return getDates().every(date => !!date)
+ }
+
+ const noInputFilled = () => {
+ return getDates().every(date => !date)
+ }
+
+ const execute = () => {
+ $(this.buttonId).on("click", (e) => {
+ if (allInputFilled() == false && noInputFilled() == false) {
+ e.preventDefault()
+ alert(this.message)
+ }
+ })
+ }
+ return execute
+}
+
+module.exports = DateFilter
diff --git a/app/assets/javascripts/time_table.coffee b/app/assets/javascripts/time_table.coffee
deleted file mode 100644
index 8789cb226..000000000
--- a/app/assets/javascripts/time_table.coffee
+++ /dev/null
@@ -1,14 +0,0 @@
- $(document).on("click", "#time_table_filter_btn", (e) ->
- dates = [1, 2, 3].reduce (arr, key) ->
- arr.push $("#q_start_date_gteq_#{key}i").val(), $("#q_end_date_lteq_#{key}i").val()
- arr
- , []
-
- validDate = dates.every (date) -> !!date
-
- noDate = dates.every (date) -> !date
-
- unless (validDate || noDate)
- e.preventDefault()
- alert(window.I18n.fr.time_tables.error_period_filter)
- )
diff --git a/app/assets/javascripts/workbench.coffee b/app/assets/javascripts/workbench.coffee
deleted file mode 100644
index 0e9fe62a3..000000000
--- a/app/assets/javascripts/workbench.coffee
+++ /dev/null
@@ -1,18 +0,0 @@
- $(document).on("click", "#referential_filter_btn", (e) ->
- dates = [1, 2, 3].reduce (arr, key) ->
- arr.push $("#q_validity_period_begin_gteq_#{key}i").val(), $("#q_validity_period_end_lteq_#{key}i").val()
- arr
- , []
-
- validDate = dates.every (date) -> !!date
-
- noDate = dates.every (date) -> !date
-
- console.log("valid dates :", validDate)
- console.log("no dates :", noDate)
- console.log(dates)
-
- unless (validDate || noDate)
- e.preventDefault()
- alert(window.I18n.fr.referentials.error_period_filter)
- )
diff --git a/app/assets/stylesheets/application.sass b/app/assets/stylesheets/application.sass
index e3f776640..50f8b64cb 100644
--- a/app/assets/stylesheets/application.sass
+++ b/app/assets/stylesheets/application.sass
@@ -18,3 +18,4 @@
@import 'modules/jp_collection'
@import 'modules/vj_collection'
@import 'modules/timetables'
+@import 'modules/import_messages'
diff --git a/app/assets/stylesheets/main/access_links.sass b/app/assets/stylesheets/main/access_links.sass
deleted file mode 100644
index 65a81a2f8..000000000
--- a/app/assets/stylesheets/main/access_links.sass
+++ /dev/null
@@ -1,18 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.access_links.show
- .summary p label
- font-weight: bold
-
- .duration
- padding-left: 10px
-
-#workspace.access_links.edit,
-#workspace.access_links.new,
-#workspace.access_links.create,
-#workspace.access_links.update
- .time_select ol
- padding: 0 0 0 40%
- width: 100% \ No newline at end of file
diff --git a/app/assets/stylesheets/main/access_points.sass b/app/assets/stylesheets/main/access_points.sass
deleted file mode 100644
index 11e41967b..000000000
--- a/app/assets/stylesheets/main/access_points.sass
+++ /dev/null
@@ -1,78 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.access_points.index
-
-#workspace.access_points.edit,
-#workspace.access_points.new,
-#workspace.access_points.create,
-#workspace.access_points.update
- .time_select ol
- padding: 0 0 0 40%
- width: 100%
-
-#workspace.access_points.edit
- legend
- padding-bottom: 20px
-
-#workspace.access_points.show
- .geo_data
- padding-left: 15px
-
- .summary
- p label
- font-weight: bold
-
- .access_link_pairs
- table
- border: 0px
- border-collapse: separate
- border-spacing: 3px
-
- .link
- border: 2px solid black
-
- .access_point
- padding: 3px 15px 0px 3px
- height: 25px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
-
- img
- margin: 0px 5px 0px 5px
-
- .stop_area
- padding: 3px 15px 0px 3px
- height: 25px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
-
- img
- margin: 0px 5px 0px 5px
-
- .info
- font-size: 10px
- color: #777
- font-weight: normal
- padding-top: 10px
- padding-left: 45px
- padding-right: 3px
- padding-bottom: 3px
-
-#sidebar ul.selection li
- a
- line-height: 27px
-
- img
- height: 25px
- width: 25px
- vertical-align: middle \ No newline at end of file
diff --git a/app/assets/stylesheets/main/api_keys.sass b/app/assets/stylesheets/main/api_keys.sass
deleted file mode 100644
index 28bf171b9..000000000
--- a/app/assets/stylesheets/main/api_keys.sass
+++ /dev/null
@@ -1,7 +0,0 @@
-// Place all the styles related to the routes controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.api_keys.show
- .summary p label
- font-weight: bold \ No newline at end of file
diff --git a/app/assets/stylesheets/main/calendar.sass b/app/assets/stylesheets/main/calendar.sass
deleted file mode 100644
index f24f2b212..000000000
--- a/app/assets/stylesheets/main/calendar.sass
+++ /dev/null
@@ -1,98 +0,0 @@
-// A grey based theme, inspired by Blinksale and their ColorBurn widget. http://firewheeldesign.com
-
-// AUTHOR: Geoffrey Grosenbach http://nubyonrails.com
-
-// Colors:
-// dk: 787888
-// lt: 4f4f5b
-// lter: a8a8a8
-// white: ffffff
-
-$selected_period_color: #ffbd2b
-$selected_date_color: #8fc861
-$excluded_date_color: #ff8f85
-$overlap_date_color: #c082f4
-
-.year_choice
- font-size: 16px
- font-weight: bold
- margin: 10px 0 0 0
- text-align: center
-
- .year
- text-align: center
-
-.calendar_helper
- padding: auto
-
-.calendar
- font-size: 10px
- color: white
- text-align: center
- margin-left: 15px
- display: inline-table
-
-thead tr
- color: black
-
-th.monthName
- font-size: 12px
- font-weight: bold
- text-align: center
- padding-top: 1em
- padding-bottom: 0.7em
- color: black
-
-.dayName th
- text-align: center
- padding-top: 0.6em
- padding-bottom: 0.3em
- background-color: #303030
- color: white
- border-bottom: 1px solid white
-
-.otherMonth
- color: #999999
- background-color: #4f4f5b
- padding: 0.7em
- border-right: 1px solid #111111
- border-bottom: 1px solid #111111
-
-.day
- background-color: #333333
-
-.day, .specialDay
- border-bottom: 1px solid #111111
- padding: 0.7em
- border-right: 1px solid #111111
- border-bottom: 1px solid #111111
-
-.specialDay
- background-color: #a8a8a8 !important
-
-.selected_period
- background-color: $selected_period_color !important
-
-.selected_date
- background-color: $selected_date_color !important
-
-.excluded_date
- background-color: $excluded_date_color !important
-
-.overlaped_date
- background-color: $overlap_date_color !important
-
-.specialDay, .selected_period, .selected_date, .overlaped_date, .excluded_date
- a, a:visited, a:hover
- color: white
- text-decoration: none
-
-.specialDay a:hover, .selected_period a:hover, .selected_date a:hover, .excluded_date a:hover, .overlaped_date a:hover
- color: black
-
-.weekendDay
- background-color: #787888
-
-.today
- background-color: white
- color: black \ No newline at end of file
diff --git a/app/assets/stylesheets/main/calendars.sass b/app/assets/stylesheets/main/calendars.sass
deleted file mode 100644
index 298ce2a62..000000000
--- a/app/assets/stylesheets/main/calendars.sass
+++ /dev/null
@@ -1,11 +0,0 @@
-#calendar_form
- .btn
- margin: 5px
- #delete-btn
- margin-top: 23px
- .well
- padding-left: 50px
-
-#calendar_search_form
- button
- margin-top: 24px
diff --git a/app/assets/stylesheets/main/companies.sass b/app/assets/stylesheets/main/companies.sass
deleted file mode 100644
index 2cf1f596c..000000000
--- a/app/assets/stylesheets/main/companies.sass
+++ /dev/null
@@ -1,9 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.companies.index
-
-#workspace.companies.show
- .summary p label
- font-weight: bold \ No newline at end of file
diff --git a/app/assets/stylesheets/main/compliance_checks.sass b/app/assets/stylesheets/main/compliance_checks.sass
deleted file mode 100644
index 451972fd5..000000000
--- a/app/assets/stylesheets/main/compliance_checks.sass
+++ /dev/null
@@ -1,157 +0,0 @@
-// #workspace.compliance_checks.index
-
-#workspace.compliance_checks.show
- @import '../modules/job_status_colors'
- @import '../modules/job_status_title'
- @import '../partials/ie_report'
- @import '../modules/links'
-
-#validation_success
- margin-top: 15px
-
-#workspace.compliance_checks.report, #workspace.imports.compliance_check
- @import '../modules/job_status_colors'
- @import '../modules/job_status_title'
- @import '../modules/links'
-
- .status
- margin-left: 10px
-
- .order
- margin-bottom: 10px
- padding: 5px
- border-top: 1px solid #e4e4e4
- border-bottom: 1px solid #e4e4e4
-
- .status_ok_error
- color: #8fc861
- .status_nok_error
- color: #e22b1b
- .status_uncheck_error
- color: #898e7f
-
- .status_ok_warning
- color: #8fc861
- .status_nok_warning
- color: #ffbd2b
- .status_uncheck_warning
- color: #898e7f
-
- .resume
- &:after
- content: " "
- display: block
- height: 0
- clear: both
- visibility: hidden
-
- .col1
- float: left
- width: 45%
-
- .col2
- margin-left: 10px
- float: left
- width: 45%
-
- .graph
- height: 200px
-
- .caption
- text-align: center
- font-weight: bold
-
- .report
- .table
- margin-top: 20px
-
- dl.inline
- width: 100%
- overflow: hidden
-
- dt
- float: left
- clear: left
- width: 35%
- padding-top: 5px
- border-top: 1px solid #eee
- -ms-word-break: break-all
- word-break: break-all
- word-break: break-word
- -webkit-hyphens: auto
- -moz-hyphens: auto
- -ms-hyphens: auto
- hyphens: auto
-
- dd
- float: left
- width: 65%
- padding-top: 10px
- border-top: 1px solid #eee
-
- .severity__improvment,
- .severity_warning,
- .severity_error
- border: 1px solid
- margin: 10px 0px
- padding: 10px 10px 10px 10px
- background-repeat: no-repeat
- background-position: 10px center
- -moz-border-radius: 0.5em
- -webkit-border-radius: 0.5em
- border-radius: 0.5em
- height: 100%
-
- &:after
- content: " "
- display: block
- height: 0
- clear: both
- visibility: hidden
-
- .status_icon
- float: left
- width: 20%
- height: auto
-
- img
- vertical-align: middle
- width: 48px
- height: 48px
-
- .status_text
- float: left
- width: 70%
-
- .code
- font-size: 12px
- font-weight: bold
-
- .severity
- font-size: 10px
-
- .explanation
- display: none
- font-size: 12px
- margin: 5px 0 0 0
-
- .attributes
- font-size: 10px
- font-weight: bold
- margin: 5px 0 0px 0
-
- .severity_improvment
- color: black
- background-color: #c5cf4c
-
- .severity_warning
- color: black
- background-color: #f1dd30
-
- .severity_error
- color: black
- background-color: #ff9a0c
-
- .file_error
- font-size: 14px
- color: #898e7f \ No newline at end of file
diff --git a/app/assets/stylesheets/main/connection_links.sass b/app/assets/stylesheets/main/connection_links.sass
deleted file mode 100644
index a23fbcdff..000000000
--- a/app/assets/stylesheets/main/connection_links.sass
+++ /dev/null
@@ -1,30 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.connection_links.index
-
-#workspace.connection_links.show
- .summary p label
- font-weight: bold
-
- .duration
- padding-left: 10px
-
-#workspace.connection_links.select_departure
- .token-input-list
- display: inline-block
-
-#workspace.connection_links.select_arrival
- .token-input-list
- display: inline-block
-
-#workspace.connection_links.edit,
-#workspace.connection_links.new,
-#workspace.connection_links.create,
-#workspace.connection_links.update
- legend
- border: 0px
-
- .panel
- margin-left: 25% \ No newline at end of file
diff --git a/app/assets/stylesheets/main/errors.sass b/app/assets/stylesheets/main/errors.sass
deleted file mode 100644
index ee603e459..000000000
--- a/app/assets/stylesheets/main/errors.sass
+++ /dev/null
@@ -1,21 +0,0 @@
-#workspace.errors
- body
- text-align: center
-
- div.error
- width: 45em
- padding: 1em
- margin: 2em auto 0 auto
- border: 1px solid #ccc
- border-right-color: #999
- border-bottom-color: #999
-
- h2
- font-size: 100%
- color: #f00
- line-height: 1.5em
- font-weight: bold
-
- a, a:visited
- text-decoration: underline
- color: blue \ No newline at end of file
diff --git a/app/assets/stylesheets/main/export_tasks.sass b/app/assets/stylesheets/main/export_tasks.sass
deleted file mode 100644
index 799b5a13f..000000000
--- a/app/assets/stylesheets/main/export_tasks.sass
+++ /dev/null
@@ -1,10 +0,0 @@
-#workspace.export_tasks.new, #workspace.export_tasks.create
- .nav
- margin: 30px 0 10px 0
-
- .highlight
- padding: 9px 14px
- margin-bottom: 14px
- background-color: #f7f7f9
- border: 1px solid #e1e1e8
- border-radius: 4px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/exports.sass b/app/assets/stylesheets/main/exports.sass
deleted file mode 100644
index 875dc13f5..000000000
--- a/app/assets/stylesheets/main/exports.sass
+++ /dev/null
@@ -1,19 +0,0 @@
-// Place all the styles related to the Exports controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.exports.index
- .panel.export
- .panel-footer
- .history
- margin-top: 5px
-
-#workspace.exports.show
- @import '../partials/ie_report'
- @import '../modules/job_status_colors'
- @import '../modules/job_status_title'
- @import '../modules/links'
-
- .export-attributes
- font-size: 1.7em
- margin-top: 20px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/group_of_lines.sass b/app/assets/stylesheets/main/group_of_lines.sass
deleted file mode 100644
index d63eeb607..000000000
--- a/app/assets/stylesheets/main/group_of_lines.sass
+++ /dev/null
@@ -1,15 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.group_of_lines.index
-
-#workspace.group_of_lines.show
- .summary p label
- font-weight: bold
-
- .lines_detail div.page_info
- margin-top: 0px
-
- .lines
- margin-top: 10px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/help.sass b/app/assets/stylesheets/main/help.sass
deleted file mode 100644
index 87f21c3c3..000000000
--- a/app/assets/stylesheets/main/help.sass
+++ /dev/null
@@ -1,121 +0,0 @@
-#workspace.help
- ul li
- list-style: circle
- margin: 7px 0 7px 20px
-
- ol ul li
- list-style: circle
- margin: 7px 0 7px 20px
-
- ol
- list-style: none
- margin: 7px 0 7px 20px
- padding: 0
- counter-reset: num
-
- li:before
- content: counter(num) '. '
- counter-increment: num
-
- ol li:before
- content: counters(num, '.') ' '
-
- em, cite
- font-style: italic
-
- strong
- font-weight: bold
-
- p.attr_data
- font-style: italic
- text-decoration: underline
-
- p.olnext
- margin: -7px 0 0 40px !important
-
- p.ddnext
- margin: 0 0 0 30px !important
-
- p.note
- margin-left: 20px !important
- font-weight: bold
-
- p.border_image
- text-align: center
-
- img
- border-style: solid
- border-width: 1px
- border-color: rgb(187,187,187)
-
- table
- width: 100%
-
- td
- padding: 3px 5px
- width: 30%
-
- &.meta
- width: 50%
-
- th, td
- border: 1px solid black
-
- dt
- font-style: italic
- margin: 5px 0
-
- dd
- padding-left: 10px
-
-#sidebarhelp.help
- h2
- font-size: 17px
-
- h3
- font-size: 15px
-
- h4
- font-weight: bold
- padding: 7px 0
-
- ul li
- list-style: circle
- margin: 7px 0 7px 20px
-
- ol
- list-style: none
- margin: 7px 0 7px 20px
- padding: 0
- counter-reset: num
-
- li:before
- content: counter(num) '. '
- counter-increment: num
-
- ol li:before
- content: counters(num, '.') ' '
-
- em, cite
- font-style: italic
-
- strong
- font-weight: bold
-
- p.attr_data
- font-style: italic
- text-decoration: underline
-
- table
- width: 100%
-
- td
- padding: 3px 5px
- width: 30%
-
- dt
- font-style: italic
- margin: 5px 0
-
- dd
- padding-left: 10px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/import_tasks.sass b/app/assets/stylesheets/main/import_tasks.sass
deleted file mode 100644
index 810582cf2..000000000
--- a/app/assets/stylesheets/main/import_tasks.sass
+++ /dev/null
@@ -1,11 +0,0 @@
-#workspace.import_tasks.new,
-#workspace.import_tasks.create
- .nav
- margin: 30px 0 10px 0
-
- .highlight
- padding: 9px 14px
- margin-bottom: 14px
- background-color: #f7f7f9
- border: 1px solid #e1e1e8
- border-radius: 4px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/imports.sass b/app/assets/stylesheets/main/imports.sass
deleted file mode 100644
index af5e88218..000000000
--- a/app/assets/stylesheets/main/imports.sass
+++ /dev/null
@@ -1,40 +0,0 @@
-#workspace.imports.index
- .panel.import
- .panel-footer
- min-height: 5.5em
-
- .save-mode
- color: $brand-info
-
- .fa-lg
- font-size: 1em
- .fa-ban
- opacity: 0.6
-
- .history
- margin-top: 5px
-
-#workspace.imports.index,
-#workspace.imports.show
- .import-attributes
- .save-mode, .format
- display: inline-block
-
- .save-mode
- color: $brand-info
- margin-left: 0.3em
-
- .fa-ban
- opacity: 0.6
- .fa-stack
- font-size: 0.9em
-
-#workspace.imports.show
- @import '../partials/ie_report'
- @import '../modules/job_status_colors'
- @import '../modules/job_status_title'
- @import '../modules/links'
-
- .import-attributes
- font-size: 1.7em
- margin-top: 20px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/journey_patterns.sass b/app/assets/stylesheets/main/journey_patterns.sass
deleted file mode 100644
index 07c3260d4..000000000
--- a/app/assets/stylesheets/main/journey_patterns.sass
+++ /dev/null
@@ -1,49 +0,0 @@
-// Place all the styles related to the routes controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.journey_patterns.edit,
-#workspace.journey_patterns.new,
-#workspace.journey_patterns.create,
-#workspace.journey_patterns.update
- #route_color
- width: 100px
- color: white
- font-weight: bold
-
- #journey_pattern_stop_point_ids_input fieldset .choices-group
- margin-top: 25px
-
-#workspace.journey_patterns.show
- .journey_pattern_color
- color: white
- font-weight: bold
- padding: 0 5px 0 5px
-
- .summary p label
- font-weight: bold
-
- .stop_points_detail div.page_info
- margin-top: 0px
-
- .stop_points
- margin-top: 20px
-
- .journey_pattern_stop_points
- clear: both
- margin: 0px
- padding: 0px
-
- .stop_point
- .position
- width: 25px
- height: 20px
- float: left
- background-color: #61970B
- font-weight: bold
- color: white
- margin-right: 10px
- padding-left: 4px
-
- #middle #sidebar a.control-shape
- color: orange \ No newline at end of file
diff --git a/app/assets/stylesheets/main/layout.sass b/app/assets/stylesheets/main/layout.sass
deleted file mode 100644
index d75c359ae..000000000
--- a/app/assets/stylesheets/main/layout.sass
+++ /dev/null
@@ -1,133 +0,0 @@
-body
- padding-top: 50px
-
-h1
- color: white
-
-h1, .h1, h2, .h2, h3, .h3
- margin-bottom: 20px
-
-label.label
- color: black
- font-size: 100%
-
-ol.breadcrumb
- margin-top: 10px
-
-.ce-hide
- display: none
-
-#middle
- position: relative
- min-height: 500px
- -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .2)
- box-shadow: 0 0 5px 2px rgba(0, 0, 0, .2)
- padding-top: 10px
- padding-bottom: 10px
- margin-top: 20px
- margin-bottom: 20px
- background: white
-
- .main_actions
- text-align: right
-
- .alert
- margin-top: 15px
-
- #sidebar
- height: 100%
- padding-top: 20px
- border-left: 1px solid $gray-lighter
-
- &.ce-SidebarFloatBlock
- position: absolute
- height: auto
- right: 0
- background-color: #fff
- top: 45px
-
- label
- color: #555555
- font-weight: normal
- font-size: 12px
-
- a
- color: #666
-
- .actions
- margin-bottom: 20px
-
- li
- margin-bottom: 5px
-
- p
- font-size: 12px
-
- fieldset.history_tag
- font-size: 12px
- color: $gray-light
-
- legend
- font-size: 14px
- margin-bottom: 10px
-
- fieldset
- border-color: white
-
- p
- margin-top: 5px
-
- label
- font-size: 12px
- span
- font-style: oblique
- font-size: 12px
-
- ol
- padding: 0px
-
- li
- list-style: none
-
- ul
- padding: 0px
-
- li
- list-style: none
-
- ul.selection li
- a
- padding-left: 20px
-
- &.current
- text-decoration: none
- color: black !important
- background: url(image-path('icons/accept.png')) no-repeat
-
- &.all
- background-image: none
-
- div#compact_form
- form
- border-bottom: 1px solid #BBB
-
- fieldset
- padding: 0
- border: 0
-
- li
- padding: 0
-
- label
- padding-left: 20px
- width: 70%
-
- input
- width: 20px
-
- fieldset.actions
- margin-bottom: 0
- padding-left: 20px
-
- fieldset.inputs
- padding-top: 16px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/lines.sass b/app/assets/stylesheets/main/lines.sass
deleted file mode 100644
index b9bdfae8f..000000000
--- a/app/assets/stylesheets/main/lines.sass
+++ /dev/null
@@ -1,87 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.lines.index
- input[type='checkbox'].multiple_selection
- vertical-align: middle
-
- #search
- label
- margin-bottom: 0px
-
- input[type='checkbox']
- margin-left: 3px
-
-#workspace.lines.edit,
-#workspace.lines.new,
-#workspace.lines.create,
-#workspace.lines.update
- #line_color_old
- width: 100px
- color: white
- font-weight: bold
-
- .nested-fields.footnote, .add_footnote
- @extend .col-md-offset-3
-
- .footnotes_block
- margin-bottom: 30px
-
-#workspace.lines.show
- .summary p
- label
- font-weight: bold
-
- .color
- padding: 3px 15px 3px 15px
-
- .group_of_line
- .position
- width: 25px
- height: 20px
- float: left
- background-color: #61970B
- font-weight: bold
- color: white
- margin-right: 10px
- padding-left: 4px
-
- .color
- background-color: white
- width: 64px
- height: 64px
- float: left
- margin-right: 10px
- border: 1px solid #999
-
- a
- text-decoration: none
-
- .name a
- display: inline
-
-.ce-LineBlock-header-list
- display: table
- width: 100%
- margin: 0
- padding: 0
-
- > li
- display: table-cell
- vertical-align: middle
-
- > input
- margin-top: 0
-
- &:first-child
- width: 37px
-
- &:last-child
- text-align: right
- width: 73px
-
-.ce-LineBlock-header-title
- padding: 0 !important
- line-height: 12px
- font-size: 13px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/multiple_selection.sass b/app/assets/stylesheets/main/multiple_selection.sass
deleted file mode 100644
index b46dded01..000000000
--- a/app/assets/stylesheets/main/multiple_selection.sass
+++ /dev/null
@@ -1,17 +0,0 @@
-input[type='checkbox'].multiple_selection
- margin-left: 0px
- position: absolute
- top: 0px
-
-#multiple_selection_menu
- h3
- margin-top: 20px
-
- div
- padding: 6px 8px
-
- .actions
- margin-top: 20px
-
- .select_all, .deselect_all
- font-size: 0.8em \ No newline at end of file
diff --git a/app/assets/stylesheets/main/networks.sass b/app/assets/stylesheets/main/networks.sass
deleted file mode 100644
index 4d3717f26..000000000
--- a/app/assets/stylesheets/main/networks.sass
+++ /dev/null
@@ -1,9 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.networks.index
-
-#workspace.networks.show
- .summary p label
- font-weight: bold \ No newline at end of file
diff --git a/app/assets/stylesheets/main/organisations.sass b/app/assets/stylesheets/main/organisations.sass
deleted file mode 100644
index 4bfee860a..000000000
--- a/app/assets/stylesheets/main/organisations.sass
+++ /dev/null
@@ -1,5 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.organisations.show \ No newline at end of file
diff --git a/app/assets/stylesheets/main/referentials.sass b/app/assets/stylesheets/main/referentials.sass
deleted file mode 100644
index 293807560..000000000
--- a/app/assets/stylesheets/main/referentials.sass
+++ /dev/null
@@ -1,34 +0,0 @@
-// Place all the styles related to the referentials controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.referentials.index
-
-#workspace.referentials.show
- .summary p label
- font-weight: bold
-
- .panel
- font-size: 12px
- width: 75%
-
- .panel-heading
- font-weight: bold
-
- li.list-group-item
- padding: 5px 15px
-
-#sidebar div#clean_up
- form
- fieldset
- li
- margin-bottom: 0px
-
- &.date
- input
- width: 125px
- font-size: 12px
- height: 25px
-
- label
- width: 35% \ No newline at end of file
diff --git a/app/assets/stylesheets/main/route_sections.sass b/app/assets/stylesheets/main/route_sections.sass
deleted file mode 100644
index fe3c98c10..000000000
--- a/app/assets/stylesheets/main/route_sections.sass
+++ /dev/null
@@ -1,54 +0,0 @@
-#workspace.route_sections_selectors.edit
- td.route_section
- .input
- padding: 0
- margin: 0
-
- select
- width: 100%
-
- a.edit-route-section
- background: url(image-path('icons/edit.png')) no-repeat 0% 50%
- text-indent: -9999px
- display: inline-block
- width: 16px
- height: 16px
- margin-right: 8px
-
- &.disabled
- background-image: url(image-path('icons/edit-disabled.png'))
-
- #map-selection
- position: relative
-
- span
- display: inline-block
-
- .departure, .arrival
- width: 25%
-
- .actions
- width: 25%
- overflow: visible
- padding-left: 0
- position: absolute
- right: 0
-
-#workspace.route_sections.index
- th.distance, th.points
- text-align: center
-
- td.distance, td.points, td.actions
- text-align: center
-
-#workspace.route_sections.edit
- .formtastic
- .input .label
- width: 40%
-
- .actions
- padding-left: 19%
-
- #map
- width: 600px
- heigth: 600px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/routes.sass b/app/assets/stylesheets/main/routes.sass
deleted file mode 100644
index 977d2f4b3..000000000
--- a/app/assets/stylesheets/main/routes.sass
+++ /dev/null
@@ -1,46 +0,0 @@
-// Place all the styles related to the routes controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.lines.show
-
-#workspace.routes.edit,
-#workspace.routes.new,
-#workspace.routes.create,
-#workspace.routes.update
- #route_color
- width: 100px
- color: white
- font-weight: bold
-
- #stop_points .nested-fields
- ol
- margin-left: 25%
-
- .handle
- margin-left: 5px
-
- .search_stop_area
- margin-bottom: 0px !important
-
- div.resize
- height: 40px
- line-height: 40px
- font-size: 16px
-
- #stop_points .links
- margin: 10px 0 15px 25%
-
-#workspace.routes.edit_boarding_alighting
- .stop_area
- padding-top: 7px
-
-// #workspace.routes.show
-
-.large-map
- width: 100%
- height: 600px
-
- #map
- width: 100%
- height: 100% \ No newline at end of file
diff --git a/app/assets/stylesheets/main/rule_parameter_sets.sass b/app/assets/stylesheets/main/rule_parameter_sets.sass
deleted file mode 100644
index ab58b7bf9..000000000
--- a/app/assets/stylesheets/main/rule_parameter_sets.sass
+++ /dev/null
@@ -1,45 +0,0 @@
-// Place all the styles related to the rule_parameter_sets controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.rule_parameter_sets.index
-
-#workspace.rule_parameter_sets.show,
-#workspace.compliance_check_tasks.rule_parameter_set
- .summary label
- font-weight: bold
-
- div.attributes_group
- margin: 15px 0 15px 0
-
- .title
- font-weight: bold
-
- .columns
- margin-left: 10px
-
- div
- display: inline-block
-
- &.two_columns
- width: 45%
- &.three_columns
- width: 30%
- &.four_columns
- width: 23%
-
- label
- color: #616161
-
- .value
- margin-left: 5px
-
- div.rule_parameter_by_mode
- margin: 20px 0 0 0 !important
-
- .mode_specific
- display: none
- margin: 0 0 0 10px
-
- p label
- color: #616161 \ No newline at end of file
diff --git a/app/assets/stylesheets/main/simple_form.sass b/app/assets/stylesheets/main/simple_form.sass
deleted file mode 100644
index 143ea692c..000000000
--- a/app/assets/stylesheets/main/simple_form.sass
+++ /dev/null
@@ -1,3 +0,0 @@
-#workspace
- .submit
- @extend .col-md-offset-3 \ No newline at end of file
diff --git a/app/assets/stylesheets/main/stop_areas.sass b/app/assets/stylesheets/main/stop_areas.sass
deleted file mode 100644
index f8e1e148a..000000000
--- a/app/assets/stylesheets/main/stop_areas.sass
+++ /dev/null
@@ -1,165 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.stop_areas.index
- #country_codes
- display: none
-
-#workspace.stop_areas.edit,
-#workspace.stop_areas.new,
-#workspace.stop_areas.update,
-#workspace.stop_areas.create
- legend
- padding-bottom: 20px
-
- #prefetch
- padding: 10px 10px 20px 10px
-
- label
- font-size: 16px
- margin-right: 25px
-
- input
- width: 330px
-
- #map
- width: 50%
-
-#workspace.stop_areas.show
- .geo_data
- padding-left: 15px
-
- .summary
- p label
- font-weight: bold
-
-.genealogical
- .parent
- border: 2px solid black
- float: left
- padding: 3px 15px 3px 3px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
- img
- margin: 0px 5px 0px 5px
-
- .lines
- float: left
-
- .line
- border: 2px solid black
- padding: 3px 15px 3px 3px
- height: 25px
- margin-bottom: 5px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
- img
- margin: 0px 5px 0px 5px
-
- .no_parent
- float: left
- padding: 3px 15px 3px 3px
- width: 150px
-
- .target
- border: 2px solid #86b41d
- float: left
- padding: 3px 15px 3px 3px
- font-weight: bold
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
- img
- margin: 0px 5px 0px 5px
-
- .children
- float: left
-
- .child
- border: 2px solid black
- padding: 3px 15px 3px 3px
- margin-bottom: 5px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
- img
- margin: 0px 5px 0px 5px
-
- .link
- float: left
- padding: 7px
- margin-right: 10px
- margin-left: 10px
- height: 25px
-
-#workspace.stop_areas.select_parent
- .token-input-list
- display: inline-block
-
-#workspace.stop_areas.add_children
- .token-input-list
- display: inline-block
-
-#workspace.stop_areas.access_links
- .access_link_pairs
- .link
- border: 2px solid black
-
- .access_point
- float: left
- padding: 3px 15px 0px 3px
- height: 25px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
- img
- margin: 0px 5px 0px 5px
-
- .stop_area
- float: left
- padding: 3px 15px 0px 3px
- height: 25px
-
- *
- vertical-align: middle
-
- span
- margin-left: 7px
- img
- margin: 0px 5px 0px 5px
-
- .info
- font-size: 10px
- color: #777
- font-weight: normal
- padding-top: 0px
- padding-left: 45px
- padding-right: 3px
- padding-bottom: 3px
-
-#sidebar ul.selection li
- a
- line-height: 27px
-
- img
- height: 25px
- width: 25px
- vertical-align: middle \ No newline at end of file
diff --git a/app/assets/stylesheets/main/stop_points.sass b/app/assets/stylesheets/main/stop_points.sass
deleted file mode 100644
index a17814d3b..000000000
--- a/app/assets/stylesheets/main/stop_points.sass
+++ /dev/null
@@ -1,26 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-#workspace.stop_points.index
- // .stop_points
-
- #sortable_stop_points .stop_point
- /* to create multi-column index */
- width: 350px
- padding-right: 10px
-
- .handle
- cursor: move
- margin-right: 7px
- margin-bottom: 20px
-
- a.link
- background: url(image-path('icons/link-small.png')) no-repeat 0% 50%
-
- .position
- background-color: #61970B
- font-weight: bold
- color: white
- margin-right: 10px
- padding-left: 4px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/time_table_combinations.sass b/app/assets/stylesheets/main/time_table_combinations.sass
deleted file mode 100644
index 9de2c2235..000000000
--- a/app/assets/stylesheets/main/time_table_combinations.sass
+++ /dev/null
@@ -1,7 +0,0 @@
-#modal_combine
- .time_table_combination
- .radio input[type='radio']
- position: inherit !important
-
- .inputs
- overflow: visible !important \ No newline at end of file
diff --git a/app/assets/stylesheets/main/time_tables.sass b/app/assets/stylesheets/main/time_tables.sass
deleted file mode 100644
index 6918bec1e..000000000
--- a/app/assets/stylesheets/main/time_tables.sass
+++ /dev/null
@@ -1,135 +0,0 @@
-// Place all the styles related to the lines controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
-
-// #workspace.time_tables.index
-
-#workspace.time_tables.show
- .modal-body
- overflow-y: visible
-
- .summary
- margin-top: 20px
-
- p label
- font-weight: bold
-
- .legend
- margin-top: 20px
-
- .title
- font-weight: bold
-
- .excluded_date, .overlaped_date, .selected_date, .selected_period
- margin-left: 20px
- margin-right: 5px
-
- .typeahead.dropdown-menu
- z-index: 100001
-
- .validity_out
- color: red
-
- .validity_out_soon
- color: orange
-
- .validity_regular
- color: green
-
- span.included_day_type
- font-weight: bolder
- margin-right: 3px
-
- span.excluded_day_type
- margin-right: 3px
-
- .period
- padding-left: 50px
- padding-right: 450px
-
- .date
- padding-left: 50px
-
- .odd
- padding-left: 50px
- padding-right: 450px
-
- .even
- padding-left: 50px
- padding-right: 450px
-
- .actions
- float: right
-
- #associated_calendars
- padding-top: 15px
-
-#workspace.time_tables.edit,
-#workspace.time_tables.new,
-#workspace.time_tables.create,
-#workspace.time_tables.update,
-#workspace.time_tables.duplicate
- fieldset.inputs
- overflow: visible !important
-
- .tags
- overflow: visible !important
-
- h3
- .dates
- cursor: pointer
-
- .periods
- cursor: pointer
-
- .excluded_dates
- cursor: pointer
-
- #dates,
- #excluded_dates,
- #periods
- margin-left: 25%
-
- .nested-fields
- margin: 5px
-
- ol li
- display: inline
-
- .day_type ol
- float: left
- margin: 0
- padding: 0 0 0 0
- width: 100%
- list_style: none outside none
- margin-top: 1em
- margin-bottom: 1em
-
- li
- float: left
- margin: 0 0 0 0
- width: auto
- padding: 0
-
- label
- padding-left: 10%
- margin-top: 0
-
- .day_type_label
- float: left
- margin-top: 0
- width: 25%
-
- a.add_fields
- margin-left: 25%
- margin-top: 20px
- padding-left: 18px
- background: url(image-path('icons/add.png')) no-repeat 0% 50%
-
- a.remove_fields
- margin-left: 10px
- padding-left: 18px
- background: url(image-path('icons/remove.png')) no-repeat 0% 50%
-
- .actions
- margin-top: 20px
diff --git a/app/assets/stylesheets/main/vehicle_journey_frequencies.sass b/app/assets/stylesheets/main/vehicle_journey_frequencies.sass
deleted file mode 100644
index a827cc4d2..000000000
--- a/app/assets/stylesheets/main/vehicle_journey_frequencies.sass
+++ /dev/null
@@ -1,155 +0,0 @@
-#workspace
- .ce-TimeBandFormTable
- .btn
- white-space: normal
- width: 130px
- font-size: 11px
- padding: 2px 0
-
- .ce-TimeBandFormTable
- th
- text-align: left
- padding: 6px 20px
-
- td
- padding: 6px 20px
-
- .ce-TimeBandFormTable td
- vertical-align: middle
-
- .ce-TimeBandFormTable-circleLine
- position: relative
-
- .ce-TimeBandFormTable-line:after
- content: ''
- position: absolute
- top: 0
- bottom: 0
- left: 50%
- width: 2px
- margin-left: -1px
- background-color: #61970b
-
- tr:first-child td .ce-TimeBandFormTable-line:after
- top: 50%
-
- tr:last-child td .ce-TimeBandFormTable-line:after
- bottom: 50%
-
- .ce-TimeBandFormTable-circle
- position: relative
- z-index: 999
- display: block
- width: 16px
- height: 16px
- border-radius: 8px
- background-color: #4d7809
-
- tr:hover .ce-TimeBandFormTable-circle
- background-color: #fff
- border: 2px solid #61970b
-
- .ce-FrequencyFormFields
- display: table
- width: 100%
- padding-left: 25%
-
- .token-input-list
- width: 80%
-
- .inline-errors
- margin: 0
-
- > li
- display: table-cell
- width: 21%
- vertical-align: top
- padding: 0
- margin: 0
-
- &:first-child select
- width: 160px
-
- &:nth-last-child(2), &:last-child
- width: 8%
-
- label
- font-size: 13px
- padding-left: 0
-
- legend
- position: relative
- width: auto
- float: none
- border: 0
-
- label
- position: relative
-
- .fragments-group
- float: none
- width: auto
- padding: 0
-
- > li
- display: inline-block
- vertical-align: top
-
- &.vehicle_journey_frequencies
- .actions-add-fields
- clear: both
- padding-left: 25%
- margin-top: 10px
-
- td.ce-VehicleJourneyBlock-frequency
- background-color: rgba(95, 95, 95, 0.2)
-
- .ce-VehicleJourneyFrequencyTableBlock
- margin: 0 !important
-
- .ce-VehicleJourneyFrequenciesMatrix
- margin: 0
- padding: 0
-
- > li
- background-color: #eee
- height: 22px
- margin-bottom: 20px
- position: relative
-
- > ul
- margin: 0
- padding: 0
-
- > li
- cursor: pointer
- position: absolute
- padding: 0 2px
- top: 0
- bottom: 0
- background-color: $brand-primary
- border-left: 1px solid #000
- border-right: 1px solid #000
-
- &:hover
- z-index: 9999
- background-color: #4d7809
- top: -2px
- bottom: -2px
-
- > span
- display: block
-
- .ce-VehicleJourneyFrequenciesMatrix-firstDepartureTime,
- .ce-VehicleJourneyFrequenciesMatrix-lastDepartureTime
- display: none
- position: absolute
- top: -13px
- font-size: 11px
- color: #262626
-
- .ce-VehicleJourneyFrequenciesMatrix-firstDepartureTime
- left: -32px
-
- .ce-VehicleJourneyFrequenciesMatrix-lastDepartureTime
- right: -32px \ No newline at end of file
diff --git a/app/assets/stylesheets/main/vehicle_journeys.sass b/app/assets/stylesheets/main/vehicle_journeys.sass
deleted file mode 100644
index ec0b25dbc..000000000
--- a/app/assets/stylesheets/main/vehicle_journeys.sass
+++ /dev/null
@@ -1,118 +0,0 @@
-#workspace.vehicle_journeys.edit,
-#workspace.vehicle_journeys.update,
-#workspace.vehicle_journeys.create,
-#workspace.vehicle_journeys.new,
-#workspace.vehicle_journey_frequencies.edit,
-#workspace.vehicle_journey_frequencies.update,
-#workspace.vehicle_journey_frequencies.create,
-#workspace.vehicle_journey_frequencies.new
- #route_color
- width: 100px
- color: white
- font-weight: bold
-
- .btn
- padding: 6px 12px
-
- .time_table_list
- padding-left: 25%
-
- #vehicle_journey_footnote_ids_input,
- #vehicle_journey_frequency_footnote_ids_input
- min-height: 3em
-
- .vehicle_journey_at_stops,
- .vehicle_journey_frequency_at_stops
- margin-left: 25%
-
- thead, tbody, tfoot
- th, td
- text-align: center
-
- .journey_pattern_dependent_list
- tr.no_stop
- display: none
-
- td.departure_time, td.arrival_time
- &.missing
- background-color: $brand-warning
-
- &.invalid_position
- background-color: $brand-danger
-
- .title
- font-weight: bold
- margin-bottom: 20px
-
- span
- margin-left: 10px
- margin-right: 10px
-
- .slide
- margin-left: 30px
-
-#workspace.vehicle_journeys.index,
-#workspace.vehicle_journey_frequencies.index
- #search
- ul.token-input-list
- display: inline-block
- vertical-align: middle
- margin-left: 15px
-
- .advanced_search
- margin-left: 40px
-
- .time_tables_id_eq
- margin-left: 20px
-
- .vehicle_journey_at_stops_departure_time_gt
- margin-left: 20px
-
- table
- margin: 20px 0 0 0
-
- .calendars
- font-size: 12px
-
- .stop_area
- width: 200px
-
- td.hours
- text-align: center
-
- tr th.vehicle_journey
- text-align: center
-
-#workspace.vehicle_journeys.show,
-#workspace.vehicle_journeys.edit,
-#workspace.vehicle_journeys.update,
-#workspace.vehicle_journeys.create,
-#workspace.vehicle_journeys.new,
-#workspace.vehicle_journey_journey.show,
-#workspace.vehicle_journey_journey.edit,
-#workspace.vehicle_journey_journey.update,
-#workspace.vehicle_journey_journey.create,
-#workspace.vehicle_journey_journey.new
- .slide
- cursor: pointer
-
-#workspace.vehicle_journeys.show,
-#workspace.vehicle_journey_frequencies.show
- .summary p label
- font-weight: bold
-
-#workspace.vehicle_journeys.timeless,
-#workspace.vehicle_journey_frequencies.timeless
- .summary p label
- font-weight: bold
-
- .vehicle_journeys,
- .vehicle_journey_frequencies
- margin-top: 20px
-
- .vehicle_journey,
- .vehicle_journey_frequency
- span.included_day_type
- font-weight: bolder
-
- // span.excluded_day_type \ No newline at end of file
diff --git a/app/assets/stylesheets/main/vehicle_translation.sass b/app/assets/stylesheets/main/vehicle_translation.sass
deleted file mode 100644
index f1fd12e14..000000000
--- a/app/assets/stylesheets/main/vehicle_translation.sass
+++ /dev/null
@@ -1,10 +0,0 @@
-#translate_form
- .repeat_cloning
- margin-top: 30px
-
- .modal-footer
- .actions
- padding-left: 75%
-
- li
- margin: 0 \ No newline at end of file
diff --git a/app/assets/stylesheets/modules/import_messages.sass b/app/assets/stylesheets/modules/import_messages.sass
new file mode 100644
index 000000000..e5666cbcd
--- /dev/null
+++ b/app/assets/stylesheets/modules/import_messages.sass
@@ -0,0 +1,5 @@
+.import_messages
+ .status_icon
+ padding-right: 20px
+ h1
+ padding-bottom: 20px
diff --git a/app/controllers/api/v1/netex_imports_controller.rb b/app/controllers/api/v1/netex_imports_controller.rb
index 046802ff9..fc85e35dd 100644
--- a/app/controllers/api/v1/netex_imports_controller.rb
+++ b/app/controllers/api/v1/netex_imports_controller.rb
@@ -41,7 +41,7 @@ module Api
unless @netex_import.referential
Rails.logger.info "Can't create referential for import #{@netex_import.id}: #{@new_referential.inspect} #{@new_referential.metadatas.inspect} #{@new_referential.errors.full_messages}"
- @netex_import.messages.create criticity: :error, message_key: "cant_create_referential"
+ @netex_import.messages.create criticity: :error, message_key: "referential_creation"
end
rescue ActiveRecord::RecordInvalid
render json: {errors: @netex_import.errors}, status: 406
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 47b54039c..cc1c30703 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -34,7 +34,8 @@ class ApplicationController < ActionController::Base
helper_method :current_organisation
def current_functional_scope
- JSON.parse(current_organisation.sso_attributes["functional_scope"]) if current_organisation
+ functional_scope = current_organisation.sso_attributes.try(:[], "functional_scope") if current_organisation
+ JSON.parse(functional_scope) if functional_scope
end
helper_method :current_functional_scope
diff --git a/app/controllers/autocomplete_time_tables_controller.rb b/app/controllers/autocomplete_time_tables_controller.rb
index 375928aeb..d0cd94e26 100644
--- a/app/controllers/autocomplete_time_tables_controller.rb
+++ b/app/controllers/autocomplete_time_tables_controller.rb
@@ -9,7 +9,7 @@ class AutocompleteTimeTablesController < InheritedResources::Base
end
def referential
- @referential ||= current_organisation.referentials.find params[:referential_id]
+ @referential ||= Referential.find params[:referential_id]
end
protected
diff --git a/app/controllers/compliance_check_tasks_controller.rb b/app/controllers/compliance_check_tasks_controller.rb
deleted file mode 100644
index c2995c94d..000000000
--- a/app/controllers/compliance_check_tasks_controller.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-class ComplianceCheckTasksController < ChouetteController
- defaults :resource_class => ComplianceCheckTask
-
- respond_to :html, :only => [:new, :create]
- respond_to :js, :only => [:new, :create]
-
- belongs_to :referential
-
- def new
- begin
- new!
- rescue Ievkit::Error, Faraday::Error => error
- logger.error("Iev failure : #{error.message}")
- flash[:error] = t(error.locale_for_error)
- redirect_to referential_path(@referential)
- end
- end
-
- def create
- begin
- create! do |success, failure|
- success.html { redirect_to referential_compliance_checks_path(@referential) }
- end
- rescue Ievkit::Error, Faraday::Error => error
- logger.error("Iev failure : #{error.message}")
- flash[:error] = t(error.locale_for_error)
- redirect_to referential_path(@referential)
- end
- end
-
- def references
- references_type = params[:filter].pluralize
- references = @referential.send(references_type).where("name ilike ?", "%#{params[:q]}%").select("id, name")
- puts references.inspect
- respond_to do |format|
- format.json do
- render :json => references.collect { |child| { :id => child.id, :name => child.name } }
- end
- end
- end
-
- protected
-
- def build_resource
- @compliance_check_task ||= ComplianceCheckTask.new( params[:compliance_check_task] || {} )
- end
-
-
-end
diff --git a/app/controllers/compliance_checks_controller.rb b/app/controllers/compliance_checks_controller.rb
index 2d67aae98..07438cf99 100644
--- a/app/controllers/compliance_checks_controller.rb
+++ b/app/controllers/compliance_checks_controller.rb
@@ -1,87 +1,4 @@
-require 'will_paginate/array'
-
class ComplianceChecksController < ChouetteController
- defaults :resource_class => ComplianceCheck
-
- respond_to :html, :js
- respond_to :zip, :only => :export
- belongs_to :referential
-
- def index
- begin
- index! do
- build_breadcrumb :index
- end
- rescue Ievkit::Error, Faraday::Error => error
- logger.error("Iev failure : #{error.message}")
- flash[:error] = t(error.locale_for_error)
- redirect_to referential_path(@referential)
- end
- end
-
- def show
- begin
- show! do |format|
- build_breadcrumb :show
- end
- rescue Ievkit::Error, Faraday::Error => error
- logger.error("Iev failure : #{error.message}")
- flash[:error] = t(error.locale_for_error)
- redirect_to referential_path(@referential)
- end
- end
-
- def report
- resource
- build_breadcrumb :report
- end
-
- def references
- @references = referential.send(params[:type]).where("name ilike ?", "%#{params[:q]}%")
- respond_to do |format|
- format.json do
- render json: @references.collect { |child| { id: child.id, name: child.name } }
- end
- end
- end
-
- def rule_parameter_set
- begin
- @rule_parameter_set = resource.rule_parameter_set
- build_breadcrumb :rule_parameter_set
- render "rule_parameter_sets/show"
- rescue Ievkit::Error, Faraday::Error => error
- logger.error("Iev failure : #{error.message}")
- flash[:error] = t(error.locale_for_error)
- redirect_to referential_path(@referential)
- end
- end
-
- def export
- respond_to do |format|
- format.zip { send_file ComplianceCheckExport.new(resource, @referential.id, request).export, :type => :zip }
- end
- end
-
- protected
-
- alias_method :compliance_check, :resource
-
- def compliance_check_service
- ComplianceCheckService.new(@referential)
- end
-
- def resource
- @compliance_check ||= compliance_check_service.find(params[:id])
- @line_items = @compliance_check.report.line_items
- if @line_items.size > 500
- @line_items = @line_items.paginate(page: params[:page], per_page: 20)
- end
- @compliance_check
- end
- def collection
- @compliance_checks ||= compliance_check_service.all.sort_by{ |compliance_check| compliance_check.created_at }.reverse.paginate(:page => params[:page])
- end
end
diff --git a/app/controllers/import_messages_controller.rb b/app/controllers/import_messages_controller.rb
index 64eec92dd..4ad398cbb 100644
--- a/app/controllers/import_messages_controller.rb
+++ b/app/controllers/import_messages_controller.rb
@@ -9,7 +9,7 @@ class ImportMessagesController < BreadcrumbController
def index
index! do |format|
format.csv {
- send_data ImportMessageExport.new(:import_messages => @import_messages).to_csv(:col_sep => ";") , :filename => "test.csv"
+ send_data ImportMessageExport.new(:import_messages => @import_messages).to_csv(:col_sep => ";") , :filename => "#{File.basename(@import_resource.name)}_#{Time.now.to_i}.csv"
}
end
end
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
index b1b34731b..97a8f91aa 100644
--- a/app/controllers/imports_controller.rb
+++ b/app/controllers/imports_controller.rb
@@ -1,6 +1,7 @@
class ImportsController < BreadcrumbController
skip_before_action :authenticate_user!, only: [:download]
defaults resource_class: Import, collection_name: 'imports', instance_name: 'import'
+ before_action :ransack_started_on_date, only: [:index]
respond_to :html
belongs_to :workbench
@@ -55,6 +56,17 @@ class ImportsController < BreadcrumbController
private
+ def ransack_started_on_date
+ date =[]
+ if params[:q] && !params[:q]['started_on_date(1i)'].empty?
+ ['started_on_date(1i)', 'started_on_date(2i)', 'started_on_date(3i)'].each do |key|
+ date << params[:q][key].to_i
+ params[:q].delete(key)
+ end
+ params[:q]['started_on_date'] = DateTime.new(*date) rescue nil
+ end
+ end
+
def build_resource
@import ||= WorkbenchImport.new(*resource_params) do |import|
import.workbench = parent
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index a6dfaf2b6..bd0544a74 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -10,7 +10,6 @@ class ReferentialsController < BreadcrumbController
if params[:from]
source_referential = Referential.find(params[:from])
@referential = Referential.new_from(source_referential, current_functional_scope)
- @referential.workbench_id = current_organisation.workbenches.first.id
end
new! do
@@ -26,7 +25,7 @@ class ReferentialsController < BreadcrumbController
def show
resource.switch
show! do |format|
- @referential = @referential.decorate
+ @referential = @referential.decorate(context: { workbench_id: params[:workbench_id] } )
@reflines = lines_collection.paginate(page: params[:page], per_page: 10)
@reflines = ModelDecorator.decorate(
@reflines,
diff --git a/app/controllers/workbenches_controller.rb b/app/controllers/workbenches_controller.rb
index 19af28a98..bae3fcff2 100644
--- a/app/controllers/workbenches_controller.rb
+++ b/app/controllers/workbenches_controller.rb
@@ -20,8 +20,13 @@ class WorkbenchesController < BreadcrumbController
@q_for_form = scope.ransack(params[:q])
@q_for_result = scope.ransack(ransack_params)
@wbench_refs = sort_result(@q_for_result.result).paginate(page: params[:page], per_page: 30)
- @wbench_refs = ModelDecorator.decorate(@wbench_refs, with: ReferentialDecorator)
-
+ @wbench_refs = ModelDecorator.decorate(
+ @wbench_refs,
+ with: ReferentialDecorator,
+ context: {
+ workbench_id: params[:id]
+ }
+ )
show! do
build_breadcrumb :show
end
diff --git a/app/decorators/referential_decorator.rb b/app/decorators/referential_decorator.rb
index ccb47a654..4e9c242fd 100644
--- a/app/decorators/referential_decorator.rb
+++ b/app/decorators/referential_decorator.rb
@@ -13,7 +13,7 @@ class ReferentialDecorator < Draper::Decorator
if policy.clone?
links << Link.new(
content: h.t('actions.clone'),
- href: h.new_referential_path(from: object.id)
+ href: h.new_referential_path(from: object.id, workbench_id: context[:workbench_id])
)
end
if policy.archive?
diff --git a/app/helpers/compliance_check_tasks_helper.rb b/app/helpers/compliance_check_tasks_helper.rb
deleted file mode 100644
index 5ba8bdc46..000000000
--- a/app/helpers/compliance_check_tasks_helper.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-module ComplianceCheckTasksHelper
-
- def button_link_class( compliance_check_task )
- if compliance_check_task.any_error_severity_failure? || compliance_check_task.status == "failed"
- "btn-danger"
- else
- "btn-default"
- end
- end
-
-end
diff --git a/app/helpers/compliance_checks_helper.rb b/app/helpers/compliance_checks_helper.rb
deleted file mode 100644
index d7e42e187..000000000
--- a/app/helpers/compliance_checks_helper.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-# -*- coding: utf-8 -*-
-module ComplianceChecksHelper
-
- def fields_for_compliance_check_format(form)
- begin
- render :partial => compliance_check_partial_name(form), :locals => { :form => form }
- rescue ActionView::MissingTemplate
- ""
- end
- end
-
- def compliance_check_partial_name(form)
- "fields_#{form.object.format.underscore}_compliance_check"
- end
-
- def compliance_icon( compliance_check)
- return nil unless compliance_check.compliance_check_validation_report
- compliance_check.compliance_check_validation_report.tap do |cct|
- if cct.failed? || cct.any_error_severity_failure?
- return 'icons/link_page_alert.png'
- else
- return 'icons/link_page.png'
- end
- end
- end
-
- def status_icon( compliance_check_result_status, compliance_check_result_severity )
- if compliance_check_result_status == "uncheck"
- ("<i class='fa fa-ban status_" + compliance_check_result_status + "_" + compliance_check_result_severity + "'></i>").html_safe
- elsif compliance_check_result_status == "ok"
- ("<i class='fa fa-check status_" + compliance_check_result_status + "_" + compliance_check_result_severity + "'></i>").html_safe
- else
- ("<i class='fa fa-times status_" + compliance_check_result_status + "_" + compliance_check_result_severity + "'></i>").html_safe
- end
- end
-
- def test_definition (compliance_check_result_code)
- Rails.application.config.validation_spec + I18n.locale.to_s + "/" + compliance_check_result_code +".html"
- end
-
- def object_url (referential_id, error)
- location = "/referentials/" + referential_id.to_s
- object_path = error[:source].object_path
- if object_path.first[:type] == "vehicle_journey"
- object_path.delete_at 1
- end
-
- types, identifiers = object_path.reverse.map { |resource| [ resource[:type], resource[:id] ] }.transpose
-
- method_name = (['referential'] + types + ['path']).join('_')
- identifiers.unshift referential_id
-
- return send method_name, *identifiers
- end
-
- def object_labels_hash (error)
- ### THE error HASH STRUCTURE
- # 1. error[:source]
- # 0..1 file
- # 1 filename
- # 0..1 line_number
- # 0..1 column_number
- # 0..1 objectid
- # 0..1 label
- # 0.. object_path
- # 1 type
- # 1 id
- # 0.. error[:target]
- # 0..1 error[:error_value]
- # 0..1 error[:reference_value]
- object_labels_hash = Hash.new
- object_labels_hash[:source_objectid] = error[:source].objectid if error[:source].objectid.present?
- object_labels_hash[:source_label] = error[:source].label if error[:source].label.present?
- if error[:source].file.present?
- object_labels_hash[:filename] = error[:source].file.filename
- object_labels_hash[:line_number] = error[:source].file.line_number if error[:source].file.line_number.present?
- object_labels_hash[:column_number] = error[:source].file.column_number if error[:source].file.column_number.present?
- end
-
- if error[:target].present?
- error[:target].each_with_index do |target, index|
- object_labels_hash["target_#{index}_objectid".to_sym] = target[:objectid] if target[:objectid]
- object_labels_hash["target_#{index}_label".to_sym] = target[:label] if target[:label]
- end
- end
- if error[:error_value].present?
- object_labels_hash[:error_value] = error[:error_value]
- end
- if error[:reference_value].present?
- object_labels_hash[:reference_value] = error[:reference_value]
- end
- return object_labels_hash
- end
-
-
-end
diff --git a/app/models/chouette/access_point.rb b/app/models/chouette/access_point.rb
index 476f13c08..4a1ae8a0e 100644
--- a/app/models/chouette/access_point.rb
+++ b/app/models/chouette/access_point.rb
@@ -4,6 +4,7 @@ require 'geo_ruby'
class Chouette::AccessPoint < Chouette::ActiveRecord
# FIXME http://jira.codehaus.org/browse/JRUBY-6358
self.primary_key = "id"
+
include StifReflexAttributesSupport
include Geokit::Mappable
include ProjectionFields
@@ -23,12 +24,15 @@ class Chouette::AccessPoint < Chouette::ActiveRecord
validates_numericality_of :longitude, :less_than_or_equal_to => 180, :greater_than_or_equal_to => -180, :allow_nil => true
validates_format_of :coordinates, :with => %r{\A *-?(0?[0-9](\.[0-9]*)?|[0-8][0-9](\.[0-9]*)?|90(\.[0]*)?) *\, *-?(0?[0-9]?[0-9](\.[0-9]*)?|1[0-7][0-9](\.[0-9]*)?|180(\.[0]*)?) *\Z}, :allow_nil => true, :allow_blank => true
-
+ before_save :coordinates_to_lat_lng
def self.nullable_attributes
[:street_name, :country_code, :comment, :long_lat_type, :zip_code, :city_name]
end
- before_save :coordinates_to_lat_lng
+
+ def referential
+ @referential ||= Referential.where(:slug => Apartment::Tenant.current).first!
+ end
def referential
@referential ||= Referential.where(:slug => Apartment::Tenant.current).first!
diff --git a/app/models/chouette/company.rb b/app/models/chouette/company.rb
index 7b96e875e..a472020e1 100644
--- a/app/models/chouette/company.rb
+++ b/app/models/chouette/company.rb
@@ -1,6 +1,6 @@
class Chouette::Company < Chouette::ActiveRecord
include CompanyRestrictions
- include DefaultNetexAttributesSupport
+ include StifCodifligneAttributesSupport
include LineReferentialSupport
has_many :lines
diff --git a/app/models/chouette/group_of_line.rb b/app/models/chouette/group_of_line.rb
index d954c6699..a987d6311 100644
--- a/app/models/chouette/group_of_line.rb
+++ b/app/models/chouette/group_of_line.rb
@@ -1,5 +1,5 @@
class Chouette::GroupOfLine < Chouette::ActiveRecord
- include DefaultNetexAttributesSupport
+ include StifCodifligneAttributesSupport
include GroupOfLineRestrictions
include LineReferentialSupport
diff --git a/app/models/chouette/journey_pattern.rb b/app/models/chouette/journey_pattern.rb
index fa5fba26d..2b62d5c7f 100644
--- a/app/models/chouette/journey_pattern.rb
+++ b/app/models/chouette/journey_pattern.rb
@@ -21,6 +21,11 @@ class Chouette::JourneyPattern < Chouette::TridentActiveRecord
attr_accessor :control_checked
after_update :control_route_sections, :unless => "control_checked"
+
+ def local_id
+ "IBOO-#{self.try(:route).try(:line).try(:objectid).try(:local_id)}-#{self.referential.id}-#{self.id}"
+ end
+
def checksum_attributes
values = self.slice(*['name', 'published_name', 'registration_number']).values
values << self.stop_points.map(&:stop_area).map(&:user_objectid)
diff --git a/app/models/chouette/network.rb b/app/models/chouette/network.rb
index 690c39344..8df205789 100644
--- a/app/models/chouette/network.rb
+++ b/app/models/chouette/network.rb
@@ -1,5 +1,5 @@
class Chouette::Network < Chouette::ActiveRecord
- include DefaultNetexAttributesSupport
+ include StifCodifligneAttributesSupport
include NetworkRestrictions
include LineReferentialSupport
# FIXME http://jira.codehaus.org/browse/JRUBY-6358
diff --git a/app/models/chouette/route.rb b/app/models/chouette/route.rb
index 6774e8a86..5b89fbbe8 100644
--- a/app/models/chouette/route.rb
+++ b/app/models/chouette/route.rb
@@ -75,6 +75,10 @@ class Chouette::Route < Chouette::TridentActiveRecord
after_commit :journey_patterns_control_route_sections
+ def local_id
+ "IBOO-#{self.line.objectid.local_id}-#{self.referential.id}-#{self.id}"
+ end
+
def geometry_presenter
Chouette::Geometry::RoutePresenter.new self
end
diff --git a/app/models/chouette/routing_constraint_zone.rb b/app/models/chouette/routing_constraint_zone.rb
index 9931748b2..21efa2539 100644
--- a/app/models/chouette/routing_constraint_zone.rb
+++ b/app/models/chouette/routing_constraint_zone.rb
@@ -8,6 +8,10 @@ class Chouette::RoutingConstraintZone < Chouette::TridentActiveRecord
# validates :stop_point_ids, length: { minimum: 2, too_short: I18n.t('activerecord.errors.models.routing_constraint_zone.attributes.stop_points.not_enough_stop_points') }
validate :stop_points_belong_to_route, :not_all_stop_points_selected
+ def local_id
+ "IBOO-#{self.route.line.objectid.local_id}-#{self.route.objectid.local_id}-#{self.referential.id}-#{self.id}"
+ end
+
scope :order_by_stop_points_count, ->(direction) do
order("array_length(stop_point_ids, 1) #{direction}")
end
diff --git a/app/models/chouette/stif_netex_objectid.rb b/app/models/chouette/stif_netex_objectid.rb
new file mode 100644
index 000000000..3b11691d9
--- /dev/null
+++ b/app/models/chouette/stif_netex_objectid.rb
@@ -0,0 +1,38 @@
+class Chouette::StifNetexObjectid < String
+ def valid?
+ parts.present?
+ end
+
+ @@format = /^([A-Za-z_]+):([A-Za-z]+):([0-9A-Za-z_-]+):([A-Za-z]+)$/
+ cattr_reader :format
+
+ def parts
+ match(format).try(:captures)
+ end
+
+ def provider_id
+ parts.try(:first)
+ end
+
+ def object_type
+ parts.try(:second)
+ end
+
+ def local_id
+ parts.try(:third)
+ end
+
+ def boiv_id
+ parts.try(:fourth)
+ end
+
+ def self.create(provider_id, object_type, local_id, boiv_id)
+ new [provider_id, object_type, local_id, boiv_id].join(":")
+ end
+
+ def self.new(string)
+ string ||= ""
+ self === string ? string : super
+ end
+
+end
diff --git a/app/models/chouette/time_table.rb b/app/models/chouette/time_table.rb
index 8aff3bf36..8821a5201 100644
--- a/app/models/chouette/time_table.rb
+++ b/app/models/chouette/time_table.rb
@@ -31,6 +31,10 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord
after_save :save_shortcuts
+ def local_id
+ "IBOO-#{self.referential.id}-#{self.id}"
+ end
+
def checksum_attributes
[].tap do |attrs|
attrs << self.int_day_types
@@ -557,8 +561,7 @@ class Chouette::TimeTable < Chouette::TridentActiveRecord
end
def duplicate
- tt = self.deep_clone :include => [:periods, :dates], :except => :object_version
- tt.uniq_objectid
+ tt = self.deep_clone :include => [:periods, :dates], :except => [:object_version, :objectid]
tt.tag_list.add(*self.tag_list) unless self.tag_list.empty?
tt.created_from = self
tt.comment = I18n.t("activerecord.copy", :name => self.comment)
diff --git a/app/models/chouette/trident_active_record.rb b/app/models/chouette/trident_active_record.rb
index c1bc0172b..e8223e3d6 100644
--- a/app/models/chouette/trident_active_record.rb
+++ b/app/models/chouette/trident_active_record.rb
@@ -1,5 +1,5 @@
class Chouette::TridentActiveRecord < Chouette::ActiveRecord
- include DefaultAttributesSupport
+ include StifNetexAttributesSupport
self.abstract_class = true
diff --git a/app/models/chouette/vehicle_journey.rb b/app/models/chouette/vehicle_journey.rb
index d5ca58959..e60afef6e 100644
--- a/app/models/chouette/vehicle_journey.rb
+++ b/app/models/chouette/vehicle_journey.rb
@@ -56,6 +56,10 @@ module Chouette
end
end
+ def local_id
+ "IBOO-#{self.route.line.objectid.local_id}-#{self.referential.id}-#{self.id}"
+ end
+
def checksum_attributes
[].tap do |attrs|
attrs << self.published_journey_name
diff --git a/app/models/compliance_check.rb b/app/models/compliance_check.rb
index d3e4054a6..a9dbc4211 100644
--- a/app/models/compliance_check.rb
+++ b/app/models/compliance_check.rb
@@ -1,58 +1,3 @@
class ComplianceCheck
- include JobConcern
- def initialize( response )
- @datas = response
- end
-
- def report?
- links["action_report"].present?
- end
-
- def report
- Rails.cache.fetch("#{cache_key}/action_report", expires_in: cache_expiration) do
- if report_path = links["action_report"]
- ComplianceCheckReport.new Ievkit.get(report_path)
- end
- end
- end
-
- def compliance_check_validation_report?
- links["validation_report"].present?
- end
-
- def compliance_check_validation_report
- Rails.cache.fetch("#{cache_key}/validation_report", expires_in: cache_expiration) do
- if report_path = links["validation_report"]
- ComplianceCheckResult.new Ievkit.get(report_path)
- end
- end
- end
-
- def rule_parameter_set?
- links["validation_params"].present?
- end
-
- def rule_parameter_set
- Rails.cache.fetch("#{cache_key}/validation_params", expires_in: cache_expiration) do
- if rule_parameter_set_path = links["validation_params"]
- response = Ievkit.get(rule_parameter_set_path)
- RuleParameterSet.new(name: '', compliance_check: self).tap do |rps|
- rps.parameters = response.validation
- end
- end
- end
- end
-
- def destroy
- if delete_path = links["delete"]
- Ievkit.delete(delete_path)
- elsif cancel_path = links["cancel"]
- Ievkit.delete(cancel_path)
- end
- end
-
- def format
- datas.type
- end
end
diff --git a/app/models/compliance_check_export.rb b/app/models/compliance_check_export.rb
deleted file mode 100644
index 95abb3b27..000000000
--- a/app/models/compliance_check_export.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-require 'tempfile'
-
-class ComplianceCheckExport
- include ERB::Util
- include ComplianceChecksHelper
-
- require 'zip'
-
- attr_accessor :template, :detailed_errors_template, :request
- attr_reader :compliance_check
-
- def initialize(compliance_check, referential_id, request)
- @request = request
- @compliance_check = compliance_check
- @referential_id = referential_id
- @template = File.open('app/views/compliance_checks/summary_errors_index.csv.erb' ) { |f| f.read }
- @detailed_errors_template = File.open('app/views/compliance_checks/detailed_errors_index.csv.erb' ) { |f| f.read }
- end
-
- def export
- begin
- Dir.mktmpdir("#{I18n.t('compliance_check_results.file.zip_name_prefix')}_#{@referential_id}_#{@compliance_check.id}_", Dir.tmpdir) { |temp_dir|
-
- File.open(temp_dir + "/#{I18n.t('compliance_check_results.file.summary_errors_file_prefix')}" , "a:utf-8") do |f|
- f.write("\ufeff")
- f.write(render)
- f.flush
- end
-
- File.open(temp_dir + "/#{I18n.t('compliance_check_results.file.detailed_errors_file_prefix')}" , "a:utf-8") do |f|
- f.write("\ufeff")
- f.write(detailed_errors_render)
- f.flush
- end
-
- zip_file = Tempfile.new(["#{I18n.t('compliance_check_results.file.zip_name_prefix')}_#{@referential_id}_#{@compliance_check.id}_", ".zip"])
-
- ::Zip::File.open(zip_file.path, ::Zip::File::CREATE) do |zipfile|
- Dir[File.join(temp_dir, '*.csv')].each do |f|
- zipfile.add(File.basename(f), f)
- end
- end
- return zip_file
- }
- end
- end
-
- def render()
- ERB.new(@template).result(binding)
- end
-
- def detailed_errors_render()
- ERB.new(@detailed_errors_template).result(binding)
- end
-
-end
diff --git a/app/models/compliance_check_report.rb b/app/models/compliance_check_report.rb
deleted file mode 100644
index 94deb8cc9..000000000
--- a/app/models/compliance_check_report.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class ComplianceCheckReport
- include ReportConcern
-
- def initialize( response )
- @datas = response.action_report
- end
-
-end
-
diff --git a/app/models/compliance_check_result.rb b/app/models/compliance_check_result.rb
index cd956a021..06f8649f5 100644
--- a/app/models/compliance_check_result.rb
+++ b/app/models/compliance_check_result.rb
@@ -1,76 +1,3 @@
class ComplianceCheckResult
- extend ActiveModel::Naming
- extend ActiveModel::Translation
- include ActiveModel::Model
-
- attr_accessor :datas
-
- def initialize(response)
- @datas = response.validation_report
- end
-
- def tests?
- datas.tests?
- end
-
- def ok_error
- all('ok', 'error')
- end
-
- def nok_error
- all('nok', 'error')
- end
-
- def na_error
- all('uncheck', 'error')
- end
-
- def ok_warning
- all('ok', 'warning')
- end
-
- def nok_warning
- all('nok', 'warning')
- end
-
- def na_warning
- all('uncheck', 'warning')
- end
-
- def all(status, severity)
- tests? ? tests.select { |test| test.result == status.downcase && test.severity == severity.downcase } : []
- end
-
- def tests
- @tests ||= tests? ? datas.tests.map{ |test| Test.new(test) } : []
- end
-
- class Test
- attr_reader :options
-
- def initialize( options )
- @options = options
- end
-
- def test_id
- options.test_id if options.test_id?
- end
-
- def severity
- options.severity.downcase if options.severity?
- end
-
- def result
- options.result.downcase if options.result?
- end
-
- def errors
- options.errors if options.errors?
- end
-
- def error_count
- options.error_count if options.error_count?
- end
- end
end
diff --git a/app/models/compliance_check_service.rb b/app/models/compliance_check_service.rb
deleted file mode 100644
index c27f36894..000000000
--- a/app/models/compliance_check_service.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-class ComplianceCheckService
-
- attr_reader :referential
-
- def initialize(referential)
- @referential = referential
- end
-
- # Find a validation whith this id
- def find(id)
- ComplianceCheck.new(Ievkit.scheduled_job(referential.slug, id, { :action => "validator" }))
- end
-
- # Find all validations
- def all
- [].tap do |jobs|
- Ievkit.jobs(referential.slug, { :action => "validator" }).each do |job|
- jobs << ComplianceCheck.new(job)
- end
- end
- end
-
-end
diff --git a/app/models/compliance_check_task.rb b/app/models/compliance_check_task.rb
deleted file mode 100644
index da0508cbf..000000000
--- a/app/models/compliance_check_task.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-class ComplianceCheckTask
- extend Enumerize
- extend ActiveModel::Naming
- extend ActiveModel::Translation
- extend ActiveModel::Callbacks
- include ActiveModel::Validations
- include ActiveModel::Conversion
-
- enumerize :references_type, in: %w( network line company group_of_line )
- attr_accessor :rule_parameter_set_id, :referential_id, :user_id, :user_name, :name, :references_type, :reference_ids
-
- validates_presence_of :referential_id, :user_id, :user_name, :name
-
- def initialize( params = {} )
- params.each {|k,v| send("#{k}=",v)}
- end
-
- def referential
- Referential.find(referential_id)
- end
-
- def organisation
- referential.organisation
- end
-
- def rule_parameter_set
- organisation.rule_parameter_sets.find(rule_parameter_set_id) if rule_parameter_set_id.present?
- end
-
- def save
- if valid?
- # Call Iev Server
- begin
- Ievkit.create_job( referential.slug, "validator", "", {
- :file1 => params_io,
- } )
- rescue Exception => exception
- raise exception
- end
- true
- else
- false
- end
- end
-
- def self.references_types
- self.references_type.values
- end
-
- def params
- {}.tap do |h|
- h["parameters"] = validation_params ? action_params.merge(validation_params) : action_params
- end
- end
-
- def action_params
- {
- "validate" => {
- "name" => name,
- "references_type" => references_type,
- "reference_ids" => reference_ids,
- "user_name" => user_name,
- "organisation_name" => organisation.name,
- "referential_name" => referential.name,
- }
-
- }
- end
-
- def validation_params
- {
- "validation" => rule_parameter_set.parameters
- } if rule_parameter_set.present?
- end
-
- def self.data_formats
- self.data_format.values
- end
-
- def params_io
- file = StringIO.new( params.to_json )
- Faraday::UploadIO.new(file, "application/json", "parameters.json")
- end
-
- def transport_data_io
- file = File.new(saved_resources_path, "r")
- if file_extname == ".zip"
- Faraday::UploadIO.new(file, "application/zip", original_filename )
- elsif file_extname == ".xml"
- Faraday::UploadIO.new(file, "application/xml", original_filename )
- end
- end
-
- def save_resources
- FileUtils.mkdir_p root
- FileUtils.cp resources.path, saved_resources_path
- end
-
- def delete_resources
- FileUtils.rm saved_resources_path if File.exists? saved_resources_path
- end
-
- def original_filename
- resources.original_filename
- end
-
- def file_extname
- File.extname(resources.original_filename)
- end
-
- def saved_resources_path
- "#{root}/#{Time.now.to_i}#{file_extname}"
- end
-end
diff --git a/app/models/concerns/line_referential_support.rb b/app/models/concerns/line_referential_support.rb
index 4ad437fed..406730ddb 100644
--- a/app/models/concerns/line_referential_support.rb
+++ b/app/models/concerns/line_referential_support.rb
@@ -3,18 +3,10 @@ module LineReferentialSupport
included do
belongs_to :line_referential
- # validates_presence_of :line_referential_id
-
alias_method :referential, :line_referential
end
def hub_restricted?
false
end
-
- def prefix
- # FIXME #825
- "dummy"
- end
-
end
diff --git a/app/models/concerns/report_concern.rb b/app/models/concerns/report_concern.rb
deleted file mode 100644
index f195f8f36..000000000
--- a/app/models/concerns/report_concern.rb
+++ /dev/null
@@ -1,170 +0,0 @@
-module ReportConcern
- extend ActiveSupport::Concern
- extend ActiveModel::Naming
- extend ActiveModel::Translation
- include ActiveModel::Model
-
- included do
- attr_reader :datas
- end
-
- module ClassMethods
- end
-
- delegate :progression?, :progression, :zip_file, :stats, to: :datas
-
- def failure_code?
- datas.result == "NOK" && datas.failure?
- end
-
- def failure_code
- datas.failure.code.downcase if failure_code?
- end
-
- def percentage(a, b)
- (a.to_f / b.to_f * 100).round(0)
- end
-
- def level_progress
- percentage( progression.current_step, progression.steps_count) if progression?
- end
-
- def last_step
- datas.progression.steps.last if progression?
- end
-
- def current_step
- datas.progression.steps[ progression.current_step - 1]
- end
-
- def step_progress
- percentage( current_step.realized, current_step.total )
- end
-
- def step_progress_name
- return last_step.step if progression.current_step == progression.steps_count
-
- current_step.step
- end
-
- def files
- @files ||= datas.files || []
- end
-
- def error_files
- files.select{ |file| file[:status] == "ERROR"}
- end
-
- def ignored_files
- files.select{ |file| file[:status] == "IGNORED"}
- end
-
- def ok_files
- files.select{ |file| file[:status] == "OK"}
- end
-
- def line_items
- @line_items ||= [].tap do |line_items|
- datas.lines.each do |line|
- line_items << LineItem.new(line)
- end if datas.lines?
- end
- end
-
- def saved_lines
- line_items.map(&:status).count(true)
- end
-
- def unsaved_lines
- line_items.map(&:status).count(false)
- end
-
- def lines
- stats.present? ? stats.line_count : 0
- end
-
- def routes
- stats.present? ? stats.route_count : 0
- end
-
- def connection_links
- stats.present? ? stats.connection_link_count : 0
- end
-
- def time_tables
- stats.present? ? stats.time_table_count : 0
- end
-
- def stop_areas
- stats.present? ? stats.stop_area_count : 0
- end
-
- def access_points
- stats.present? ? stats.access_point_count : 0
- end
-
- def vehicle_journeys
- stats.present? ? stats.vehicle_journey_count : 0
- end
-
- def journey_patterns
- stats.present? ? stats.journey_pattern_count : 0
- end
-
- class LineItem
- attr_reader :options
-
- def initialize( options )
- @options = options
- end
-
- def name
- @name ||= options.name if options.name?
- end
-
- def stats
- @stats ||= options.stats if options.stats?
- end
-
- def status
- @status ||= if options.status?
- if %w{ok warning}.include? options.status.downcase
- true
- else
- false
- end
- else
- false
- end
- end
-
- def routes
- stats ? stats.route_count : 0
- end
-
- def connection_links
- stats ? stats.connection_link_count : 0
- end
-
- def time_tables
- stats ? stats.time_table_count : 0
- end
-
- def stop_areas
- stats ? stats.stop_area_count : 0
- end
-
- def access_points
- stats ? stats.access_point_count : 0
- end
-
- def vehicle_journeys
- stats ? stats.vehicle_journey_count : 0
- end
-
- def journey_patterns
- stats ? stats.journey_pattern_count : 0
- end
-
- end
-end
diff --git a/app/models/concerns/stif_netex_attributes_support.rb b/app/models/concerns/stif_netex_attributes_support.rb
new file mode 100644
index 000000000..795872755
--- /dev/null
+++ b/app/models/concerns/stif_netex_attributes_support.rb
@@ -0,0 +1,58 @@
+module StifNetexAttributesSupport
+ extend ActiveSupport::Concern
+
+ included do
+ validates_numericality_of :object_version
+ validates :objectid, uniqueness: true, presence: true
+ validate :objectid_format_compliance
+
+ after_save :build_objectid
+ before_validation :default_values, on: :create
+ end
+
+ module ClassMethods
+ def object_id_key
+ model_name
+ end
+
+ def model_name
+ ActiveModel::Name.new self, Chouette, self.name.demodulize
+ end
+ end
+
+ def objectid_format_compliance
+ errors.add :objectid, I18n.t("activerecord.errors.models.trident.invalid_object_id") if !objectid.valid?
+ end
+
+ def local_id
+ "IBOO-#{self.referential.id}-#{self.id}"
+ end
+
+ def build_objectid
+ if objectid.include? ':__pending_id__'
+ self.objectid = Chouette::StifNetexObjectid.create(self.provider_id, self.model_name, self.local_id, self.boiv_id)
+ self.save
+ end
+ end
+
+ def default_values
+ self.object_version ||= 1
+
+ if self.objectid.to_s.empty?
+ local_id = "__pending_id__#{rand(50)+ rand(50)}"
+ self.objectid = Chouette::StifNetexObjectid.create(self.provider_id, self.model_name, local_id, self.boiv_id)
+ end
+ end
+
+ def objectid
+ Chouette::StifNetexObjectid.new read_attribute(:objectid)
+ end
+
+ def provider_id
+ self.referential.workbench.organisation.name.parameterize
+ end
+
+ def boiv_id
+ 'LOC'
+ end
+end
diff --git a/app/models/concerns/stop_area_referential_support.rb b/app/models/concerns/stop_area_referential_support.rb
index 5a01ef57e..aa59cbd35 100644
--- a/app/models/concerns/stop_area_referential_support.rb
+++ b/app/models/concerns/stop_area_referential_support.rb
@@ -3,17 +3,10 @@ module StopAreaReferentialSupport
included do
belongs_to :stop_area_referential
- # validates_presence_of :stop_area_referential_id
-
alias_method :referential, :stop_area_referential
end
def hub_restricted?
false
end
-
- def prefix
- # FIXME #825
- "dummy"
- end
end
diff --git a/app/models/data_format_enumerations.rb b/app/models/data_format_enumerations.rb
index 94c39e152..787ab6cca 100644
--- a/app/models/data_format_enumerations.rb
+++ b/app/models/data_format_enumerations.rb
@@ -1,6 +1,6 @@
module DataFormatEnumerations
extend Enumerize
extend ActiveModel::Naming
-
- enumerize :data_format, in: %w[neptune netex gtfs hub], default: "neptune"
+
+ enumerize :data_format, in: %w[neptune netex gtfs hub], default: "netex"
end
diff --git a/app/models/export_report.rb b/app/models/export_report.rb
index ef54f40ea..3c0788106 100644
--- a/app/models/export_report.rb
+++ b/app/models/export_report.rb
@@ -1,9 +1,8 @@
class ExportReport
- include ReportConcern
+ #include ReportConcern
def initialize( response )
@datas = response.action_report
end
-
-end
+end
diff --git a/app/models/import.rb b/app/models/import.rb
index ff2f57efc..55d74c13c 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -9,14 +9,20 @@ class Import < ActiveRecord::Base
has_many :resources, class_name: "ImportResource", dependent: :destroy
has_many :children, foreign_key: :parent_id, class_name: "Import", dependent: :destroy
+ scope :started_on_date, ->(date) { where('started_at BETWEEN ? AND ?', date.beginning_of_day, date.end_of_day) }
+
extend Enumerize
- enumerize :status, in: %i(new pending successful warning failed running aborted canceled), scope: true
+ enumerize :status, in: %i(new pending successful warning failed running aborted canceled), scope: true, default: :new
validates :file, presence: true
validates_presence_of :workbench, :creator
before_create :initialize_fields
+ def self.ransackable_scopes(auth_object = nil)
+ [:started_on_date]
+ end
+
def self.model_name
ActiveModel::Name.new Import, Import, "Import"
end
@@ -89,7 +95,6 @@ class Import < ActiveRecord::Base
def initialize_fields
self.token_download = SecureRandom.urlsafe_base64
- self.status = Import.status.new
end
def self.symbols_with_indifferent_access(array)
diff --git a/app/models/import_message_export.rb b/app/models/import_message_export.rb
index d13a3a21b..88d0f27e2 100644
--- a/app/models/import_message_export.rb
+++ b/app/models/import_message_export.rb
@@ -22,23 +22,14 @@ class ImportMessageExport
end
def column_names
- ["criticity", "message key"]
+ ["criticity", "message key", "message"]
end
-
- # t.integer "criticity"
- # t.string "message_key"
- # t.hstore "message_attributes"
- # t.integer "import_id", limit: 8
- # t.integer "resource_id", limit: 8
- # t.datetime "created_at"
- # t.datetime "updated_at"
- # t.hstore "resource_attributes"
def to_csv(options = {})
CSV.generate(options) do |csv|
csv << column_names
import_messages.each do |import_message|
- csv << [import_message.criticity, import_message.message_key ]
+ csv << [import_message.criticity, import_message.message_key, I18n.t("import_messages.compliance_check_messages.#{import_message.message_key}", import_message.message_attributes.deep_symbolize_keys) ]
end
end
end
diff --git a/app/models/import_report.rb b/app/models/import_report.rb
index 1dc556e1c..ba13f0118 100644
--- a/app/models/import_report.rb
+++ b/app/models/import_report.rb
@@ -1,9 +1,8 @@
-class ImportReport
- include ReportConcern
+class ImportReport
+ #include ReportConcern
def initialize( response )
@datas = response.action_report
end
-
-end
+end
diff --git a/app/models/vehicle_journey_import.rb b/app/models/vehicle_journey_import.rb
index 855fa2abe..44a6d457e 100644
--- a/app/models/vehicle_journey_import.rb
+++ b/app/models/vehicle_journey_import.rb
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-class VehicleJourneyImport
+class VehicleJourneyImport
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
@@ -8,11 +8,11 @@ class VehicleJourneyImport
attr_accessor :file, :route
attr_accessor :created_vehicle_journey_count,:updated_vehicle_journey_count,:deleted_vehicle_journey_count
attr_accessor :created_journey_pattern_count,:error_count
-
+
validates_presence_of :file
validates_presence_of :route
- def initialize(attributes = {})
+ def initialize(attributes = {})
attributes.each { |name, value| send("#{name}=", value) } if attributes
self.created_vehicle_journey_count = 0
self.updated_vehicle_journey_count = 0
@@ -20,15 +20,15 @@ class VehicleJourneyImport
self.deleted_vehicle_journey_count = 0
self.error_count = 0
end
-
+
def persisted?
false
end
-
+
def save
begin
- Chouette::VehicleJourney.transaction do
- if imported_vehicle_journeys.map(&:valid?).all?
+ Chouette::VehicleJourney.transaction do
+ if imported_vehicle_journeys.map(&:valid?).all?
imported_vehicle_journeys.each(&:save!)
true
else
@@ -46,8 +46,8 @@ class VehicleJourneyImport
errors.add :base, I18n.t("vehicle_journey_imports.errors.exception")
false
end
- end
-
+ end
+
def imported_vehicle_journeys
@imported_vehicle_journeys ||= load_imported_vehicle_journeys
end
@@ -61,31 +61,31 @@ class VehicleJourneyImport
if stop_points_used.length == 1
errors.add :base, I18n.t("vehicle_journey_imports.errors.one_stop_point_used", :column => column)
- raise
+ raise
end
-
+
journey_pattern_founded = route.journey_patterns.select{ |jp| jp.stop_points.collect(&:id) == stop_points_used }.first
-
+
# If no journey pattern founded, create a new one
self.created_journey_pattern_count += 1 if journey_pattern_founded.nil?
journey_pattern_founded ? journey_pattern_founded : route.journey_patterns.create(:stop_points => Chouette::StopPoint.find(stop_points_used) )
end
-
+
def as_integer(v)
v.blank? ? nil : v.to_i
end
-
+
def as_boolean(v)
v.blank? ? nil : (v[1..1].downcase != "n")
end
-
+
def update_time_tables(vj,tm_ids)
vj.time_tables.clear
return unless tm_ids.present?
ids = tm_ids.split(",").map(&:to_i)
vj.time_tables << Chouette::TimeTable.where(:id => ids)
end
-
+
def update_footnotes(vj,ftn_ids)
vj.footnotes.clear
return unless ftn_ids.present?
@@ -94,13 +94,13 @@ class VehicleJourneyImport
end
def load_imported_vehicle_journeys
-
+
spreadsheet = open_spreadsheet(file)
-
+
vehicle_journeys = []
-
+
first_column = spreadsheet.column(1)
-
+
# fixed rows (first = 1)
number_row = 2
published_journey_name_row = 3
@@ -111,7 +111,7 @@ class VehicleJourneyImport
# rows in column (first = 0)
first_stop_row_index = 8
-
+
stop_point_ids = first_column[first_stop_row_index..spreadsheet.last_row].map(&:to_i)
# blank lines at end of file will produce id = 0 ; ignore them
last_stop_row_index = stop_point_ids.length + 7
@@ -119,50 +119,50 @@ class VehicleJourneyImport
stop_point_ids = stop_point_ids[0..-2]
last_stop_row_index -= 1
end
-
+
unless route.stop_points.collect(&:id) == stop_point_ids
errors.add :base, I18n.t("vehicle_journey_imports.errors.not_same_stop_points", :route => route.id)
raise
- end
-
+ end
+
(3..spreadsheet.last_column).each do |i|
vehicle_journey_id = spreadsheet.column(i)[0]
hours_by_stop_point_ids = Hash[[stop_point_ids, spreadsheet.column(i)[first_stop_row_index..last_stop_row_index]].transpose]
-
+
journey_pattern = find_journey_pattern_schedule(i,hours_by_stop_point_ids)
-
+
vehicle_journey = route.vehicle_journeys.where(:id => vehicle_journey_id, :route_id => route.id).first_or_initialize
if journey_pattern.nil?
- if vehicle_journey.id.present?
+ if vehicle_journey.id.present?
self.deleted_vehicle_journey_count += 1
vehicle_journey.delete
end
next
end
- if vehicle_journey.id.present?
+ if vehicle_journey.id.present?
self.updated_vehicle_journey_count += 1
else
self.created_vehicle_journey_count += 1
end
-
+
# number
vehicle_journey.number = as_integer(spreadsheet.row(number_row)[i-1])
-
+
# published_name
vehicle_journey.published_journey_name = spreadsheet.row(published_journey_name_row)[i-1]
-
+
# flexible_service
vehicle_journey.flexible_service = as_boolean(spreadsheet.row(flexible_service_row)[i-1])
-
+
# mobility
vehicle_journey.mobility_restricted_suitability = as_boolean(spreadsheet.row(mobility_row)[i-1])
-
+
# time_tables
update_time_tables(vehicle_journey,spreadsheet.row(time_tables_row)[i-1])
-
+
update_footnotes(vehicle_journey,spreadsheet.row(footnotes_row)[i-1])
-
+
# journey_pattern
vehicle_journey.journey_pattern = journey_pattern
vehicle_journey.vehicle_journey_at_stops.clear
@@ -171,7 +171,7 @@ class VehicleJourneyImport
hours_by_stop_point_ids.each_pair do |key, value|
line += 1
if value.present? # Create a vehicle journey at stop when time is present
- begin
+ begin
# force UTC to ignore timezone effects
main_time = Time.parse(value+" UTC")
if main_time.present?
@@ -182,14 +182,14 @@ class VehicleJourneyImport
errors.add :base, I18n.t("vehicle_journey_imports.errors.invalid_vehicle_journey_at_stop", :column => i, :line => line, :time => value)
raise exception
end
- end
+ end
end
vehicle_journeys << vehicle_journey
end
-
+
vehicle_journeys
end
-
+
def open_spreadsheet(file)
case File.extname(file.original_filename)
when '.csv' then Roo::CSV.new(file.path, csv_options: {col_sep: ";"})
@@ -199,5 +199,5 @@ class VehicleJourneyImport
raise "Unknown file type: #{file.original_filename}"
end
end
-
+
end
diff --git a/app/models/workbench.rb b/app/models/workbench.rb
index c37cba858..30692e625 100644
--- a/app/models/workbench.rb
+++ b/app/models/workbench.rb
@@ -10,6 +10,7 @@ class Workbench < ActiveRecord::Base
has_many :stop_areas, through: :stop_area_referential
has_many :imports
has_many :workbench_imports
+
validates :name, presence: true
validates :organisation, presence: true
diff --git a/app/views/calendars/_filters.html.slim b/app/views/calendars/_filters.html.slim
index 4c30f69dc..b5283c1e8 100644
--- a/app/views/calendars/_filters.html.slim
+++ b/app/views/calendars/_filters.html.slim
@@ -19,4 +19,4 @@
.actions
= link_to 'Effacer', calendars_path, class: 'btn btn-link'
- = f.submit 'Filtrer', id: 'filter_btn', class: 'btn btn-default'
+ = f.submit 'Filtrer', id: 'calendar_filter_btn', class: 'btn btn-default'
diff --git a/app/views/calendars/index.html.slim b/app/views/calendars/index.html.slim
index 1e38786b9..56232b0af 100644
--- a/app/views/calendars/index.html.slim
+++ b/app/views/calendars/index.html.slim
@@ -13,7 +13,7 @@
.row
.col-lg-12
= render 'filters'
-
+
- if @calendars.any?
.row
.col-lg-12
@@ -39,8 +39,10 @@
cls: 'table has-filter'
= new_pagination @calendars, 'pull-right'
-
+
- unless @calendars.any?
.row.mt-xs
.col-lg-12
= replacement_msg t('calendars.search_no_results')
+
+= javascript_include_tag 'filters/calendar.js'
diff --git a/app/views/compliance_check_tasks/new.html.erb b/app/views/compliance_check_tasks/new.html.erb
deleted file mode 100644
index 3f43a7dd7..000000000
--- a/app/views/compliance_check_tasks/new.html.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-<%= title_tag t(".title") %>
-
-<%= semantic_form_for [@referential, @compliance_check_task], :url => referential_compliance_check_tasks_path(@referential) do |form| %>
- <%= form.inputs do %>
- <%= form.input :user_name, :as => :hidden, :input_html => { :value => current_user.name } %> <%= form.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %>
- <%= form.input :referential_id, :as => :hidden, :input_html => { :value => @referential.id } %>
- <%= form.input :name %>
- <%= form.input :rule_parameter_set_id, :as => :select,
- :collection => @referential.organisation.rule_parameter_sets.map { |rps| [ rps.name, rps.id ] }, :include_blank => false %>
- <%= form.input :references_type, :as => :select, :include_blank => t(".all") %>
- <% @compliance_check_task.class.references_types.each do |type| %>
- <%= form.input :reference_ids, :as => :reference_ids, :json => references_referential_compliance_check_tasks_path(@referential, :format => :json) + "?filter=#{type}", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :id => "#{type}_reference_ids", :input_html => { :id => "#{type}_reference_ids" }, :wrapper_html => { :style => "display:none;", :id => "#{type}", :"data-type" => "#{type}" } %>
- <% end %>
- <% end %>
-
- <%= form.actions do %>
- <%= form.action :submit, :as => :button , :label => t( 'formtastic.validate' ) %>
- <%= form.action :cancel, :as => :link %>
- <% end %>
-<% end %>
-
-<!-- = title_tag t('.title')
-
-= semantic_form_for [@referential, @compliance_check_task], :url => referential_compliance_check_tasks_path(@referential) do |form|
- = form.inputs do
- = form.input :user_name, :as => :hidden, :input_html => { :value => current_user.name }
- = form.input :user_id, :as => :hidden, :input_html => { :value => current_user.id }
- = form.input :referential_id, :as => :hidden, :input_html => { :value => @referential.id }
- = form.input :name
- = form.input :rule_parameter_set_id, :as => :select,
- :collection => @referential.organisation.rule_parameter_sets.map { |rps| [ rps.name, rps.id ] }, :include_blank => false
- = form.input :references_type, :as => :select, :include_blank => t(".all")
- - @compliance_check_task.class.references_types.each do |type|
-
- = form.input :reference_ids, as: :reference_ids, json: references_referential_compliance_check_tasks_path(@referential, format: :json) + "?filter=#{type}", hint_text: t('search_hint'), no_result_text: t('no_result_text'), searching_text: t('searching_term'), id: "#{type}_reference_ids", input_html: { :id => "#{type}_reference_ids" }, wrapper_html: { :style => "display:none;", :id => "#{type}", :"data-type" => "#{type}" }
-
- = form.actions do
- = form.action :submit, as: :button, label: t('formtastic.validate')
- = form.action :cancel, as: :link -->
diff --git a/app/views/compliance_check_tasks/new.js.coffee b/app/views/compliance_check_tasks/new.js.coffee
deleted file mode 100644
index ba62f53b2..000000000
--- a/app/views/compliance_check_tasks/new.js.coffee
+++ /dev/null
@@ -1,7 +0,0 @@
-jQuery ->
- <% ComplianceCheckTask.references_types.map { |type| type_ids_model_references_type( ComplianceCheckTask, type)}.each do |rt| %>
- $("textarea.<%= rt.input_class %>").tokenInput('<%= references_referential_compliance_check_tasks_path(@referential, :type => rt.relation_name, :format => :json) %>', { prePopulate: $('#').data('pre'), minChars: 1, hintText: '<%= t('search_hint') %>', noResultsText: '<%= t('no_result_text') %>', searchingText: '<%= t('searching_term') %>'});
- <% end %>
-
- # - ComplianceCheckTask.references_types.map { |type| type_ids_model_references_type( ComplianceCheckTask, type)}.each do |rt|
- # $("textarea.#{rt.input_class}").tokenInput("#{references_referential_compliance_check_tasks_path(@referential, :type => rt.relation_name, format: :json)}", { prePopulate: $('#').data('pre'), minChars: 1, hintText: "#{t('search_hint')}", noResultsText: "#{t('no_result_text')}", searchingText: "#{t('searching_term')}"});
diff --git a/app/views/compliance_checks/_compliance_check.html.slim b/app/views/compliance_checks/_compliance_check.html.slim
deleted file mode 100644
index 383a7ea82..000000000
--- a/app/views/compliance_checks/_compliance_check.html.slim
+++ /dev/null
@@ -1,17 +0,0 @@
-#index_item.panel.panel-default
- .panel-heading
- .panel-title.clearfix
- span.pull-right
- = link_to referential_compliance_check_path(@referential, compliance_check.id), :method => :delete, :data => {:confirm => t('compliance_checks.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm' do
- span.fa.fa-trash-o
- h5
- = link_to referential_compliance_check_path(@referential, compliance_check.id), class: 'preview', title: "#{ComplianceCheck.model_name.human.capitalize} #{compliance_check.name}" do
- = job_status_title(compliance_check)
-
- .panel-body
- p
- = link_to( font_awesome_classic_tag("fa-external-link") + t("compliance_checks.actions.report"), report_referential_compliance_check_path(@referential, compliance_check.id)) if compliance_check.report?
- .panel-footer
- .history
- = l compliance_check.created_at, :format => "%d/%m/%Y %H:%M"
- = " | #{compliance_check.user_name}"
diff --git a/app/views/compliance_checks/_compliance_check_results.html.slim b/app/views/compliance_checks/_compliance_check_results.html.slim
deleted file mode 100644
index 8e86c174e..000000000
--- a/app/views/compliance_checks/_compliance_check_results.html.slim
+++ /dev/null
@@ -1,92 +0,0 @@
-p
- form.form-inline
- .form-group
- label = t('shared.ie_report.search')
- input#filter.form-control type="text"
-
- .form-group
- label = ComplianceCheckResult.human_attribute_name(:severity)
- select.filter-severity.form-control
- option
- option value="severity-error"
- = t('compliance_check_result.severities.error')
- option value="severity-warning"
- = t('compliance_check_result.severities.warning')
-
- .form-group
- label = ComplianceCheckResult.human_attribute_name(:status)
- select.filter-status.form-control
- option
- option value="status-ok"
- = t('compliance_check_result.statuses.ok')
- option value="status-nok"
- = t('compliance_check_result.statuses.nok')
- option value="status-uncheck"
- = t('compliance_check_result.statuses.uncheck')
-
-
-table.table.table-hover.toggle-circle.toggle-medium data-filter="#filter" data-page-size="20" data-title-nok="#{t('compliance_check_result.statuses.nok')}" data-title-uncheck="#{t('compliance_check_result.statuses.uncheck')}" data-title-ok="#{t('compliance_check_result.statuses.ok')}"
- thead
- tr
- th data-sort-ignore="true"
- = ComplianceCheckResult.human_attribute_name(:status)
- th.col-md-1 data-sort-ignore="true"
- = ComplianceCheckResult.human_attribute_name(:severity)
- th.col-md-3
- = ComplianceCheckResult.human_attribute_name(:rule_code)
- th.col-md-2
- = t('compliance_check_results.errors')
- th.col-md-6 data-toggle="true" data-sort-ignore="true"
- = ComplianceCheckResult.human_attribute_name(:detail)
- th data-hide="all" data-sort-ignore="true"
-
- tbody
- - if compliance_check_validation_report
- - compliance_check_validation_report.tests.each_with_index do |test, index|
- tr class="#{test.result}_#{test.severity}"
- td data-value="status-#{test.result}"
- = status_icon( test.result, test.severity )
- td data-value="severity-#{test.severity}"
- = t("compliance_check_result.severities.#{test.severity}_txt")
- td data-value="#{test.result}_#{test.severity}"
- = link_to test.test_id, test_definition(test.test_id), title: ComplianceCheckResult.human_attribute_name(test.test_id), target: "compliance_check"
- td
- = "#{test.error_count || 0} #{ComplianceCheckResult.human_attribute_name(:violation_count)}" if test.errors.present?
- td
- = truncate(t("activemodel.attributes.compliance_check_result.#{test.test_id}"), length: 50)
- td
- p
- b
- = t("activemodel.attributes.compliance_check_result.#{test.test_id}")
-
- - if test.errors.present?
- - test.errors.first(10).each do |error|
- dl.inline
- dt
- - if error["source"].present?
- - if error[:source].object_path.present?
- - if error[:source].label.present?
- = link_to error[:source].label, object_url(@referential.id, error), target: :_blank
- - else
- = link_to "#{error[:source].object_path.type} (#{error[:source].object_path.id})", object_url(@referential.id, error), target: :_blank
-
- - if error[:source].file.present?
- = error[:source].objectid if error[:source].objectid.present?
-
- dd = t("compliance_check_result.details.detail_#{error[:error_id]}", object_labels_hash(error))
-
- - if error[:source].file.present?
- p.file_error
- = error[:source].file.filename
- = ", li: #{error[:source].file.line_number}" if error[:source].file.line_number.present?
- = ", co: #{error[:source].file.column_number}" if error[:source].file.column_number.present?
-
- - else
- tr
- td colspan="6"
- = t('compliance_check_results.in_progress')
-
- tfoot.hide-if-no-paging
- tr
- td colspan="5"
- ul.pagination.pagination-centered
diff --git a/app/views/compliance_checks/_compliance_checks.html.slim b/app/views/compliance_checks/_compliance_checks.html.slim
deleted file mode 100644
index 48db9ae94..000000000
--- a/app/views/compliance_checks/_compliance_checks.html.slim
+++ /dev/null
@@ -1,9 +0,0 @@
-.page_info
- span.search = t('will_paginate.page_entries_info.search')
- = page_entries_info @compliance_checks
-
-.compliance_checks.paginated_content
- = paginated_content @compliance_checks, "compliance_checks/compliance_check"
-
-.pagination
- = will_paginate @compliance_checks, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer \ No newline at end of file
diff --git a/app/views/compliance_checks/detailed_errors_index.csv.slim b/app/views/compliance_checks/detailed_errors_index.csv.slim
deleted file mode 100644
index 7fe20e282..000000000
--- a/app/views/compliance_checks/detailed_errors_index.csv.slim
+++ /dev/null
@@ -1,37 +0,0 @@
-= I18n.t('activemodel.attributes.compliance_check_result.severity');
-= I18n.t('activemodel.attributes.compliance_check_result.rule_code');
-= I18n.t('activemodel.attributes.compliance_check_result.object');
-= I18n.t('activemodel.attributes.compliance_check_result.resource');
-= I18n.t('activemodel.attributes.compliance_check_result.title');
-= I18n.t('activemodel.attributes.compliance_check_result.detail')
-
-- @compliance_check.compliance_check_validation_report.tests.each do |r|
- - if r.errors.present?
- - r.errors.first(10).each do |error|
- - case r.severity
- - when "warning"
- = I18n.t('compliance_check_result.severities.warning_txt')
- - when "error"
- = I18n.t('compliance_check_result.severities.error_txt')
-
- = r.test_id;
-
- - if error["source"].present?
- = error["source"]["objectid"] if error["source"]["objectid"].present?
-
- - if error["source"]["object_path"].present?
- = object_url(@referential_id, error)
- - elsif error["source"]["file"].present?
- = File.basename(error["source"]["file"]["filename"]) + " - "
- = I18n.t("compliance_check_results.index.column") + ":"
- = error["source"]["file"]["column_number"] + ","
- = I18n.t("compliance_check_results.index.line") + ":"
- = error["source"]["file"]["line_number"]
-
- - else
- = I18n.t("activemodel.attributes.compliance_check_result.#{r.test_id}");
- = I18n.t("compliance_check_result.details.detail_#{error['error_id']}", object_labels_hash(error) )
- = "\n"
-
-/ <%= I18n.t("activemodel.attributes.compliance_check_result.severity") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.rule_code") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.object") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.resource") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.title") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.detail") %>
-/ <% @compliance_check.compliance_check_validation_report.tests.each do |r| %><% if r.errors.present? %><% r.errors.first(10).each do |error| %><% case r.severity %><% when "warning" %><%= I18n.t "compliance_check_result.severities.warning_txt" %><% when "error" %><%= I18n.t "compliance_check_result.severities.error_txt" %><% end %>;<%= r.test_id %>;<% if error["source"].present? %><%= error["source"]["objectid"] if error["source"]["objectid"].present? %>;<% if error["source"]["object_path"].present? %><%= object_url(@referential_id, error) %><% elsif error["source"]["file"].present? %><%= File.basename(error["source"]["file"]["filename"]) +" - " %><%= I18n.t "compliance_check_results.index.column" %>:<%= error["source"]["file"]["column_number"] %>,<%= I18n.t "compliance_check_results.index.line" %>:<%= error["source"]["file"]["line_number"] %><% end %>;<% else %>;;<% end %><%= I18n.t("activemodel.attributes.compliance_check_result."+r.test_id) %>;<%= I18n.t("compliance_check_result.details.detail_#{error['error_id']}", object_labels_hash(error) )%><%= "\n" %><% end %><% end %><% end %>
diff --git a/app/views/compliance_checks/index.html.slim b/app/views/compliance_checks/index.html.slim
deleted file mode 100644
index 392c46663..000000000
--- a/app/views/compliance_checks/index.html.slim
+++ /dev/null
@@ -1,14 +0,0 @@
-= title_tag t('.title')
-
-.warning
- = t('.warning')
-
-#compliance_checks
- = render 'compliance_checks'
-
-- content_for :sidebar do
- ul.actions
- li
- = link_to t('compliance_check_tasks.actions.new'), new_referential_compliance_check_task_path(), class: 'add'
- li
- = link_to t('rule_parameter_sets.actions.index'), organisation_rule_parameter_sets_path, class: 'link' \ No newline at end of file
diff --git a/app/views/compliance_checks/index.js.slim b/app/views/compliance_checks/index.js.slim
deleted file mode 100644
index cfd8dc40d..000000000
--- a/app/views/compliance_checks/index.js.slim
+++ /dev/null
@@ -1 +0,0 @@
-| $('#compliance_checks').html("#{escape_javascript(render('compliance_checks'))}"); \ No newline at end of file
diff --git a/app/views/compliance_checks/report.html.slim b/app/views/compliance_checks/report.html.slim
deleted file mode 100644
index be2bb8adc..000000000
--- a/app/views/compliance_checks/report.html.slim
+++ /dev/null
@@ -1,41 +0,0 @@
-= title_tag job_status_title(@compliance_check)
-
-.compliance_check_show
- .links
- - if @compliance_check.class == Import
- = link_to(font_awesome_classic_tag('fa-eye') + t("compliance_checks.report.action_report"), referential_import_path(@referential, @compliance_check.id))
- = link_to font_awesome_classic_tag("fa-external-link") + t("compliance_checks.rule_parameter_set"), rule_parameter_set_referential_import_path(@referential, @compliance_check.id) if @compliance_check.rule_parameter_set?
- - else
- = link_to(font_awesome_classic_tag('fa-eye') + t("compliance_checks.report.action_report"), referential_compliance_check_path(@referential, @compliance_check.id))
- = link_to font_awesome_classic_tag("fa-external-link") + t("compliance_checks.rule_parameter_set"), rule_parameter_set_referential_compliance_check_path(@referential, @compliance_check.id) if @compliance_check.rule_parameter_set?
-
- .btn-group.pull-right
- button.btn.btn-default.dropdown-toggle type="button" data-toggle="dropdown" aria-expanded="false"
- = t('compliance_checks.show.export')
- span.caret
-
- ul.dropdown-menu role="menu"
- li
- - if @compliance_check.class == Import
- = link_to t('compliance_checks.show.export_csv'), export_referential_import_path(@referential, @compliance_check.id)
- - else
- = link_to t("compliance_checks.show.export_csv"), export_referential_compliance_check_path(@referential, @compliance_check.id)
-
- .report data-refresh-interval="#{job_refresh_interval(@compliance_check)}"
- = render partial: 'compliance_checks/compliance_check_results', locals: { compliance_check_validation_report: @compliance_check.compliance_check_validation_report }
-
-- content_for :sidebar do
- - if @compliance_check.compliance_check_validation_report && @compliance_check.compliance_check_validation_report.nok_error.blank?
- .row
- = font_awesome_classic_tag('fa-thumbs-up fa-5x col-md-3')
- p#validation_success.col-md-7
- = t('.validation_success')
-
- ul.actions
- li
- - if @compliance_check.class != Import
- = link_to t('compliance_checks.actions.destroy'), referential_compliance_check_path(@referential, @compliance_check.id), method: :delete, :data => {:confirm => t('compliance_checks.actions.destroy_confirm')}, class: 'remove'
-
- = history_tag(@compliance_check)
- #error.graph
- #warning.graph \ No newline at end of file
diff --git a/app/views/compliance_checks/show.html.slim b/app/views/compliance_checks/show.html.slim
deleted file mode 100644
index 8c6900981..000000000
--- a/app/views/compliance_checks/show.html.slim
+++ /dev/null
@@ -1,22 +0,0 @@
-.test
- = title_tag job_status_title(@compliance_check)
-
-- if @compliance_check.report.failure_code?
- .alert.alert-danger
- = t("iev.failure.#{@compliance_check.report.failure_code}")
-
-.progress_bars
- = progress_bar_tag(@compliance_check)
-
-.compliance_check.show
- .links
- = link_to font_awesome_classic_tag("fa-external-link") + t("compliance_checks.actions.report"), report_referential_compliance_check_path(@referential, @compliance_check.id) if @compliance_check.compliance_check_validation_report?
-
- = render partial: "shared/ie_report", locals: { job: @compliance_check, type: :validation, line_items: @line_items }
-
-- content_for :sidebar do
- ul.actions
- li
- = link_to t('compliance_checks.actions.destroy'), referential_compliance_check_path(@referential, @compliance_check.id), method: :delete, data: {confirm: t('compliance_checks.actions.destroy_confirm')}, class: 'remove'
-
- = history_tag(@compliance_check) \ No newline at end of file
diff --git a/app/views/compliance_checks/summary_errors_index.csv.slim b/app/views/compliance_checks/summary_errors_index.csv.slim
deleted file mode 100644
index 8c88d5cf6..000000000
--- a/app/views/compliance_checks/summary_errors_index.csv.slim
+++ /dev/null
@@ -1,34 +0,0 @@
-= I18n.t("activemodel.attributes.compliance_check_result.severity");
-= I18n.t("activemodel.attributes.compliance_check_result.status");
-= I18n.t("activemodel.attributes.compliance_check_result.rule_code");
-= I18n.t("activemodel.attributes.compliance_check_result.title");
-= I18n.t("activemodel.attributes.compliance_check_result.url");
-= I18n.t("activemodel.attributes.compliance_check_result.violation_count_txt");
-= I18n.t("activemodel.attributes.compliance_check_result.objects")
-
-- @compliance_check.compliance_check_validation_report.tests.each do |r|
- - case r.severity
- - when "warning"
- = I18n.t("compliance_check_result.severities.warning_txt")
- - when "error"
- = I18n.t("compliance_check_result.severities.error_txt")
-
- = r.result;
- = r.test_id;
-
- = I18n.t("activemodel.attributes.compliance_check_result.#{r.test_id}");
- = Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.test_id + ".html";
-
- = r.error_count
-
- - if r.error_count > 0
- - if r.errors.present?
- - r.errors.first(10).each do |error|
- - if error["source"]
- = error["source"]["objectid"] + " "
- - else
- = " "
-
-/ <%= I18n.t("activemodel.attributes.compliance_check_result.severity") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.status") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.rule_code") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.title") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.url") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.violation_count_txt") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.objects") %>
-/ <% @compliance_check.compliance_check_validation_report.tests.each do |r| %><% case r.severity %><% when "warning" %><%= I18n.t "compliance_check_result.severities.warning_txt" %><% when "error" %><%= I18n.t "compliance_check_result.severities.error_txt" %><% end %>;<%= r.result %>;<%= r.test_id %>;<%= I18n.t("activemodel.attributes.compliance_check_result."+r.test_id) %>;<%= Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.test_id + ".html" %>;<%= r.error_count %><% if r.error_count > 0 %><% if r.errors.present? %>;<% r.errors.first(10).each do |error| %><% if error["source"] %><%= error["source"]["objectid"] + " " %><% else %><%= " " %><% end %><% end %><% end %><% end %>
-/ <% end %>
diff --git a/app/views/import_resources/index.html.slim b/app/views/import_resources/index.html.slim
index 17e5532ae..849ed6d8d 100644
--- a/app/views/import_resources/index.html.slim
+++ b/app/views/import_resources/index.html.slim
@@ -6,50 +6,53 @@
''
/ PageContent
-.page_content
+.page_content.import_messages
.container-fluid
- - if @import_resources.any?
- .row
- .col-lg-12
- = definition_list t('metadatas'),{ 'Bilan d\'import' => link_to(@import.parent.name, workbench_import_path(@import.parent.workbench, @import.parent) ),
- 'Jeu de données associé' => ( @import.referential.present? ? link_to(@import.referential.name, referential_path(@import.referential)) : '-' ) }
+ .row
+ .col-lg-12
+ = definition_list t('metadatas'),{ 'Bilan d\'import' => link_to(@import.parent.name, workbench_import_path(@import.parent.workbench, @import.parent) ),
+ 'Jeu de données associé' => ( @import.referential.present? ? link_to(@import.referential.name, referential_path(@import.referential)) : '-' ) }
- - if @import_resources.any?
.row
.col-lg-12
h1
- span = import_status(@import.status)
+ span.status_icon = import_status(@import.status)
span = t('.table_state', lines_imported: @import_resources.lines_imported , lines_in_zipfile: @import_resources.lines_in_zipfile )
- .col-lg-12
- h2 = t('.table_title')
- .col-lg-12
- = t('.table_explanation')
- .col-lg-12
- = table_builder_2 @import_resources.where(resource_type: :file),
- [ \
- TableBuilderHelper::Column.new( \
- key: :name, \
- attribute: 'name', \
- sortable: false, \
- ), \
- TableBuilderHelper::Column.new( \
- key: :status, \
- attribute: Proc.new { |n| import_resource_status(n.status) }, \
- sortable: false, \
- ), \
- TableBuilderHelper::Column.new( \
- name: 'Résultat des tests' , \
- attribute: Proc.new { |n| I18n.t('import_resources.index.metrics', n.metrics.deep_symbolize_keys) }, \
- sortable: false, \
- ), \
- TableBuilderHelper::Column.new( \
- name: 'Téléchargement' , \
- attribute: Proc.new { |n| '<i class="fa fa-download" aria-hidden="true"></i>'.html_safe }, \
- sortable: false, \
- link_to: lambda do |import_resource| \
- workbench_import_import_resource_import_messages_path(import_resource.import.workbench, import_resource.import, import_resource, format: 'csv' ) \
- end \
- ), \
- ],
- links: [],
- cls: 'table has-search'
+ - if @import_resources.present?
+ .col-lg-12
+ h2 = t('.table_title')
+ .col-lg-12
+ = t('.table_explanation')
+ .col-lg-12
+ = table_builder_2 @import_resources.where(resource_type: :file),
+ [ \
+ TableBuilderHelper::Column.new( \
+ key: :name, \
+ attribute: 'name', \
+ sortable: false, \
+ ), \
+ TableBuilderHelper::Column.new( \
+ key: :status, \
+ attribute: Proc.new { |n| import_resource_status(n.status) }, \
+ sortable: false, \
+ ), \
+ TableBuilderHelper::Column.new( \
+ name: 'Résultat des tests' , \
+ attribute: Proc.new { |n| I18n.t('import_resources.index.metrics', n.metrics.deep_symbolize_keys) }, \
+ sortable: false, \
+ ), \
+ TableBuilderHelper::Column.new( \
+ name: 'Téléchargement' , \
+ attribute: Proc.new { |n| '<i class="fa fa-download" aria-hidden="true"></i>'.html_safe }, \
+ sortable: false, \
+ link_to: lambda do |import_resource| \
+ workbench_import_import_resource_import_messages_path(import_resource.import.workbench, import_resource.import, import_resource, format: 'csv' ) \
+ end \
+ ), \
+ ],
+ links: [],
+ cls: 'table has-search'
+ - else
+ .col-lg-12
+ - @import.messages.each do |message|
+ = I18n.t("import_messages.compliance_check_messages.#{message.message_key}")
diff --git a/app/views/imports/_filters.html.slim b/app/views/imports/_filters.html.slim
index 99fcb0232..a216019b6 100644
--- a/app/views/imports/_filters.html.slim
+++ b/app/views/imports/_filters.html.slim
@@ -9,13 +9,13 @@
.ffg-row
.form-group.togglable
= f.label Import.human_attribute_name(:status), required: false, class: 'control-label'
- = f.input :status_eq_any, collection: @imports.map(&:status).uniq.compact, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'}
+ = f.input :status_eq_any, collection: @imports.map(&:status).uniq.compact, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + import_status(l) + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'}, input_html: { checked: true}
.form-group.togglable
= f.label Import.human_attribute_name(:started_at), required: false, class: 'control-label'
.filter_menu
- = f.input :started_at_eq, as: :date, label: false, wrapper_html: { class: 'date smart_date filter_menu-item' }, include_blank: true
+ = f.input :started_on_date, as: :date, label: false, wrapper_html: { class: 'date smart_date filter_menu-item' }, include_blank: true
.actions
= link_to t('actions.erase'), workbench_imports_path(@workbench), class: 'btn btn-link'
- = f.submit t('actions.filter'), class: 'btn btn-default'
+ = f.submit t('actions.filter'), id: 'import_filter_btn', class: 'btn btn-default'
diff --git a/app/views/imports/index.html.slim b/app/views/imports/index.html.slim
index 37ae3b3c1..2203d3584 100644
--- a/app/views/imports/index.html.slim
+++ b/app/views/imports/index.html.slim
@@ -47,3 +47,5 @@
.row.mt-xs
.col-lg-12
= replacement_msg t('imports.search_no_results')
+
+= javascript_include_tag 'filters/import.js'
diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim
index 1ea5256aa..a1b9c4e09 100644
--- a/app/views/time_tables/index.html.slim
+++ b/app/views/time_tables/index.html.slim
@@ -68,3 +68,5 @@
= javascript_tag do
| window.I18n = #{(I18n.backend.send(:translations).to_json).html_safe};
+
+= javascript_include_tag 'filters/timetable.js'
diff --git a/app/views/workbenches/index.html.slim b/app/views/workbenches/index.html.slim
index d57f579ff..eece51bca 100644
--- a/app/views/workbenches/index.html.slim
+++ b/app/views/workbenches/index.html.slim
@@ -41,7 +41,7 @@
- if @referentials.any?
.list-group
- @referentials.each_with_index do |referential, i|
- = link_to referential.name, referential_path(referential), class: 'list-group-item' if i < 6
+ = link_to referential.name, referential_path(referential, workbench_id: referential.workbench_id), class: 'list-group-item' if i < 6
- else
.panel-body
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim
index bb54f07cb..50c719d12 100644
--- a/app/views/workbenches/show.html.slim
+++ b/app/views/workbenches/show.html.slim
@@ -29,7 +29,7 @@
key: :name, \
attribute: 'name', \
link_to: lambda do |referential| \
- referential_path(referential) \
+ referential_path(referential, workbench_id: referential.workbench_id) \
end \
), \
TableBuilderHelper::Column.new( \
@@ -77,3 +77,5 @@
= javascript_tag do
| window.I18n = #{(I18n.backend.send(:translations).to_json).html_safe};
+
+= javascript_include_tag 'filters/workbench.js'
diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb
index 706c3fc63..994493944 100644
--- a/app/workers/workbench_import_worker.rb
+++ b/app/workers/workbench_import_worker.rb
@@ -9,7 +9,7 @@ class WorkbenchImportWorker
def perform(import_id)
@workbench_import = WorkbenchImport.find(import_id)
@response = nil
- @workbench_import.update_attributes(status: 'running', started_at: Time.now)
+ @workbench_import.update(status: 'running', started_at: Time.now)
downloaded = download
zip_service = ZipService.new(downloaded)
upload zip_service
@@ -99,11 +99,6 @@ class WorkbenchImportWorker
end
def params file, name
- if dest = ENV["DEBUG_TEMPFILE"]
- require 'pry'
- binding.pry
- %x{unzip -oqq #{file.path} -d #{dest}}
- end
{ netex_import:
{ parent_id: @workbench_import.id,
parent_type: @workbench_import.class.name,
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index b53dba3d8..2ee5982f3 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -5,4 +5,4 @@ Rails.application.config.assets.version = '1.0'
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-Rails.application.config.assets.precompile += %w( base.css es6_browserified/*.js )
+Rails.application.config.assets.precompile += %w( base.css es6_browserified/*.js helpers/*.js filters/*.js)
diff --git a/config/locales/compliance_check_results.en.yml b/config/locales/compliance_check_results.en.yml
index 7a71f83f0..e0541ab36 100644
--- a/config/locales/compliance_check_results.en.yml
+++ b/config/locales/compliance_check_results.en.yml
@@ -1,458 +1,3 @@
en:
compliance_check_results:
- errors: 'Errors'
- file:
- zip_name_prefix: "compliance_check_results"
- summary_errors_file_prefix: "summary_of_tests.csv"
- detailed_errors_file_prefix: "detail_of_errors.csv"
- index:
- line: "Li"
- column: "Col"
- in_progress: "Compliance check in progress..."
- compliance_check_result:
- severities:
- error: "Required"
- warning: "Optional"
- error_txt: "Required"
- warning_txt: "Optional"
- statuses:
- nok: "Error"
- uncheck: "Unavailable"
- ok: "Success"
- details:
- #### level 1
- ## NEPTUNE
- detail_1_neptune_xml_1: "%{source_label} : %{error_value}"
- detail_1_neptune_xml_2: "%{source_label} : %{error_value}"
-
- ## GTFS
- detail_1_gtfs_csv_1: "le fichier %{filename} est inexploitable"
- detail_1_gtfs_csv_2: "le fichier %{filename} est inexploitable"
- detail_1_gtfs_csv_3: "le fichier %{filename} contient un entête vide"
- detail_1_gtfs_csv_4: "le fichier %{filename} contient des entêtes en double"
- detail_1_gtfs_csv_5: "la ligne du fichier %{filename} ne respecte pas la syntaxe CSV"
- detail_1_gtfs_csv_6: "le fichier %{filename} contient des balises HTML"
- detail_1_gtfs_csv_7: "la valeur '%{error_value}' du champ %{reference_value} contient des espaces aux extrémités"
-
- detail_1_gtfs_common_1: "le fichier %{filename} est obligatoire"
- detail_1_gtfs_common_2: "l'un des fichiers calendar.txt ou calendar_dates.txt est obligatoire"
- detail_1_gtfs_common_3: "le fichier %{filename} optionnel n'est pas présent"
- detail_1_gtfs_common_4: "le fichier %{filename} n'est pas traité"
- detail_1_gtfs_common_5: "le fichier %{filename} obligatoire doit définir au moins une entrée"
- detail_1_gtfs_common_6: "l'un des deux fichiers calendar.txt ou calendar_dates.txt doit définir au moins une entrée"
- detail_1_gtfs_common_7: "le fichier %{filename} optionnel ne contient aucune entrée"
- detail_1_gtfs_common_8: "la valeur %{error_value} est définie plusieurs fois pour la colonne %{reference_value}"
- detail_1_gtfs_common_9: "la colonne %{error_value} est obligatoire"
- detail_1_gtfs_common_10: "la colonne agency_id devrait être présente dans le fichier %{filename}"
- detail_1_gtfs_common_11: "la colonne %{error_value} n'est pas exploitée dans le fichier %{filename}"
- detail_1_gtfs_common_12: "la valeur de la colonne %{error_value} n'est pas renseignée"
- detail_1_gtfs_common_13: "la colonne agency_id doit être présente dans le fichier %{filename}"
- detail_1_gtfs_common_14: "la colonne agency_id est absente dans le fichier %{filename}"
- detail_1_gtfs_common_15_1: "la valeur arrival_time est obligatoire en présence d'une valeur pour departure_time"
- detail_1_gtfs_common_15_2: "la valeur departure_time est obligatoire en présence d'une valeur pour arrival_time"
- detail_1_gtfs_common_15_3: "la valeur min_transfer_time est obligatoire quand transfer_type=2"
- detail_1_gtfs_common_16: "la valeur %{error_value} n'est pas autorisée pour le champs %{reference_value} "
-
- detail_1_gtfs_route_1: "les champs route_long_name et route_short_name ne sont pas définies"
- detail_1_gtfs_route_2: "les valeurs des champs route_long_name et route_short_name ne sont pas renseignées"
-
- detail_1_gtfs_calendar_1: "aucun jour d'application n'est activé"
- detail_1_gtfs_calendar_2: "la date de fin du calendrier est antérieur ou égale à la date début"
-
- #### level 2
- ## NEPTUNE
- detail_2_neptune_common_1: "L'élément %{source_objectid} a des attributs qui diffèrent entre les différents fichiers qui le définissent"
- detail_2_neptune_common_2: "L'élément %{source_objectid} partage l'attribut RegistrationNumber = %{error_value} avec un autre objet de même type"
- detail_2_neptune_network_1: "La ligne %{source_objectid} est absente de la liste des lignes du réseau %{target_0_objectid}"
- detail_2_neptune_network_2: "Le réseau %{source_objectid} a un type de source non valide : %{error_value}, remplacé par %{reference_value}"
- detail_2_neptune_groupofline_1: "La ligne %{source_objectid} est absente de la liste des lignes du du groupe de lignes %{target_0_objectid}"
- detail_2_neptune_stoparea_1: "Le fils (contains = %{error_value}) de l'arrêt %{source_objectid} n'est pas de type StopArea ni StopPoint"
- detail_2_neptune_stoparea_2: "L'arrêt %{source_objectid} de type %{reference_value} ne peut contenir que des arrêts de type StopPlace ou CommercialStopPoint, or un des arrêts contenus (contains = %{target_0_objectid}) est de type %{error_value}"
- detail_2_neptune_stoparea_3: "L'arrêt %{source_objectid} de type %{reference_value} ne peut contenir que des arrêts de type BoardingPosition ou Quay, or un des arrêts contenus (contains = %{target_0_objectid}) est de type %{error_value}"
- detail_2_neptune_stoparea_4: "L'arrêt %{source_objectid} de type %{reference_value} ne peut contenir que des points d'arrêt de séquence, or un des arrêts contenus (contains = %{target_0_objectid}) est un StopArea arrêt de type %{error_value}"
- detail_2_neptune_stoparea_5: "L'arrêt %{source_objectid} référence une position géographique (centroidOfArea = %{error_value}) inexistante"
- detail_2_neptune_stoparea_6: "L'arrêt %{source_objectid} référence une position géographique (centroidOfArea = %{target_0_objectid}) qui ne le référence pas en retour (containedIn = %{error_value})"
- detail_2_neptune_itl_1: "Le fils (contains = %{target_0_objectid}) de type %{error_value} ne peut pas être contenu dans l'arrêt %{source_objectid} de type %{reference_value}"
- detail_2_neptune_itl_2: "L'arrêt de type ITL %{source_objectid} n'est pas utilisé"
- detail_2_neptune_itl_3: "L'arrêt areaId = %{error_value} référencé par l'ITL %{source_objectid} n'existe pas"
- detail_2_neptune_itl_4: "L'arrêt areaId = %{target_0_objectid} référencé par l'ITL %{source_objectid} devrait être de type ITL et non de type %{error_value}"
- detail_2_neptune_itl_5: "La référence lineIdShortCut = %{error_value} de l'ITL %{source_objectid} n'est pas cohérente avec la ligne %{target_0_objectid}"
- detail_2_neptune_areacentroid_1: "La position géographique <AreaCentroid> %{source_objectid} référence un arrêt (containedIn = %{error_value}) inexistant"
- detail_2_neptune_areacentroid_2: "La position géographique <AreaCentroid> %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- detail_2_neptune_connectionlink_1: "La correspondance %{source_objectid} référence 2 arrêts inexistants"
- detail_2_neptune_accesspoint_1: "L'accès %{source_objectid} référence un arrêt parent (containedIn = %{error_value}) inexistant"
- detail_2_neptune_accesspoint_2: "L'accès %{source_objectid} référence un arrêt parent (containedIn = %{target_0_objectid}) de type invalide (ITL)"
- detail_2_neptune_accesspoint_3: "L'accès %{source_objectid} n'a pas de lien d'accès"
- detail_2_neptune_accesspoint_4: "L'accès %{source_objectid} de type In a des liens d'accès sortants"
- detail_2_neptune_accesspoint_5: "L'accès %{source_objectid} de type Out a des liens d'accès entrants"
- detail_2_neptune_accesspoint_6: "L'accès %{source_objectid} de type InOut n'a que des liens d'accès entrants ou sortants"
- detail_2_neptune_accesspoint_7: "L'accès %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- detail_2_neptune_accesslink_1: "La liaison d'accès %{source_objectid} référence %{error_value} qui n'existe pas"
- detail_2_neptune_accesslink_2: "Sur la liaison d'accès %{source_objectid}, les références startOfLink = %{error_value} et endOfLink = %{reference_value} sont de même type"
- detail_2_neptune_line_1: "La ligne %{source_objectid} référence un réseau (ptNetworkIdShortcut = %{error_value} inexistant"
- detail_2_neptune_line_2: "La ligne %{source_objectid} référence un point d'arrêt <StopPoint> (lineEnd = %{error_value}) inexistant "
- detail_2_neptune_line_3: "La ligne %{source_objectid} référence un point d'arrêt (lineEnd = %{error_value}) qui n'est pas terminus d'une séquence d'arrêts"
- detail_2_neptune_line_4: "La ligne %{source_objectid} référence une séquence d'arrêt (routeId = %{error_value}) inexistante"
- detail_2_neptune_line_5: "La séquence d'arrêts (routeId = %{target_0_objectid}) n'est pas référencée par la ligne %{source_objectid}"
- detail_2_neptune_line_6: "La ligne %{source_objectid} ne renseigne aucun des champs name, number ou publishedName"
- detail_2_neptune_route_1: "La séquence d'arrêts %{source_objectid} référence une mission (journeyPatternId = %{error_value}) inexistante"
- detail_2_neptune_route_2: "La séquence d'arrêts %{source_objectid} référence un tronçon (ptLinkId = %{error_value}) inexistant"
- detail_2_neptune_route_3: "La séquence retour (waybackRouteId = %{error_value}) de la séquence d'arrêts %{source_objectid} n'existe pas"
- detail_2_neptune_route_4: "Le tronçon (ptLinkId = %{error_value}) référencé par la séquence d'arrêt %{source_objectid} est partagé avec %{target_0_objectid}"
- detail_2_neptune_route_5: "Le tronçon %{source_objectid} partage un %{reference_value} : %{error_value} avec un autre tronçon"
- detail_2_neptune_route_6_1: "La séquence d'arrêts %{source_objectid} n'est pas une séquence linéaire, le chainage des tronçons forme un anneau"
- detail_2_neptune_route_6_2: "La séquence d'arrêts %{source_objectid} n'est pas une séquence linéaire, le chainage des tronçons est rompu au tronçon %{target_0_objectid}"
- detail_2_neptune_route_7: "La séquence d'arrêts %{source_objectid} ne référence pas la mission %{target_0_objectid} alors que cette mission référence la séquence d'arrêt"
- detail_2_neptune_route_8: "La mission journeyPatternId = %{target_0_objectid} de la séquence d'arrêts %{source_objectid} utilise des points d'arrêts hors séquence"
- detail_2_neptune_route_9: "Le point d'arrêt (stopPointId = %{target_0_objectid}) de la séquence d'arrêts %{source_objectid} n'est utilisé dans aucune mission"
- detail_2_neptune_route_10: "La séquence retour (waybackRouteId = %{target_0_objectid}) ne référence pas la séquence d'arrêts %{source_objectid} comme retour"
- detail_2_neptune_route_11: "Le sens (%{reference_value}) de la séquence d'arrêt %{source_objectid} n'est pas compatible avec celui (%{error_value}) de la séquence opposée %{target_0_objectid}"
- detail_2_neptune_route_12: "Le départ dans la zone %{reference_value}) de la séquence d'arrêts %{source_objectid} n'est pas dans la même zone que l'arrivée (zone %{error_value} de la séquence retour %{target_0_objectid}"
- detail_2_neptune_ptlink_1: "Le tronçon %{source_objectid} reférence un %{reference_value} = %{error_value} inexistant"
- detail_2_neptune_journeypattern_1: "La mission %{source_objectid} référence une séquence d'arrêts (routeId = %{error_value}) inexistante"
- detail_2_neptune_journeypattern_2: "La mission %{source_objectid} référence un point d'arrêt (stopPointId = %{error_value}) inexistant"
- detail_2_neptune_journeypattern_3: "La mission %{source_objectid} référence une ligne (lineIdShortcut = %{error_value}) inexistante"
- detail_2_neptune_stoppoint_1: "Le point d'arrêt %{source_objectid} référence une ligne (lineIdShortcut = %{error_value}) inexistante"
- detail_2_neptune_stoppoint_2: "Le point d'arrêt %{source_objectid} référence un réseau (ptNetworkIdShortcut = %{error_value}) inexistant"
- detail_2_neptune_stoppoint_3: "Le point d'arrêt %{source_objectid} référence un arrêt (containedIn = %{error_value}) inexistant"
- detail_2_neptune_stoppoint_4: "Le point d'arrêt %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- detail_2_neptune_timetable_1: "Le calendrier (<Timetable>) %{source_objectid} ne référence aucune course existante"
- detail_2_neptune_timetable_2: "La course %{source_objectid} n'est référencée dans aucun calendrier (<Timetable>)"
- detail_2_neptune_timetable_3: "Le calendrier (<Timetable>) %{source_objectid} contient une période invalide"
- detail_2_neptune_vehiclejourney_1: "La course %{source_objectid} référence une séquence d'arrêts (routeId = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_2: "La course %{source_objectid} référence une mission (journeyPatternId = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_3: "La course %{source_objectid} référence une ligne (lineIdShortcut = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_4: "La course %{source_objectid} référence un opérateur (operatorId = %{error_value}) inexistant"
- detail_2_neptune_vehiclejourney_5: "La course %{source_objectid} référence une fréquence horaire (timeSlotId = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_6: "La course %{source_objectid} référence une mission %{error_value} incompatible de la séquence d'arrêts %{reference_value}"
- detail_2_neptune_vehiclejourney_7: "La mission %{source_objectid} n'est référencée par aucune course"
- detail_2_neptune_vehiclejourney_8: "La course %{source_objectid} doit référencer une mission si la séquence d'arrêt en possède plusieurs"
- detail_2_neptune_vehiclejourneyatstop_1: "La course %{source_objectid} fournit un horaire sur un point d'arrêt (stopPointId = %{error_value}) inexistant"
- detail_2_neptune_vehiclejourneyatstop_2: "Un horaire de la course %{source_objectid} référence une autre course : vehicleJourneyId = %{error_value}"
- detail_2_neptune_vehiclejourneyatstop_3: "La course %{source_objectid} ne fournit pas les horaires des points d'arrêts selon l'ordre de la séquence d'arrêts %{error_value}"
- detail_2_neptune_vehiclejourneyatstop_4: "La course %{source_objectid} ne fournit pas les horaires des points d'arrêts de sa mission %{error_value}"
- detail_2_neptune_facility_1: "L'équipement %{source_objectid} est situé sur un arrêt inexistant (containedId = %{error_value})"
- detail_2_neptune_facility_2: "L'équipement %{source_objectid} référence un arrêt (stopAreaId = %{error_value}) inexistant"
- detail_2_neptune_facility_3: "L'équipement %{source_objectid} référence une ligne (lineId = %{error_value} inexistante"
- detail_2_neptune_facility_4: "L'équipement %{source_objectid} référence une correspondance (connectionLinkId = %{error_value} inexistante"
- detail_2_neptune_facility_5: "L'équipement %{source_objectid} référence un point d'arrêt (stopPointId = %{error_value} inexistant"
- detail_2_neptune_facility_6: "L'équipement %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
-
- ## GTFS
- detail_2_gtfs_common_1: "Identifiant %{reference_value} inconnu : %{error_value}"
- detail_2_gtfs_common_2: "Identifiant %{reference_value} non référencé : %{error_value}"
- detail_2_gtfs_common_3: "Le couple de champs (%{reference_value}) est en doublon (%{error_value}): "
- detail_2_gtfs_common_4: "Les valeurs des champs (%{reference_value}) sont identiques : '%{error_value}'"
- detail_2_gtfs_stop_1: "L'arrêt (%{source_objectid}) ne peut appartenir à un parent de type %{error_value}"
- detail_2_gtfs_stop_2: "La colonne location_type n'est pas renseignée"
- detail_2_gtfs_stop_3: "Le nom et la description de l'arrêt (%{source_objectid}) sont identiques : '%{error_value}'"
- detail_2_gtfs_stop_4: "L'arrêt (%{source_objectid}) de type station ne peut appartenir à une autre station (%{error_value})"
- detail_2_gtfs_route_1: "La route (%{source_objectid}) a la même valeur (%{error_value}) pour route_short_name et route_long_name"
- detail_2_gtfs_route_2: "La route (%{source_objectid}) réutilise la valeur de route_short_name (%{error_value}) dans route_long_name (%{reference_value})"
- detail_2_gtfs_route_3: "les couleurs de la route (%{source_objectid}) ne sont pas contrastées"
- detail_2_gtfs_route_4: "La route (%{source_objectid}) utilise les valeurs (route_short_name,route_long_name) de la route (%{error_value}) "
-
- #### level 3
- detail_3_stoparea_1: "L'arrêt %{source_label} (%{source_objectid}) n'est pas géolocalisé"
- detail_3_stoparea_2: "L'arrêt %{source_label} (%{source_objectid}) est localisé trop près de l'arrêt %{target_0_label} (%{target_0_objectid}) : distance %{error_value} < %{reference_value}"
- detail_3_stoparea_3: "Les arrêts %{source_label} (%{source_objectid} et %{target_0_objectid}) sont desservis par les mêmes lignes"
- detail_3_stoparea_4: "L'arrêt %{source_label} (%{source_objectid}) est en dehors du périmètre de contrôle"
- detail_3_stoparea_5: "L'arrêt %{source_label} (%{source_objectid}) est localisé trop loin de son parent %{target_0_label} (%{target_0_objectid}) : distance %{error_value} > %{reference_value}"
- detail_3_accesspoint_1: "L'accès %{source_label} (%{source_objectid}) n'est pas géolocalisé"
- detail_3_accesspoint_2: "L'accès %{source_label} (%{source_objectid}) est localisé trop près de l'accès %{target_0_label} (%{target_0_objectid}) : distance %{error_value} < %{reference_value}"
- detail_3_accesspoint_3: "L'accès %{source_label} (%{source_objectid}) est localisé trop loin de son parent %{target_0_label} (%{target_0_objectid}) : distance %{error_value} > %{reference_value}"
- detail_3_connectionlink_1: "Sur la correspondance %{source_label} (%{source_objectid}), la distance entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) est trop grande : distance %{error_value} > %{reference_value}"
- detail_3_connectionlink_2: "Sur la correspondance %{source_label} (%{source_objectid}), la distance entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) : %{error_value} est supérieure à la longueur du lien : %{reference_value}"
- detail_3_connectionlink_3_1: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse par défaut %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_connectionlink_3_2: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse pour un voyageur occasionnel %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_connectionlink_3_3: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse pour un voyageur habitué %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_connectionlink_3_4: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse pour un voyageur à mobilité réduite %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_1: "Sur le lien d'accès %{source_label} (%{source_objectid}), la distance entre l'arrêt %{target_0_label} (%{target_0_objectid}) et l'accès %{target_1_label} (%{target_1_objectid}) est trop grande : distance %{error_value} > %{reference_value}"
- detail_3_accesslink_2: "Sur le lien d'accès %{source_label} (%{source_objectid}), la distance entre l'arrêt %{target_0_label} (%{target_0_objectid}) et l'accès %{target_1_label} (%{target_1_objectid}) : %{error_value} est supérieure à la longueur du lien : %{reference_value}"
- detail_3_accesslink_3_1: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse par défaut %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_3_2: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse pour un voyageur occasionnel %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_3_3: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse pour un voyageur habitué %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_3_4: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse pour un voyageur à mobilité réduite %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_line_1: "La ligne %{source_label} (%{source_objectid}) a une ligne homonyme sur le même réseau %{target_0_label} (%{target_0_objectid})"
- detail_3_line_2: "La ligne %{source_label} (%{source_objectid}) n'a pas de séquence d'arrêts"
- detail_3_route_1: "Sur la séquence d'arrêt %{source_label} (%{source_objectid}), l'arrêt %{target_0_label} (%{target_0_objectid}) est desservi 2 fois consécutivement"
- detail_3_route_2: "Les terminus de la séquence d'arrêt %{source_label} (%{source_objectid}) ne sont pas cohérent avec ceux de sa séquence opposée : l'une part de %{target_0_label} (%{target_0_objectid}) et l'autre arrive à %{target_1_label} (%{target_1_objectid})"
- detail_3_route_3_1: "Sur la séquence d'arrêt %{source_label} (%{source_objectid}), entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}), distance %{error_value} < %{reference_value} "
- detail_3_route_3_2: "Sur la séquence d'arrêt %{source_label} (%{source_objectid}), entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}), distance %{error_value} > %{reference_value} "
- detail_3_route_4: "La séquence d'arrêt %{source_label} (%{source_objectid}) utilise la même liste ordonnée d'arrêts que la séquence d'arrêts %{target_0_label} (%{target_0_objectid})"
- detail_3_route_5: "La séquence d'arrêt %{source_label} (%{source_objectid}) peut admettre la séquence %{target_0_label} (%{target_0_objectid}) comme séquence opposée"
- detail_3_route_6: "La séquence d'arrêt %{source_label} (%{source_objectid}) doit avoir un minimum de 2 arrêts"
- detail_3_route_7: "La séquence d'arrêt %{source_label} (%{source_objectid}) n'a pas de mission"
- detail_3_route_8: "La séquence d'arrêt %{source_label} (%{source_objectid}) a %{error_value} arrêts non utilisés par des missions"
- detail_3_route_9: "La séquence d'arrêt %{source_label} (%{source_objectid}) n'a pas de mission desservant l'ensemble de ses arrêts"
- detail_3_journeypattern_1: "La mission %{source_label} (%{source_objectid}) utilise les mêmes arrêts que la mission %{target_0_label} (%{target_0_objectid}) - nombre d'arrêts = %{error_value}"
- detail_3_vehiclejourney_1: "Arrêt %{target_0_label} (%{target_0_objectid}) : durée d'arrêt mesurée %{error_value} > %{reference_value}"
- detail_3_vehiclejourney_2_1: "La course %{source_label} (%{source_objectid}) a des horaires décroissants entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
- detail_3_vehiclejourney_2_2: "La course %{source_label} (%{source_objectid}) a une vitesse %{error_value} < %{reference_value} km/h entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
- detail_3_vehiclejourney_2_3: "La course %{source_label} (%{source_objectid}) a une vitesse %{error_value} > %{reference_value} km/h entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
- detail_3_vehiclejourney_3: "La course %{source_label} (%{source_objectid}) a une variation de progression entre les arrêts %{target_1_label} (%{target_1_objectid}) et %{target_2_label} (%{target_2_objectid}) %{error_value} > %{reference_value} avec la course %{target_0_label} (%{target_0_objectid})"
- detail_3_vehiclejourney_4: "La course %{source_label} (%{source_objectid}) n'a pas de calendrier d'application"
- detail_3_facility_1: "L'équipement %{source_label} (%{source_objectid}) n'est pas géolocalisé"
- detail_3_facility_2: "L'équipement %{source_label} (%{source_objectid}) est localisé trop loin de son parent %{areaName} (%{areaId}) : distance %{error_value} > %{reference_value}"
-
- detail_4_network_1_min_size: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value}) "
- detail_4_network_1_max_size: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_network_1_pattern: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_network_1_unique: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) a une valeur partagée avec le réseau %{target_0_label} (%{target_0_objectid})"
- detail_4_company_1_min_size: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_company_1_max_size: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_company_1_pattern: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_company_1_unique: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) a une valeur partagée avec le transporteur %{target_0_label} (%{target_0_objectid})"
- detail_4_groupofline_1_min_size: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_groupofline_1_max_size: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_groupofline_1_pattern: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_groupofline_1_unique: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) a une valeur partagée avec le groupe de lignes %{target_0_label} (%{target_0_objectid})"
- detail_4_stoparea_1_min_size: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_stoparea_1_max_size: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_stoparea_1_pattern: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_stoparea_1_unique: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) a une valeur partagée avec l'arrêt %{target_0_label} (%{target_0_objectid})"
- detail_4_stoparea_2: "L'arrêt physique %{source_label} (%{source_objectid}) n'a pas de parent"
- detail_4_accesspoint_1_min_size: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_accesspoint_1_max_size: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_accesspoint_1_pattern: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_accesspoint_1_unique: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) a une valeur partagée avec le point d'accès %{target_0_label} (%{target_0_objectid})"
- detail_4_accesslink_1_min_size: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_accesslink_1_max_size: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_accesslink_1_pattern: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_accesslink_1_unique: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) a une valeur partagée avec le lien d'accès %{target_0_label} (%{target_0_objectid})"
- detail_4_connectionlink_1_min_size: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_connectionlink_1_max_size: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_connectionlink_1_pattern: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_connectionlink_1_unique: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) a une valeur partagée avec la correspondance %{target_0_label} (%{target_0_objectid})"
- detail_4_connectionlink_2: "Sur la correspondance %{source_label} (%{source_objectid}) au moins l'un des arrêts %{startName} (%{startId}) et %{endName} (%{endId}) n'est pas un arrêt physique"
- detail_4_timetable_1_min_size: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_timetable_1_max_size: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_timetable_1_pattern: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_timetable_1_unique: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) a une valeur partagée avec le calendrier %{target_0_label} (%{target_0_objectid})"
- detail_4_line_1_min_size: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_line_1_max_size: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_line_1_pattern: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_line_1_unique: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) a une valeur partagée avec la ligne %{target_0_label} (%{target_0_objectid})"
- detail_4_line_2: "La ligne %{source_label} (%{source_objectid}) a un mode de transport interdit %{error_value}"
- detail_4_line_3_1: "La ligne %{source_label} (%{source_objectid}) n'a pas de groupe de lignes"
- detail_4_line_3_2: "La ligne %{source_label} (%{source_objectid}) a plusieurs groupes de lignes"
- detail_4_line_4_1: "La ligne %{source_label} (%{source_objectid}) n'a pas de séquence d'arrêts"
- detail_4_line_4_2: "La ligne %{source_label} (%{source_objectid}) a trop de séquences d'arrêts non associées (%{error_value})"
- detail_4_route_1_min_size: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_route_1_max_size: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_route_1_pattern: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_route_1_unique: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) a une valeur partagée avec la séquence d'arrêts %{target_0_label} (%{target_0_objectid})"
- detail_4_journeypattern_1_min_size: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_journeypattern_1_max_size: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_journeypattern_1_pattern: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_journeypattern_1_unique: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) a une valeur partagée avec la mission %{target_0_label} (%{target_0_objectid})"
- detail_4_vehiclejourney_1_min_size: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_vehiclejourney_1_max_size: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_vehiclejourney_1_pattern: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_vehiclejourney_1_unique: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) a une valeur partagée avec la course %{target_0_label} (%{target_0_objectid})"
- detail_4_vehiclejourney_2: "La course %{source_label} (%{source_objectid}) a un mode de transport interdit %{error_value}"
- activemodel:
- models:
- compliance_check_result:
- zero: "Validation"
- one: "Validation"
- other: "Validation"
- attributes:
- compliance_check_result:
- 1-NEPTUNE-XML-1: "Conformité à la syntaxe XML suivant les recommandations du W3C."
- 1-NEPTUNE-XML-2: "Conformité au schéma défini par la XSD du profil TRIDENT/NEPTUNE."
- 2-NEPTUNE-Common-1: "Unicité des éléments objectId des différents objets d'un lot de fichiers Neptune."
- 2-NEPTUNE-Common-2: "Unicité des éléments regitrationNumber des différents objets d'un lot de fichiers Neptune."
- 2-NEPTUNE-Network-1: "Correcte référence à des lignes <Line> dans version du réseau <PTNetwork>."
- 2-NEPTUNE-Network-2: "Valeur autorisée pour le type de source <SourceType> dans version du réseau <PTNetwork>."
- 2-NEPTUNE-GroupOfLine-1: "Correcte référence à des lignes <Line> dans groupe de lignes <GroupOfLine>."
- 2-NEPTUNE-StopArea-1: "Correcte référence à des arrêts <StopArea> et/ou à des points d'arrêt sur parcours <StopPoint> dans les arrêts <StopArea>."
- 2-NEPTUNE-StopArea-2: "Correcte référence à des arrêts <StopArea> dans les arrêts <StopArea> de type StopPlace."
- 2-NEPTUNE-StopArea-3: "Correcte référence à des arrêts <StopArea> dans les arrêts <StopArea> de type CommercialStopPoint."
- 2-NEPTUNE-StopArea-4: "Correcte référence à des points d'arrêt sur parcours <StopPoint> dans les arrêts <StopArea> de type BoardingPosition ou Quay."
- 2-NEPTUNE-StopArea-5: "Correcte référence à une position géographique <AreaCentroid> dans les arrêts <StopArea> de tout type StopPlace, CommercialStopPoint, BoardingPosition et Quay."
- 2-NEPTUNE-StopArea-6: "référenceréciproque d'une position géographique <AreaCentroid> dans les arrêts <StopArea> de tout type StopPlace, CommercialStopPoint, BoardingPosition et Quay."
- 2-NEPTUNE-ITL-1: "Correcte référence à des arrêts <StopArea> dans les arrêts <StopArea> de type ITL."
- 2-NEPTUNE-ITL-2: "Correcte référence à des arrêts <StopArea> de type ITL dans la classe d’objets <ITL>."
- 2-NEPTUNE-ITL-3: "Correcte référence à des arrêts <StopArea> dans la classe d’objets <ITL>."
- 2-NEPTUNE-ITL-4: "Vérification du type de référence à des arrêts <StopArea> type ITL dans la classe d’objets <ITL>."
- 2-NEPTUNE-ITL-5: "Bonne référence à la ligne <Line> dans la classe d’objets <ITL>."
- 2-NEPTUNE-AreaCentroid-1: "Correcte référence à des arrêts <StopArea> dans la classe d’objets <AreaCentroid>."
- 2-NEPTUNE-AreaCentroid-2: "Vérification du modèle de projection de référence utilisé."
- 2-NEPTUNE-ConnectionLink-1: "Correcte référence aux arrêts <StopArea> définissant des tronçons de correspondance <ConnectionLink>."
- 2-NEPTUNE-AccessPoint-1: "Correcte référence à un arrêt <StopArea> dans les accès <AccessPoint>."
- 2-NEPTUNE-AccessPoint-2: "Correcte référence à un arrêt <StopArea> dans les accès <AccessPoint>."
- 2-NEPTUNE-AccessPoint-3: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint>."
- 2-NEPTUNE-AccessPoint-4: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint> de type 'in'."
- 2-NEPTUNE-AccessPoint-5: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint> sur les accès de type 'out'."
- 2-NEPTUNE-AccessPoint-6: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint> sur les accès de type 'inout'."
- 2-NEPTUNE-AccessPoint-7: "Vérification du modèle de projection de référence utilisé."
- 2-NEPTUNE-AccessLink-1: "Correcte référence aux arrêts <StopArea> et accès <AccessPoint> définissant des liens d'accès <AccessLink>."
- 2-NEPTUNE-AccessLink-2: "Correcte référence aux arrêts <StopArea> et accès <AccessPoint> définissant des liens d'accès <AccessLink>."
- 2-NEPTUNE-Line-1: "Correcte référence au réseau dans l'objet ligne <Line>."
- 2-NEPTUNE-Line-2: "Correcte référence à un point d'arrêt sur parcours <StopPoint> comme terminus de ligne <Line>."
- 2-NEPTUNE-Line-3: "Correcte référence à un point d'arrêt sur parcours <StopPoint> comme terminus de ligne <Line>."
- 2-NEPTUNE-Line-4: "Correcte référence aux séquences d'arrêts <ChouetteRoute> dans l'objet ligne <Line>."
- 2-NEPTUNE-Line-5: "Correcte référence aux séquences d'arrêts <ChouetteRoute> dans l'objet ligne <Line>."
- 2-NEPTUNE-Line-6: "Présence d'au moins une valeur parmi <name>,<number> ou <publishedName> dans l'objet ligne <Line>."
- 2-NEPTUNE-Route-1: "Existence des missions <JourneyPattern> référencées par la séquence d'arrêt <ChouetteRoute>."
- 2-NEPTUNE-Route-2: "Existence des tronçons commerciaux <PtLink> référencés par la séquence d'arrêt <ChouetteRoute>."
- 2-NEPTUNE-Route-3: "Existence de la séquence opposée <ChouetteRoute> référencée par la séquence d'arrêt <ChouetteRoute>."
- 2-NEPTUNE-Route-4: "Correcte référence à un tronçon commercial <PtLink> dans une séquence d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-5: "Vérification que tous les points d'arrêts sur parcours sont rattachés à une séquence d'arrêts <ChouetteRoute> au départ d'un tronçon commercial <PtLink> et/ou à l'arrivée d'un autre tronçon commercial <PtLink> de la même séquence d'arrêts."
- 2-NEPTUNE-Route-6: "Vérification du correct ordonnancement des points d'arrêts sur parcours <StopPoint> dans le chainage des tronçons <PtLink> d'une séquence d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-7: "référence mutuelle des missions <JourneyPattern> et des séquences d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-8: "Cohérence des références aux points d'arrêt des missions <JourneyPattern> et des séquences d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-9: "Utilité des points d'arrêts sur parcours des séquences d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-10: "référence d'une séquence d'arrêts <ChouetteRoute> à une séquence d'arrêts opposée."
- 2-NEPTUNE-Route-11: "Cohérence des sens de la référence d'une séquence d'arrêts <ChouetteRoute> à une séquence d'arrêts opposée."
- 2-NEPTUNE-Route-12: "Cohérence des terminus de la référence d'une séquence d'arrêts <ChouetteRoute> à une séquence d'arrêts opposée."
- 2-NEPTUNE-PtLink-1: "Existence des arrêts <StopPoint> référencés par les tronçons commerciaux <PTLink>."
- 2-NEPTUNE-JourneyPattern-1: "Existence de la séquence d'arrêt <ChouetteRoute> référencée par la mission <JourneyPattern>."
- 2-NEPTUNE-JourneyPattern-2: "Existence des arrêts <StopPoint> référencés par la mission <JourneyPattern>."
- 2-NEPTUNE-JourneyPattern-3: "Existence de la ligne <Line> référencée par la mission <JourneyPattern>."
- 2-NEPTUNE-StopPoint-1: "Existence de la ligne <Line> référencée par l'arrêt <StopPoint>."
- 2-NEPTUNE-StopPoint-2: "Existence du réseau <PTNetwork> référence par l'arrêt <StopPoint>."
- 2-NEPTUNE-StopPoint-3: "Existence de l'arrêt <StopArea> référencé par l'arrêt <StopPoint>."
- 2-NEPTUNE-StopPoint-4: "Vérification du modèle de projection de référence utilisé."
- 2-NEPTUNE-Timetable-1: "Utilité des calendriers."
- 2-NEPTUNE-Timetable-2: "Utilité des calendriers."
- 2-NEPTUNE-Timetable-2: "Validité des dates de début et de fin des périodes des calendriers"
- 2-NEPTUNE-Timetable-3: "Validité des dates de début et de fin des périodes des calendriers"
- 2-NEPTUNE-VehicleJourney-1: "Existence de la séquence d'arrêt <ChouetteRoute> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-2: "Existence de la mission <JourneyPattern> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-3: "Existence de la ligne <Line> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-4: "Existence de l'opérateur <Company> référencé par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-5: "Existence de la tranche horaire <TimeSlot> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-6: "Cohérence entre la course, la mission et la séquence d'arrêts."
- 2-NEPTUNE-VehicleJourney-7: "Utilité des missions"
- 2-NEPTUNE-VehicleJourney-8: "Mission implicite"
- 2-NEPTUNE-VehicleJourneyAtStop-1: "Existence de l'arrêt <StopPoint> référencé par l'horaire <VehicleJourneyAtStop>."
- 2-NEPTUNE-VehicleJourneyAtStop-2: "Existence de la course <VehicleJourney> référenceé par l'horaire <VehicleJourneyAtStop>."
- 2-NEPTUNE-VehicleJourneyAtStop-3: "adéquation des horaires de la course à la séquence d'arrêts."
- 2-NEPTUNE-VehicleJourneyAtStop-4: "adéquation des horaires de la course à la mission."
- 2-NEPTUNE-Facility-1: "Existence de l'arrêt <StopArea> référencé par l'équipement <Facility>."
- 2-NEPTUNE-Facility-2: "Existence de l'arrêt <StopArea> référencé par l'équipement <Facility>."
- 2-NEPTUNE-Facility-3: "Existence de la ligne <Line> référencée par l'équipement <Facility>."
- 2-NEPTUNE-Facility-4: "Existence de la correspondance <ConnectionLink> référencée par l'équipement <Facility>."
- 2-NEPTUNE-Facility-5: "Existence de l'arrêt <StopPoint> référencé par l'équipement <Facility>."
- 2-NEPTUNE-Facility-6: "Vérification du modèle de projection de référence utilisé."
-
- ## GTFS
- 1-GTFS-CSV-1: "Contrôle de la lecture du fichier"
- 1-GTFS-CSV-2: "Contrôle de la syntaxe d'une ligne"
- 1-GTFS-CSV-3: "Contrôle de la syntaxe des entêtes"
- 1-GTFS-CSV-4: "Contrôle de la non présence de doublons dans les entêtes"
- 1-GTFS-CSV-5: "Contrôle de la syntaxe CSV GTFS du fichier"
- 1-GTFS-CSV-6: "Contrôle de la non présence de balise HTML"
- 1-GTFS-CSV-7: "Contrôle de la non présence d'espace en début ou fin de colonne"
-
- 1-GTFS-Common-1: "Contrôle de la présence des fichiers obligatoires"
- 1-GTFS-Common-2: "Contrôle de la présence des fichiers calendar ou calendar_dates"
- 1-GTFS-Common-3: "Contrôle de la présence des fichiers optionnels"
- 1-GTFS-Common-4: "Contrôle de la présence des fichiers non traités"
-
- 1-GTFS-Common-5: "Contrôle de la présence de données dans les fichiers obligatoires"
- 1-GTFS-Common-6: "Contrôle de la présence de données dans les fichiers calendar ou calendar_dates"
- 1-GTFS-Common-7: "Contrôle de la présence de données dans les fichiers optionnels"
-
- 1-GTFS-Common-8: "Contrôle de l'unicité des identifiants"
- 1-GTFS-Common-9: "Contrôle de la présence des colonnes obligatoires"
- 1-GTFS-Common-10: "Contrôle de la présence des colonnes qui devraient être obligatoires "
- 1-GTFS-Common-11: "Contrôle de la présence de colonnes non traités"
-
- 1-GTFS-Common-12: "Contrôle de la présence des données obligatoires"
- 1-GTFS-Common-13: "Contrôle de la présence de la colonne agency_id si plusieurs agences sont définies"
- 1-GTFS-Common-14: "Contrôle de la présence de la colonne agency_id même si une seule agence est définie"
- 1-GTFS-Common-15: "Contrôle de la présence d'une donnée sur valeur d'une autre"
-
- 1-GTFS-Common-16: "Contrôle du type des données"
-
- 1-GTFS-Route-1: "Contrôle de la présence des colonnes obligatoires conditionnelles"
- 1-GTFS-Route-2: "Contrôle de la présence de données dans route_long_name ou route_short_name"
-
- 1-GTFS-Calendar-1: "Contrôle de la présence d'au moins un jour d'application "
- 1-GTFS-Calendar-2: "Contrôle de la chronologie des dates de début et fin de période"
-
- 2-GTFS-Common-1: "Contrôle de la présence des objets référencés"
- 2-GTFS-Common-2: "Contrôle de l'utilité des objets"
- 2-GTFS-Common-3: "Contrôle de l'unicité d'un couple de données"
- 2-GTFS-Common-4: "Contrôle de la non redondance de valeurs"
- 2-GTFS-Stop-1: "Contrôle du type du parent_station"
- 2-GTFS-Stop-2: "Contrôle de l'utilité de la colonne location_type"
- 2-GTFS-Stop-3: "Contrôle de l'unicité de désignation (stop_name,stop_desc)"
- 2-GTFS-Stop-4: "Contrôle de la non présence de station dans des stations"
- 2-GTFS-Route-1: "Contrôle de la différence entre route_short_name et route_long_name"
- 2-GTFS-Route-2: "Contrôle de la non inclusion de route_short_name dans route_long_name"
- 2-GTFS-Route-3: "Contrôle du contraste des couleurs"
- 2-GTFS-Route-4: "Contrôle de la non présence d'une route inversant les valeurs route_short_name et route_long_name d'une autre"
-
- ## COMMON
- 3-StopArea-1: "Vérification de la géolocalisation de tous les arrêts hors ITL"
- 3-StopArea-2: "Vérification que 2 arrêts de noms différents en dehors d'un même regroupement d'arrêts ne sont pas trop proches"
- 3-StopArea-3: "Vérification de l'unicité des arrêts"
- 3-StopArea-4: "Vérification de la géolocalisation des arrêts"
- 3-StopArea-5: "Vérification de la position relative des arrêts et de leur parent"
- 3-AccessPoint-1: "Vérification de la géolocalisation de tous les accès"
- 3-AccessPoint-2: "Vérification que deux accès de nom différents ne sont pas trop proches"
- 3-AccessPoint-3: "Vérification de la proximité entre les accès et leur arrêt de rattachement"
- 3-ConnectionLink-1: "Vérification de la proximité entre les deux arrêts d'une correspondance"
- 3-ConnectionLink-2: "Vérification de la cohérence entre la distance fournie sur la correspondance et la distance géographique entre les deux arrêts de la correspondance"
- 3-ConnectionLink-3: "Vérification de la vitesse de parcours entre les deux arrêts d'une correspondance"
- 3-AccessLink-1: "Vérification de la proximité entre les deux extrémités d'un lien d'accès"
- 3-AccessLink-2: "Vérification de la cohérence entre la distance fournie sur le lien d'accès et la distance géographique entre les deux extrémités du lien d'accès"
- 3-AccessLink-3: "Vérification de la vitesse de parcours entre les deux extrémités d'un lien d'accès"
- 3-Line-1: "Vérification de la non homonymie des lignes"
- 3-Line-2: "Vérification de la présence de séquences d'arrêts sur la ligne"
- 3-Route-1: "Vérification de la succession des arrêts de la séquence"
- 3-Route-2: "Vérification de la séquence inverse"
- 3-Route-3: "Vérification de la distance entre deux arrêts successifs de la séquence"
- 3-Route-4: "Vérification de double définition de séquences"
- 3-Route-5: "Vérification de séquences sans séquence opposée"
- 3-Route-6: "Vérification de la présence d'arrêts dans la séquence"
- 3-Route-7: "Vérification de la présence de missions"
- 3-Route-8: "Vérification de l'utilisation des arrêts par les missions"
- 3-Route-9: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence"
- 3-JourneyPattern-1: "Vérification de double définition de missions"
- 3-JourneyPattern-2: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence"
- 3-JourneyPattern-3: "Vérification de double définition de missions"
- 3-VehicleJourney-1: "Vérification de la chronologie des horaires de passage à un arrêt"
- 3-VehicleJourney-2: "Vérification de la vitesse de transfert entre deux arrêts"
- 3-VehicleJourney-3: "Vérification de la cohérence des courses successives desservant deux mêmes arrêts"
- 3-VehicleJourney-4: "Vérification de l'affectation des courses à un calendrier"
- 3-Facility-1: "Vérification de la géolocalisation de tous les accès"
- 3-Facility-2: "Vérification de la proximité entre les équipements et leur arrêt de rattachement"
- 4-Network-1: "Vérification de contraintes sur les attributs des réseaux"
- 4-Company-1: "Vérification de contraintes sur les attributs des transporteurs"
- 4-GroupOfLine-1: "Vérification de contraintes sur les attributs des groupes de lignes"
- 4-StopArea-1: "Vérification de contraintes sur les attributs des arrêts"
- 4-StopArea-2: "Vérification de l'existance d'un arrêt commercial pour les arrêts physiques"
- 4-StopArea-3: "Vérification de la cohérence entre les noms de communes et leur code INSEE"
- 4-AccessPoint-1: "Vérification de contraintes sur les attributs des accès"
- 4-AccessLink-1: "Vérification de contraintes sur les attributs des liens d'accès"
- 4-ConnectionLink-1: "Vérification de contraintes sur les attributs des correspondances"
- 4-ConnectionLink-2: "Vérification des type d'arrêts en correspondance"
- 4-Timetable-1: "Vérification de contraintes sur les attributs des calendiers"
- 4-Line-1: "Vérification de contraintes sur les attributs des lignes"
- 4-Line-2: "Vérification des modes de transport des lignes"
- 4-Line-3: "Vérification des groupes de lignes d'une ligne"
- 4-Line-4: "Vérification des séquences d'arrêts d'une ligne"
- 4-Route-1: "Vérification de contraintes sur les attributs des séquences d'arrêt"
- 4-JourneyPattern-1: "Vérification de contraintes sur les attributs des missions"
- 4-VehicleJourney-1: "Vérification de contraintes sur les attributs des courses"
- 4-VehicleJourney-2: "Vérification des modes de transport des courses"
- severity: "Severity"
- status: "Status"
- rule_level: "Level"
- rule_target: "Object"
- rule_number: "Step"
- rule_code: "Code"
- violation_count: "errors"
- violation_count_txt: "Number of errors"
- objects: "Objects in violations"
- detail: "Detail"
- title: "Test title"
- object: "Error object"
- resource: "Resources of the error object"
- url: "URL"
- first_violations: "First violations"
+
diff --git a/config/locales/compliance_check_results.fr.yml b/config/locales/compliance_check_results.fr.yml
index 19f436582..b3ddc53f2 100644
--- a/config/locales/compliance_check_results.fr.yml
+++ b/config/locales/compliance_check_results.fr.yml
@@ -1,457 +1,3 @@
fr:
compliance_check_results:
- errors: 'Erreurs'
- file:
- zip_name_prefix: "resultats_de_validation"
- summary_errors_file_prefix: "sommaire_des_tests.csv"
- detailed_errors_file_prefix: "details_des_erreurs.csv"
- index:
- line: "Li"
- column: "Col"
- in_progress: "Validation en cours..."
- compliance_check_result:
- severities:
- error: "Obligatoires"
- warning: "Optionnels"
- error_txt: "Obligatoire"
- warning_txt: "Optionnel"
- statuses:
- nok: "Erreur"
- uncheck: "Absent"
- ok: "Succès"
- details:
- #### level 1
- ## NEPTUNE
- detail_1_neptune_xml_1: "%{source_label} : %{error_value}"
- detail_1_neptune_xml_2: "%{source_label} : %{error_value}"
-
- ## GTFS
- detail_1_gtfs_csv_1: "le fichier %{filename} est inexploitable"
- detail_1_gtfs_csv_2: "le fichier %{filename} est inexploitable"
- detail_1_gtfs_csv_3: "le fichier %{filename} contient un entête vide"
- detail_1_gtfs_csv_4: "le fichier %{filename} contient des entêtes en double"
- detail_1_gtfs_csv_5: "la ligne du fichier %{filename} ne respecte pas la syntaxe CSV"
- detail_1_gtfs_csv_6: "le fichier %{filename} contient des balises HTML"
- detail_1_gtfs_csv_7: "la valeur '%{error_value}' du champ %{reference_value} contient des espaces aux extrémités"
-
- detail_1_gtfs_common_1: "le fichier %{filename} est obligatoire"
- detail_1_gtfs_common_2: "l'un des fichiers calendar.txt ou calendar_dates.txt est obligatoire"
- detail_1_gtfs_common_3: "le fichier %{filename} optionnel n'est pas présent"
- detail_1_gtfs_common_4: "le fichier %{filename} n'est pas traité"
- detail_1_gtfs_common_5: "le fichier %{filename} obligatoire doit définir au moins une entrée"
- detail_1_gtfs_common_6: "l'un des deux fichiers calendar.txt ou calendar_dates.txt doit définir au moins une entrée"
- detail_1_gtfs_common_7: "le fichier %{filename} optionnel ne contient aucune entrée"
- detail_1_gtfs_common_8: "la valeur %{error_value} est définie plusieurs fois pour la colonne %{reference_value}"
- detail_1_gtfs_common_9: "la colonne %{error_value} est obligatoire"
- detail_1_gtfs_common_10: "la colonne agency_id devrait être présente dans le fichier %{filename}"
- detail_1_gtfs_common_11: "la colonne %{error_value} n'est pas exploitée dans le fichier %{filename}"
- detail_1_gtfs_common_12: "la valeur de la colonne %{error_value} n'est pas renseignée"
- detail_1_gtfs_common_13: "la colonne agency_id doit être présente dans le fichier %{filename}"
- detail_1_gtfs_common_14: "la colonne agency_id est absente dans le fichier %{filename}"
- detail_1_gtfs_common_15_1: "la valeur arrival_time est obligatoire en présence d'une valeur pour departure_time"
- detail_1_gtfs_common_15_2: "la valeur departure_time est obligatoire en présence d'une valeur pour arrival_time"
- detail_1_gtfs_common_15_3: "la valeur min_transfer_time est obligatoire quand transfer_type=2"
- detail_1_gtfs_common_16: "la valeur %{error_value} n'est pas autorisée pour le champs %{reference_value} "
-
- detail_1_gtfs_route_1: "les champs route_long_name et route_short_name ne sont pas définies"
- detail_1_gtfs_route_2: "les valeurs des champs route_long_name et route_short_name ne sont pas renseignées"
-
- detail_1_gtfs_calendar_1: "aucun jour d'application n'est activé"
- detail_1_gtfs_calendar_2: "la date de fin du calendrier est antérieur ou égale à la date début"
-
- #### level 2
- ## NEPTUNE
- detail_2_neptune_common_1: "L'élément %{source_objectid} a des attributs qui diffèrent entre les différents fichiers qui le définissent"
- detail_2_neptune_common_2: "L'élément %{source_objectid} partage l'attribut RegistrationNumber = %{error_value} avec un autre objet de même type"
- detail_2_neptune_network_1: "La ligne %{source_objectid} est absente de la liste des lignes du réseau %{target_0_objectid}"
- detail_2_neptune_network_2: "Le réseau %{source_objectid} a un type de source non validee : %{error_value}, remplacé par %{reference_value}"
- detail_2_neptune_groupofline_1: "La ligne %{source_objectid} est absente de la liste des lignes du du groupe de lignes %{target_0_objectid}"
- detail_2_neptune_stoparea_1: "Le fils (contains = %{error_value}) de l'arrêt %{source_objectid} n'est pas de type StopArea ni StopPoint"
- detail_2_neptune_stoparea_2: "L'arrêt %{source_objectid} de type %{reference_value} ne peut contenir que des arrêts de type StopPlace ou CommercialStopPoint, or un des arrêts contenus (contains = %{target_0_objectid}) est de type %{error_value}"
- detail_2_neptune_stoparea_3: "L'arrêt %{source_objectid} de type %{reference_value} ne peut contenir que des arrêts de type BoardingPosition ou Quay, or un des arrêts contenus (contains = %{target_0_objectid}) est de type %{error_value}"
- detail_2_neptune_stoparea_4: "L'arrêt %{source_objectid} de type %{reference_value} ne peut contenir que des points d'arrêt de séquence, or un des arrêts contenus (contains = %{target_0_objectid}) est un StopArea arrêt de type %{error_value}"
- detail_2_neptune_stoparea_5: "L'arrêt %{source_objectid} référence une position géographique (centroidOfArea = %{error_value}) inexistante"
- detail_2_neptune_stoparea_6: "L'arrêt %{source_objectid} référence une position géographique (centroidOfArea = %{target_0_objectid}) qui ne le référence pas en retour (containedIn = %{error_value})"
- detail_2_neptune_itl_1: "Le fils (contains = %{target_0_objectid}) de type %{error_value} ne peut pas être contenu dans l'arrêt %{source_objectid} de type %{reference_value}"
- detail_2_neptune_itl_2: "L'arrêt de type ITL %{source_objectid} n'est pas utilisé"
- detail_2_neptune_itl_3: "L'arrêt areaId = %{error_value} référencé par l'ITL %{source_objectid} n'existe pas"
- detail_2_neptune_itl_4: "L'arrêt areaId = %{target_0_objectid} référencé par l'ITL %{source_objectid} devrait être de type ITL et non de type %{error_value}"
- detail_2_neptune_itl_5: "La référence lineIdShortCut = %{error_value} de l'ITL %{source_objectid} n'est pas cohérente avec la ligne %{target_0_objectid}"
- detail_2_neptune_areacentroid_1: "La position géographique <AreaCentroid> %{source_objectid} référence un arrêt (containedIn = %{error_value}) inexistant"
- detail_2_neptune_areacentroid_2: "La position géographique <AreaCentroid> %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- detail_2_neptune_connectionlink_1: "La correspondance %{source_objectid} référence 2 arrêts inexistants"
- detail_2_neptune_accesspoint_1: "L'accès %{source_objectid} référence un arrêt parent (containedIn = %{error_value}) inexistant"
- detail_2_neptune_accesspoint_2: "L'accès %{source_objectid} référence un arrêt parent (containedIn = %{target_0_objectid}) de type invalide (ITL)"
- detail_2_neptune_accesspoint_3: "L'accès %{source_objectid} n'a pas de lien d'accès"
- detail_2_neptune_accesspoint_4: "L'accès %{source_objectid} de type In a des liens d'accès sortants"
- detail_2_neptune_accesspoint_5: "L'accès %{source_objectid} de type Out a des liens d'accès entrants"
- detail_2_neptune_accesspoint_6: "L'accès %{source_objectid} de type InOut n'a que des liens d'accès entrants ou sortants"
- detail_2_neptune_accesspoint_7: "L'accès %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- detail_2_neptune_accesslink_1: "La liaison d'accès %{source_objectid} référence %{error_value} qui n'existe pas"
- detail_2_neptune_accesslink_2: "Sur la liaison d'accès %{source_objectid}, les références startOfLink = %{error_value} et endOfLink = %{reference_value} sont de même type"
- detail_2_neptune_line_1: "La ligne %{source_objectid} référence un réseau (ptNetworkIdShortcut = %{error_value} inexistant"
- detail_2_neptune_line_2: "La ligne %{source_objectid} référence un point d'arrêt <StopPoint> (lineEnd = %{error_value}) inexistant "
- detail_2_neptune_line_3: "La ligne %{source_objectid} référence un point d'arrêt (lineEnd = %{error_value}) qui n'est pas terminus d'une séquence d'arrêts"
- detail_2_neptune_line_4: "La ligne %{source_objectid} référence une séquence d'arrêt (routeId = %{error_value}) inexistante"
- detail_2_neptune_line_5: "La séquence d'arrêts (routeId = %{target_0_objectid}) n'est pas référencée par la ligne %{source_objectid}"
- detail_2_neptune_line_6: "La ligne %{source_objectid} ne renseigne aucun des champs name, number ou publishedName"
- detail_2_neptune_route_1: "La séquence d'arrêts %{source_objectid} référence une mission (journeyPatternId = %{error_value}) inexistante"
- detail_2_neptune_route_2: "La séquence d'arrêts %{source_objectid} référence un tronçon (ptLinkId = %{error_value}) inexistant"
- detail_2_neptune_route_3: "La séquence retour (waybackRouteId = %{error_value}) de la séquence d'arrêts %{source_objectid} n'existe pas"
- detail_2_neptune_route_4: "Le tronçon (ptLinkId = %{error_value}) référencé par la séquence d'arrêt %{source_objectid} est partagé avec %{target_0_objectid}"
- detail_2_neptune_route_5: "Le tronçon %{source_objectid} partage un %{reference_value} : %{error_value} avec un autre tronçon"
- detail_2_neptune_route_6_1: "La séquence d'arrêts %{source_objectid} n'est pas une séquence linéaire, le chainage des tronçons forme un anneau"
- detail_2_neptune_route_6_2: "La séquence d'arrêts %{source_objectid} n'est pas une séquence linéaire, le chainage des tronçons est rompu au tronçon %{target_0_objectid}"
- detail_2_neptune_route_7: "La séquence d'arrêts %{source_objectid} ne référence pas la mission %{target_0_objectid} alors que cette mission référence la séquence d'arrêt"
- detail_2_neptune_route_8: "La mission journeyPatternId = %{target_0_objectid} de la séquence d'arrêts %{source_objectid} utilise des points d'arrêts hors séquence"
- detail_2_neptune_route_9: "Le point d'arrêt (stopPointId = %{target_0_objectid}) de la séquence d'arrêts %{source_objectid} n'est utilisé dans aucune mission"
- detail_2_neptune_route_10: "La séquence retour (waybackRouteId = %{target_0_objectid}) ne référence pas la séquence d'arrêts %{source_objectid} comme retour"
- detail_2_neptune_route_11: "Le sens (%{reference_value}) de la séquence d'arrêt %{source_objectid} n'est pas compatible avec celui (%{error_value}) de la séquence opposée %{target_0_objectid}"
- detail_2_neptune_route_12: "Le départ dans la zone %{reference_value}) de la séquence d'arrêts %{source_objectid} n'est pas dans la même zone que l'arrivée (zone %{error_value} de la séquence retour %{target_0_objectid}"
- detail_2_neptune_ptlink_1: "Le tronçon %{source_objectid} reférence un %{reference_value} = %{error_value} inexistant"
- detail_2_neptune_journeypattern_1: "La mission %{source_objectid} référence une séquence d'arrêts (routeId = %{error_value}) inexistante"
- detail_2_neptune_journeypattern_2: "La mission %{source_objectid} référence un point d'arrêt (stopPointId = %{error_value}) inexistant"
- detail_2_neptune_journeypattern_3: "La mission %{source_objectid} référence une ligne (lineIdShortcut = %{error_value}) inexistante"
- detail_2_neptune_stoppoint_1: "Le point d'arrêt %{source_objectid} référence une ligne (lineIdShortcut = %{error_value}) inexistante"
- detail_2_neptune_stoppoint_2: "Le point d'arrêt %{source_objectid} référence un réseau (ptNetworkIdShortcut = %{error_value}) inexistant"
- detail_2_neptune_stoppoint_3: "Le point d'arrêt %{source_objectid} référence un arrêt (containedIn = %{error_value}) inexistant"
- detail_2_neptune_stoppoint_4: "Le point d'arrêt %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- detail_2_neptune_timetable_1: "Le calendrier (<Timetable>) %{source_objectid} ne référence aucune course existante"
- detail_2_neptune_timetable_2: "La course %{source_objectid} n'est référencée dans aucun calendrier (<Timetable>)"
- detail_2_neptune_timetable_3: "Le calendrier (<Timetable>) %{source_objectid} contient une période invalide"
- detail_2_neptune_vehiclejourney_1: "La course %{source_objectid} référence une séquence d'arrêts (routeId = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_2: "La course %{source_objectid} référence une mission (journeyPatternId = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_3: "La course %{source_objectid} référence une ligne (lineIdShortcut = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_4: "La course %{source_objectid} référence un opérateur (operatorId = %{error_value}) inexistant"
- detail_2_neptune_vehiclejourney_5: "La course %{source_objectid} référence une fréquence horaire (timeSlotId = %{error_value}) inexistante"
- detail_2_neptune_vehiclejourney_6: "La course %{source_objectid} référence une mission %{error_value} incompatible de la séquence d'arrêts %{reference_value}"
- detail_2_neptune_vehiclejourney_7: "La mission %{source_objectid} n'est référencée par aucune course"
- detail_2_neptune_vehiclejourney_8: "La course %{source_objectid} doit référencer une mission si la séquence d'arrêt en possède plusieurs"
- detail_2_neptune_vehiclejourneyatstop_1: "La course %{source_objectid} fournit un horaire sur un point d'arrêt (stopPointId = %{error_value}) inexistant"
- detail_2_neptune_vehiclejourneyatstop_2: "Un horaire de la course %{source_objectid} référence une autre course : vehicleJourneyId = %{error_value}"
- detail_2_neptune_vehiclejourneyatstop_3: "La course %{source_objectid} ne fournit pas les horaires des points d'arrêts selon l'ordre de la séquence d'arrêts %{error_value}"
- detail_2_neptune_vehiclejourneyatstop_4: "La course %{source_objectid} ne fournit pas les horaires des points d'arrêts de sa mission %{error_value}"
- detail_2_neptune_facility_1: "L'équipement %{source_objectid} est situé sur un arrêt inexistant (containedId = %{error_value})"
- detail_2_neptune_facility_2: "L'équipement %{source_objectid} référence un arrêt (stopAreaId = %{error_value}) inexistant"
- detail_2_neptune_facility_3: "L'équipement %{source_objectid} référence une ligne (lineId = %{error_value} inexistante"
- detail_2_neptune_facility_4: "L'équipement %{source_objectid} référence une correspondance (connectionLinkId = %{error_value} inexistante"
- detail_2_neptune_facility_5: "L'équipement %{source_objectid} référence un point d'arrêt (stopPointId = %{error_value} inexistant"
- detail_2_neptune_facility_6: "L'équipement %{source_objectid} utilise un référentiel géographique (longLatType = %{error_value}) invalide"
- ## GTFS
- detail_2_gtfs_common_1: "Identifiant %{reference_value} inconnu : %{error_value}"
- detail_2_gtfs_common_2: "Identifiant %{reference_value} non référencé : %{error_value}"
- detail_2_gtfs_common_3: "Le couple de champs (%{reference_value}) est en doublon (%{error_value}): "
- detail_2_gtfs_common_4: "Les valeurs des champs (%{reference_value}) sont identiques : '%{error_value}'"
- detail_2_gtfs_stop_1: "L'arrêt (%{source_objectid}) ne peut appartenir à un parent de type %{error_value}"
- detail_2_gtfs_stop_2: "La colonne location_type n'est pas renseignée"
- detail_2_gtfs_stop_3: "Le nom et la description de l'arrêt (%{source_objectid}) sont identiques : '%{error_value}'"
- detail_2_gtfs_stop_4: "L'arrêt (%{source_objectid}) de type station ne peut appartenir à une autre station (%{error_value})"
- detail_2_gtfs_route_1: "La route (%{source_objectid}) a la même valeur (%{error_value}) pour route_short_name et route_long_name"
- detail_2_gtfs_route_2: "La route (%{source_objectid}) réutilise la valeur de route_short_name (%{error_value}) dans route_long_name (%{reference_value})"
- detail_2_gtfs_route_3: "les couleurs de la route (%{source_objectid}) ne sont pas contrastées"
- detail_2_gtfs_route_4: "La route (%{source_objectid}) utilise les valeurs (route_short_name,route_long_name) de la route (%{error_value}) "
-
- #### level 3
- detail_3_stoparea_1: "L'arrêt %{source_label} (%{source_objectid}) n'est pas géolocalisé"
- detail_3_stoparea_2: "L'arrêt %{source_label} (%{source_objectid}) est localisé trop près de l'arrêt %{target_0_label} (%{target_0_objectid}) : distance %{error_value} < %{reference_value}"
- detail_3_stoparea_3: "Les arrêts %{source_label} (%{source_objectid} et %{target_0_objectid}) sont desservis par les mêmes lignes"
- detail_3_stoparea_4: "L'arrêt %{source_label} (%{source_objectid}) est en dehors du périmètre de contrôle"
- detail_3_stoparea_5: "L'arrêt %{source_label} (%{source_objectid}) est localisé trop loin de son parent %{target_0_label} (%{target_0_objectid}) : distance %{error_value} > %{reference_value}"
- detail_3_accesspoint_1: "L'accès %{source_label} (%{source_objectid}) n'est pas géolocalisé"
- detail_3_accesspoint_2: "L'accès %{source_label} (%{source_objectid}) est localisé trop près de l'accès %{target_0_label} (%{target_0_objectid}) : distance %{error_value} < %{reference_value}"
- detail_3_accesspoint_3: "L'accès %{source_label} (%{source_objectid}) est localisé trop loin de son parent %{target_0_label} (%{target_0_objectid}) : distance %{error_value} > %{reference_value}"
- detail_3_connectionlink_1: "Sur la correspondance %{source_label} (%{source_objectid}), la distance entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) est trop grande : distance %{error_value} > %{reference_value}"
- detail_3_connectionlink_2: "Sur la correspondance %{source_label} (%{source_objectid}), la distance entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) : %{error_value} est supérieure à la longueur du lien : %{reference_value}"
- detail_3_connectionlink_3_1: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse par défaut %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_connectionlink_3_2: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse pour un voyageur occasionnel %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_connectionlink_3_3: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse pour un voyageur habitué %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_connectionlink_3_4: "Sur la correspondance %{source_label} (%{source_objectid}), la vitesse pour un voyageur à mobilité réduite %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_1: "Sur le lien d'accès %{source_label} (%{source_objectid}), la distance entre l'arrêt %{target_0_label} (%{target_0_objectid}) et l'accès %{target_1_label} (%{target_1_objectid}) est trop grande : distance %{error_value} > %{reference_value}"
- detail_3_accesslink_2: "Sur le lien d'accès %{source_label} (%{source_objectid}), la distance entre l'arrêt %{target_0_label} (%{target_0_objectid}) et l'accès %{target_1_label} (%{target_1_objectid}) : %{error_value} est supérieure à la longueur du lien : %{reference_value}"
- detail_3_accesslink_3_1: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse par défaut %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_3_2: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse pour un voyageur occasionnel %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_3_3: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse pour un voyageur habitué %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_accesslink_3_4: "Sur le lien d'accès %{source_label} (%{source_objectid}), la vitesse pour un voyageur à mobilité réduite %{error_value} est supérieure à %{reference_value} km/h"
- detail_3_line_1: "La ligne %{source_label} (%{source_objectid}) a une ligne homonyme sur le même réseau %{target_0_label} (%{target_0_objectid})"
- detail_3_line_2: "La ligne %{source_label} (%{source_objectid}) n'a pas de séquence d'arrêts"
- detail_3_route_1: "Sur la séquence d'arrêt %{source_label} (%{source_objectid}), l'arrêt %{target_0_label} (%{target_0_objectid}) est desservi 2 fois consécutivement"
- detail_3_route_2: "Les terminus de la séquence d'arrêt %{source_label} (%{source_objectid}) ne sont pas cohérent avec ceux de sa séquence opposée : l'une part de %{target_0_label} (%{target_0_objectid}) et l'autre arrive à %{target_1_label} (%{target_1_objectid})"
- detail_3_route_3_1: "Sur la séquence d'arrêt %{source_label} (%{source_objectid}), entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}), distance %{error_value} < %{reference_value} "
- detail_3_route_3_2: "Sur la séquence d'arrêt %{source_label} (%{source_objectid}), entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}), distance %{error_value} > %{reference_value} "
- detail_3_route_4: "La séquence d'arrêt %{source_label} (%{source_objectid}) utilise la même liste ordonnée d'arrêts que la séquence d'arrêts %{target_0_label} (%{target_0_objectid})"
- detail_3_route_5: "La séquence d'arrêt %{source_label} (%{source_objectid}) peut admettre la séquence %{target_0_label} (%{target_0_objectid}) comme séquence opposée"
- detail_3_route_6: "La séquence d'arrêt %{source_label} (%{source_objectid}) doit avoir un minimum de 2 arrêts"
- detail_3_route_7: "La séquence d'arrêt %{source_label} (%{source_objectid}) n'a pas de mission"
- detail_3_route_8: "La séquence d'arrêt %{source_label} (%{source_objectid}) a %{error_value} arrêts non utilisés par des missions"
- detail_3_route_9: "La séquence d'arrêt %{source_label} (%{source_objectid}) n'a pas de mission desservant l'ensemble de ses arrêts"
- detail_3_journeypattern_1: "La mission %{source_label} (%{source_objectid}) utilise les mêmes arrêts que la mission %{target_0_label} (%{target_0_objectid}) - nombre d'arrêts = %{error_value}"
- detail_3_vehiclejourney_1: "Arrêt %{target_0_label} (%{target_0_objectid}) : durée d'arrêt mesurée %{error_value} > %{reference_value}"
- detail_3_vehiclejourney_2_1: "La course %{source_label} (%{source_objectid}) a des horaires décroissants entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
- detail_3_vehiclejourney_2_2: "La course %{source_label} (%{source_objectid}) a une vitesse %{error_value} < %{reference_value} km/h entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
- detail_3_vehiclejourney_2_3: "La course %{source_label} (%{source_objectid}) a une vitesse %{error_value} > %{reference_value} km/h entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
- detail_3_vehiclejourney_3: "La course %{source_label} (%{source_objectid}) a une variation de progression entre les arrêts %{target_1_label} (%{target_1_objectid}) et %{target_2_label} (%{target_2_objectid}) %{error_value} > %{reference_value} avec la course %{target_0_label} (%{target_0_objectid})"
- detail_3_vehiclejourney_4: "La course %{source_label} (%{source_objectid}) n'a pas de calendrier d'application"
- detail_3_facility_1: "L'équipement %{source_label} (%{source_objectid}) n'est pas géolocalisé"
- detail_3_facility_2: "L'équipement %{source_label} (%{source_objectid}) est localisé trop loin de son parent %{areaName} (%{areaId}) : distance %{error_value} > %{reference_value}"
-
- detail_4_network_1_min_size: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value}) "
- detail_4_network_1_max_size: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_network_1_pattern: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_network_1_unique: "L'attribut %{reference_value} du réseau %{source_label} (%{source_objectid}) a une valeur partagée avec le réseau %{target_0_label} (%{target_0_objectid})"
- detail_4_company_1_min_size: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_company_1_max_size: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_company_1_pattern: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_company_1_unique: "L'attribut %{reference_value} du transporteur %{source_label} (%{source_objectid}) a une valeur partagée avec le transporteur %{target_0_label} (%{target_0_objectid})"
- detail_4_groupofline_1_min_size: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_groupofline_1_max_size: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_groupofline_1_pattern: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_groupofline_1_unique: "L'attribut %{reference_value} du groupe de lignes %{source_label} (%{source_objectid}) a une valeur partagée avec le groupe de lignes %{target_0_label} (%{target_0_objectid})"
- detail_4_stoparea_1_min_size: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_stoparea_1_max_size: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_stoparea_1_pattern: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_stoparea_1_unique: "L'attribut %{reference_value} de l'arrêt %{source_label} (%{source_objectid}) a une valeur partagée avec l'arrêt %{target_0_label} (%{target_0_objectid})"
- detail_4_stoparea_2: "L'arrêt physique %{source_label} (%{source_objectid}) n'a pas de parent"
- detail_4_accesspoint_1_min_size: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_accesspoint_1_max_size: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_accesspoint_1_pattern: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_accesspoint_1_unique: "L'attribut %{reference_value} du point d'accès %{source_label} (%{source_objectid}) a une valeur partagée avec le point d'accès %{target_0_label} (%{target_0_objectid})"
- detail_4_accesslink_1_min_size: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_accesslink_1_max_size: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_accesslink_1_pattern: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_accesslink_1_unique: "L'attribut %{reference_value} du lien d'accès %{source_label} (%{source_objectid}) a une valeur partagée avec le lien d'accès %{target_0_label} (%{target_0_objectid})"
- detail_4_connectionlink_1_min_size: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_connectionlink_1_max_size: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_connectionlink_1_pattern: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_connectionlink_1_unique: "L'attribut %{reference_value} de la correspondance %{source_label} (%{source_objectid}) a une valeur partagée avec la correspondance %{target_0_label} (%{target_0_objectid})"
- detail_4_connectionlink_2: "Sur la correspondance %{source_label} (%{source_objectid}) au moins l'un des arrêts %{startName} (%{startId}) et %{endName} (%{endId}) n'est pas un arrêt physique"
- detail_4_timetable_1_min_size: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_timetable_1_max_size: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_timetable_1_pattern: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_timetable_1_unique: "L'attribut %{reference_value} du calendrier %{source_label} (%{source_objectid}) a une valeur partagée avec le calendrier %{target_0_label} (%{target_0_objectid})"
- detail_4_line_1_min_size: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_line_1_max_size: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_line_1_pattern: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_line_1_unique: "L'attribut %{reference_value} de la ligne %{source_label} (%{source_objectid}) a une valeur partagée avec la ligne %{target_0_label} (%{target_0_objectid})"
- detail_4_line_2: "La ligne %{source_label} (%{source_objectid}) a un mode de transport interdit %{error_value}"
- detail_4_line_3_1: "La ligne %{source_label} (%{source_objectid}) n'a pas de groupe de lignes"
- detail_4_line_3_2: "La ligne %{source_label} (%{source_objectid}) a plusieurs groupes de lignes"
- detail_4_line_4_1: "La ligne %{source_label} (%{source_objectid}) n'a pas de séquence d'arrêts"
- detail_4_line_4_2: "La ligne %{source_label} (%{source_objectid}) a trop de séquences d'arrêts non associées (%{error_value})"
- detail_4_route_1_min_size: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_route_1_max_size: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_route_1_pattern: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_route_1_unique: "L'attribut %{reference_value} de la séquence d'arrêts %{source_label} (%{source_objectid}) a une valeur partagée avec la séquence d'arrêts %{target_0_label} (%{target_0_objectid})"
- detail_4_journeypattern_1_min_size: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_journeypattern_1_max_size: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_journeypattern_1_pattern: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_journeypattern_1_unique: "L'attribut %{reference_value} de la mission %{source_label} (%{source_objectid}) a une valeur partagée avec la mission %{target_0_label} (%{target_0_objectid})"
- detail_4_vehiclejourney_1_min_size: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) n'est pas renseigné ou trop petit (%{error_value})"
- detail_4_vehiclejourney_1_max_size: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) est trop grand (%{error_value})"
- detail_4_vehiclejourney_1_pattern: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) n'est pas au bon format (%{error_value})"
- detail_4_vehiclejourney_1_unique: "L'attribut %{reference_value} de la course %{source_label} (%{source_objectid}) a une valeur partagée avec la course %{target_0_label} (%{target_0_objectid})"
- detail_4_vehiclejourney_2: "La course %{source_label} (%{source_objectid}) a un mode de transport interdit %{error_value}"
- activemodel:
- models:
- compliance_check_result:
- zero: "Validation"
- one: "Validation"
- other: "Validations"
- attributes:
- compliance_check_result:
- ## Neptune
- 1-NEPTUNE-XML-1: "Conformité à la syntaxe XML suivant les recommandations du W3C."
- 1-NEPTUNE-XML-2: "Conformité au schéma défini par la XSD du profil TRIDENT/NEPTUNE."
- 2-NEPTUNE-Common-1: "Unicité des éléments objectId des différents objets d'un lot de fichiers Neptune."
- 2-NEPTUNE-Common-2: "Unicité des éléments regitrationNumber des différents objets d'un lot de fichiers Neptune."
- 2-NEPTUNE-Network-1: "Correcte référence à des lignes <Line> dans version du réseau <PTNetwork>."
- 2-NEPTUNE-Network-2: "Valeur autorisée pour le type de source <SourceType> dans version du réseau <PTNetwork>."
- 2-NEPTUNE-GroupOfLine-1: "Correcte référence à des lignes <Line> dans groupe de lignes <GroupOfLine>."
- 2-NEPTUNE-StopArea-1: "Correcte référence à des arrêts <StopArea> et/ou à des points d'arrêt sur parcours <StopPoint> dans les arrêts <StopArea>."
- 2-NEPTUNE-StopArea-2: "Correcte référence à des arrêts <StopArea> dans les arrêts <StopArea> de type StopPlace."
- 2-NEPTUNE-StopArea-3: "Correcte référence à des arrêts <StopArea> dans les arrêts <StopArea> de type CommercialStopPoint."
- 2-NEPTUNE-StopArea-4: "Correcte référence à des points d'arrêt sur parcours <StopPoint> dans les arrêts <StopArea> de type BoardingPosition ou Quay."
- 2-NEPTUNE-StopArea-5: "Correcte référence à une position géographique <AreaCentroid> dans les arrêts <StopArea> de tout type StopPlace, CommercialStopPoint, BoardingPosition et Quay."
- 2-NEPTUNE-StopArea-6: "référenceréciproque d'une position géographique <AreaCentroid> dans les arrêts <StopArea> de tout type StopPlace, CommercialStopPoint, BoardingPosition et Quay."
- 2-NEPTUNE-ITL-1: "Correcte référence à des arrêts <StopArea> dans les arrêts <StopArea> de type ITL."
- 2-NEPTUNE-ITL-2: "Correcte référence à des arrêts <StopArea> de type ITL dans la classe d’objets <ITL>."
- 2-NEPTUNE-ITL-3: "Correcte référence à des arrêts <StopArea> dans la classe d’objets <ITL>."
- 2-NEPTUNE-ITL-4: "Vérification du type de référence à des arrêts <StopArea> type ITL dans la classe d’objets <ITL>."
- 2-NEPTUNE-ITL-5: "Bonne référence à la ligne <Line> dans la classe d’objets <ITL>."
- 2-NEPTUNE-AreaCentroid-1: "Correcte référence à des arrêts <StopArea> dans la classe d’objets <AreaCentroid>."
- 2-NEPTUNE-AreaCentroid-2: "Vérification du modèle de projection de référence utilisé."
- 2-NEPTUNE-ConnectionLink-1: "Correcte référence aux arrêts <StopArea> définissant des tronçons de correspondance <ConnectionLink>."
- 2-NEPTUNE-AccessPoint-1: "Correcte référence à un arrêt <StopArea> dans les accès <AccessPoint>."
- 2-NEPTUNE-AccessPoint-2: "Correcte référence à un arrêt <StopArea> dans les accès <AccessPoint>."
- 2-NEPTUNE-AccessPoint-3: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint>."
- 2-NEPTUNE-AccessPoint-4: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint> de type 'in'."
- 2-NEPTUNE-AccessPoint-5: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint> sur les accès de type 'out'."
- 2-NEPTUNE-AccessPoint-6: "Existence de liens d'accès <AccessLink> sur les accès <AccessPoint> sur les accès de type 'inout'."
- 2-NEPTUNE-AccessPoint-7: "Vérification du modèle de projection de référence utilisé."
- 2-NEPTUNE-AccessLink-1: "Correcte référence aux arrêts <StopArea> et accès <AccessPoint> définissant des liens d'accès <AccessLink>."
- 2-NEPTUNE-AccessLink-2: "Correcte référence aux arrêts <StopArea> et accès <AccessPoint> définissant des liens d'accès <AccessLink>."
- 2-NEPTUNE-Line-1: "Correcte référence au réseau dans l'objet ligne <Line>."
- 2-NEPTUNE-Line-2: "Correcte référence à un point d'arrêt sur parcours <StopPoint> comme terminus de ligne <Line>."
- 2-NEPTUNE-Line-3: "Correcte référence à un point d'arrêt sur parcours <StopPoint> comme terminus de ligne <Line>."
- 2-NEPTUNE-Line-4: "Correcte référence aux séquences d'arrêts <ChouetteRoute> dans l'objet ligne <Line>."
- 2-NEPTUNE-Line-5: "Correcte référence aux séquences d'arrêts <ChouetteRoute> dans l'objet ligne <Line>."
- 2-NEPTUNE-Line-6: "Présence d'au moins une valeur parmi <name>,<number> ou <publishedName> dans l'objet ligne <Line>."
- 2-NEPTUNE-Route-1: "Existence des missions <JourneyPattern> référencées par la séquence d'arrêt <ChouetteRoute>."
- 2-NEPTUNE-Route-2: "Existence des tronçons commerciaux <PtLink> référencés par la séquence d'arrêt <ChouetteRoute>."
- 2-NEPTUNE-Route-3: "Existence de la séquence opposée <ChouetteRoute> référencée par la séquence d'arrêt <ChouetteRoute>."
- 2-NEPTUNE-Route-4: "Correcte référence à un tronçon commercial <PtLink> dans une séquence d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-5: "Vérification que tous les points d'arrêts sur parcours sont rattachés à une séquence d'arrêts <ChouetteRoute> au départ d'un tronçon commercial <PtLink> et/ou à l'arrivée d'un autre tronçon commercial <PtLink> de la même séquence d'arrêts."
- 2-NEPTUNE-Route-6: "Vérification du correct ordonnancement des points d'arrêts sur parcours <StopPoint> dans le chainage des tronçons <PtLink> d'une séquence d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-7: "référence mutuelle des missions <JourneyPattern> et des séquences d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-8: "Cohérence des références aux points d'arrêt des missions <JourneyPattern> et des séquences d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-9: "Utilité des points d'arrêts sur parcours des séquences d'arrêts <ChouetteRoute>."
- 2-NEPTUNE-Route-10: "référence d'une séquence d'arrêts <ChouetteRoute> à une séquence d'arrêts opposée."
- 2-NEPTUNE-Route-11: "Cohérence des sens de la référence d'une séquence d'arrêts <ChouetteRoute> à une séquence d'arrêts opposée."
- 2-NEPTUNE-Route-12: "Cohérence des terminus de la référence d'une séquence d'arrêts <ChouetteRoute> à une séquence d'arrêts opposée."
- 2-NEPTUNE-PtLink-1: "Existence des arrêts <StopPoint> référencés par les tronçons commerciaux <PTLink>."
- 2-NEPTUNE-JourneyPattern-1: "Existence de la séquence d'arrêt <ChouetteRoute> référencée par la mission <JourneyPattern>."
- 2-NEPTUNE-JourneyPattern-2: "Existence des arrêts <StopPoint> référencés par la mission <JourneyPattern>."
- 2-NEPTUNE-JourneyPattern-3: "Existence de la ligne <Line> référencée par la mission <JourneyPattern>."
- 2-NEPTUNE-StopPoint-1: "Existence de la ligne <Line> référencée par l'arrêt <StopPoint>."
- 2-NEPTUNE-StopPoint-2: "Existence du réseau <PTNetwork> référence par l'arrêt <StopPoint>."
- 2-NEPTUNE-StopPoint-3: "Existence de l'arrêt <StopArea> référencé par l'arrêt <StopPoint>."
- 2-NEPTUNE-StopPoint-4: "Vérification du modèle de projection de référence utilisé."
- 2-NEPTUNE-Timetable-1: "Utilité des calendriers."
- 2-NEPTUNE-Timetable-2: "Utilité des calendriers."
- 2-NEPTUNE-Timetable-3: "Validité des dates de début et de fin des périodes des calendriers"
- 2-NEPTUNE-VehicleJourney-1: "Existence de la séquence d'arrêt <ChouetteRoute> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-2: "Existence de la mission <JourneyPattern> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-3: "Existence de la ligne <Line> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-4: "Existence de l'opérateur <Company> référencé par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-5: "Existence de la tranche horaire <TimeSlot> référencée par la course <VehicleJourney>."
- 2-NEPTUNE-VehicleJourney-6: "Cohérence entre la course, la mission et la séquence d'arrêts."
- 2-NEPTUNE-VehicleJourney-7: "Utilité des missions"
- 2-NEPTUNE-VehicleJourney-8: "Mission implicite"
- 2-NEPTUNE-VehicleJourneyAtStop-1: "Existence de l'arrêt <StopPoint> référencé par l'horaire <VehicleJourneyAtStop>."
- 2-NEPTUNE-VehicleJourneyAtStop-2: "Existence de la course <VehicleJourney> référenceé par l'horaire <VehicleJourneyAtStop>."
- 2-NEPTUNE-VehicleJourneyAtStop-3: "adéquation des horaires de la course à la séquence d'arrêts."
- 2-NEPTUNE-VehicleJourneyAtStop-4: "adéquation des horaires de la course à la mission."
- 2-NEPTUNE-Facility-1: "Existence de l'arrêt <StopArea> référencé par l'équipement <Facility>."
- 2-NEPTUNE-Facility-2: "Existence de l'arrêt <StopArea> référencé par l'équipement <Facility>."
- 2-NEPTUNE-Facility-3: "Existence de la ligne <Line> référencée par l'équipement <Facility>."
- 2-NEPTUNE-Facility-4: "Existence de la correspondance <ConnectionLink> référencée par l'équipement <Facility>."
- 2-NEPTUNE-Facility-5: "Existence de l'arrêt <StopPoint> référencé par l'équipement <Facility>."
- 2-NEPTUNE-Facility-6: "Vérification du modèle de projection de référence utilisé."
-
- ## GTFS
- 1-GTFS-CSV-1: "Contrôle de la lecture du fichier"
- 1-GTFS-CSV-2: "Contrôle de la syntaxe d'une ligne"
- 1-GTFS-CSV-3: "Contrôle de la syntaxe des entêtes"
- 1-GTFS-CSV-4: "Contrôle de la non présence de doublons dans les entêtes"
- 1-GTFS-CSV-5: "Contrôle de la syntaxe CSV GTFS du fichier"
- 1-GTFS-CSV-6: "Contrôle de la non présence de balise HTML"
- 1-GTFS-CSV-7: "Contrôle de la non présence d'espace en début ou fin de colonne"
-
- 1-GTFS-Common-1: "Contrôle de la présence des fichiers obligatoires"
- 1-GTFS-Common-2: "Contrôle de la présence des fichiers calendar ou calendar_dates"
- 1-GTFS-Common-3: "Contrôle de la présence des fichiers optionnels"
- 1-GTFS-Common-4: "Contrôle de la présence des fichiers non traités"
-
- 1-GTFS-Common-5: "Contrôle de la présence de données dans les fichiers obligatoires"
- 1-GTFS-Common-6: "Contrôle de la présence de données dans les fichiers calendar ou calendar_dates"
- 1-GTFS-Common-7: "Contrôle de la présence de données dans les fichiers optionnels"
-
- 1-GTFS-Common-8: "Contrôle de l'unicité des identifiants"
- 1-GTFS-Common-9: "Contrôle de la présence des colonnes obligatoires"
- 1-GTFS-Common-10: "Contrôle de la présence des colonnes qui devraient être obligatoires "
- 1-GTFS-Common-11: "Contrôle de la présence de colonnes non traités"
-
- 1-GTFS-Common-12: "Contrôle de la présence des données obligatoires"
- 1-GTFS-Common-13: "Contrôle de la présence de la colonne agency_id si plusieurs agences sont définies"
- 1-GTFS-Common-14: "Contrôle de la présence de la colonne agency_id même si une seule agence est définie"
- 1-GTFS-Common-15: "Contrôle de la présence d'une donnée sur valeur d'une autre"
-
- 1-GTFS-Common-16: "Contrôle du type des données"
-
- 1-GTFS-Route-1: "Contrôle de la présence des colonnes obligatoires conditionnelles"
- 1-GTFS-Route-2: "Contrôle de la présence de données dans route_long_name ou route_short_name"
-
- 1-GTFS-Calendar-1: "Contrôle de la présence d'au moins un jour d'application "
- 1-GTFS-Calendar-2: "Contrôle de la chronologie des dates de début et fin de période"
-
- 2-GTFS-Common-1: "Contrôle de la présence des objets référencés"
- 2-GTFS-Common-2: "Contrôle de l'utilité des objets"
- 2-GTFS-Common-3: "Contrôle de l'unicité d'un couple de données"
- 2-GTFS-Common-4: "Contrôle de la non redondance de valeurs"
- 2-GTFS-Stop-1: "Contrôle du type du parent_station"
- 2-GTFS-Stop-2: "Contrôle de l'utilité de la colonne location_type"
- 2-GTFS-Stop-3: "Contrôle de l'unicité de désignation (stop_name,stop_desc)"
- 2-GTFS-Stop-4: "Contrôle de la non présence de station dans des stations"
- 2-GTFS-Route-1: "Contrôle de la différence entre route_short_name et route_long_name"
- 2-GTFS-Route-2: "Contrôle de la non inclusion de route_short_name dans route_long_name"
- 2-GTFS-Route-3: "Contrôle du contraste des couleurs"
- 2-GTFS-Route-4: "Contrôle de la non présence d'une route inversant les valeurs route_short_name et route_long_name d'une autre"
-
- ## COMMON
- 3-StopArea-1: "Vérification de la géolocalisation de tous les arrêts hors ITL"
- 3-StopArea-2: "Vérification que 2 arrêts de noms différents en dehors d'un même regroupement d'arrêts ne sont pas trop proches"
- 3-StopArea-3: "Vérification de l'unicité des arrêts"
- 3-StopArea-4: "Vérification de la géolocalisation des arrêts"
- 3-StopArea-5: "Vérification de la position relative des arrêts et de leur parent"
- 3-AccessPoint-1: "Vérification de la géolocalisation de tous les accès"
- 3-AccessPoint-2: "Vérification que deux accès de nom différents ne sont pas trop proches"
- 3-AccessPoint-3: "Vérification de la proximité entre les accès et leur arrêt de rattachement"
- 3-ConnectionLink-1: "Vérification de la proximité entre les deux arrêts d'une correspondance"
- 3-ConnectionLink-2: "Vérification de la cohérence entre la distance fournie sur la correspondance et la distance géographique entre les deux arrêts de la correspondance"
- 3-ConnectionLink-3: "Vérification de la vitesse de parcours entre les deux arrêts d'une correspondance"
- 3-AccessLink-1: "Vérification de la proximité entre les deux extrémités d'un lien d'accès"
- 3-AccessLink-2: "Vérification de la cohérence entre la distance fournie sur le lien d'accès et la distance géographique entre les deux extrémités du lien d'accès"
- 3-AccessLink-3: "Vérification de la vitesse de parcours entre les deux extrémités d'un lien d'accès"
- 3-Line-1: "Vérification de la non homonymie des lignes"
- 3-Line-2: "Vérification de la présence de séquences d'arrêts sur la ligne"
- 3-Route-1: "Vérification de la succession des arrêts de la séquence"
- 3-Route-2: "Vérification de la séquence inverse"
- 3-Route-3: "Vérification de la distance entre deux arrêts successifs de la séquence"
- 3-Route-4: "Vérification de double définition de séquences"
- 3-Route-5: "Vérification de séquences sans séquence opposée"
- 3-Route-6: "Vérification de la présence d'arrêts dans la séquence"
- 3-Route-7: "Vérification de la présence de missions"
- 3-Route-8: "Vérification de l'utilisation des arrêts par les missions"
- 3-Route-9: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence"
- 3-JourneyPattern-1: "Vérification de l'utilisation des arrêts par les missions"
- 3-JourneyPattern-2: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence"
- 3-JourneyPattern-3: "Vérification de double définition de missions"
- 3-VehicleJourney-1: "Vérification de la chronologie des horaires de passage à un arrêt"
- 3-VehicleJourney-2: "Vérification de la vitesse de transfert entre deux arrêts"
- 3-VehicleJourney-3: "Vérification de la cohérence des courses successives desservant deux mêmes arrêts"
- 3-VehicleJourney-4: "Vérification de l'affectation des courses à un calendrier"
- 3-Facility-1: "Vérification de la géolocalisation de tous les accès"
- 3-Facility-2: "Vérification de la proximité entre les équipements et leur arrêt de rattachement"
- 4-Network-1: "Vérification de contraintes sur les attributs des réseaux"
- 4-Company-1: "Vérification de contraintes sur les attributs des transporteurs"
- 4-GroupOfLine-1: "Vérification de contraintes sur les attributs des groupes de lignes"
- 4-StopArea-1: "Vérification de contraintes sur les attributs des arrêts"
- 4-StopArea-2: "Vérification de l'existance d'un arrêt commercial pour les arrêts physiques"
- 4-StopArea-3: "Vérification de la cohérence entre les noms de communes et leur code INSEE"
- 4-AccessPoint-1: "Vérification de contraintes sur les attributs des accès"
- 4-AccessLink-1: "Vérification de contraintes sur les attributs des liens d'accès"
- 4-ConnectionLink-1: "Vérification de contraintes sur les attributs des correspondances"
- 4-ConnectionLink-2: "Vérification des type d'arrêts en correspondance"
- 4-Timetable-1: "Vérification de contraintes sur les attributs des calendiers"
- 4-Line-1: "Vérification de contraintes sur les attributs des lignes"
- 4-Line-2: "Vérification des modes de transport des lignes"
- 4-Line-3: "Vérification des groupes de lignes d'une ligne"
- 4-Line-4: "Vérification des séquences d'arrêts d'une ligne"
- 4-Route-1: "Vérification de contraintes sur les attributs des séquences d'arrêt"
- 4-JourneyPattern-1: "Vérification de contraintes sur les attributs des missions"
- 4-VehicleJourney-1: "Vérification de contraintes sur les attributs des courses"
- 4-VehicleJourney-2: "Vérification des modes de transport des courses"
- severity: "Sévérité"
- status: "Statut"
- rule_level: "Niveau"
- rule_target: "Objet"
- rule_number: "Etape"
- rule_code: "Code"
- violation_count: "erreurs"
- violation_count_txt: "Nombre d'erreurs"
- objects: "Objets en erreur"
- detail: "Détail"
- title: "Titre du test"
- object: "Objet en erreur"
- resource: "Ressource de l'objet en erreur"
- url: "URL"
- first_violations: "Premières violations"
+
diff --git a/config/locales/compliance_check_tasks.en.yml b/config/locales/compliance_check_tasks.en.yml
deleted file mode 100644
index 61e56473c..000000000
--- a/config/locales/compliance_check_tasks.en.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-en:
- compliance_check_tasks:
- new:
- title: "Create a new validation"
- submit: "Create a validation"
- all: "All"
- flash: "Validation task on queue, refresh page to see progression"
- actions:
- new: "Add a validation"
- activemodel:
- attributes:
- compliance_check_task:
- name: "Compliance check name"
- references_type: "Subset"
- reference_ids: "Subset ids"
- object_id_prefix: "Neptune Id prefix"
- rule_parameter_set_id: "Jeu de paramètres pour validation" \ No newline at end of file
diff --git a/config/locales/compliance_check_tasks.fr.yml b/config/locales/compliance_check_tasks.fr.yml
deleted file mode 100644
index d6cc88b1e..000000000
--- a/config/locales/compliance_check_tasks.fr.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-fr:
- compliance_check_tasks:
- new:
- title: "Démarrer une nouvelle validation"
- submit: "Lancer la validation"
- all: "Toutes"
- flash: "La demande de validation est mise en file d'attente, veuillez rafraichir régulièrement la page pour en suivre la progression"
- actions:
- new: "Ajouter une validation"
- activemodel:
- attributes:
- compliance_check_task:
- name: "Nom de la validation"
- references_type: "Sous ensemble"
- reference_ids: "Identifiants du sous ensemble"
- object_id_prefix: "Préfixe Neptune Id"
- rule_parameter_set_id: "Jeu de paramètres pour validation"
diff --git a/config/locales/compliance_checks.en.yml b/config/locales/compliance_checks.en.yml
index c9bac8bc3..7f3e317be 100644
--- a/config/locales/compliance_checks.en.yml
+++ b/config/locales/compliance_checks.en.yml
@@ -1,93 +1,2 @@
en:
compliance_checks:
- index:
- title: "Validation"
- warning: ""
- edit:
- title: "Edit the Validation"
- show:
- title: "Neptune Validation"
- summary: "Rapport de conformité à la norme NEPTUNE"
- details: "Details"
- parameters: "Tests parameters"
- completed: "[ Completed ]"
- failed: "[ Failed ]"
- pending: "[ In the treatment queue ]"
- processing: "[ In progress... ]"
- export: "Download test report"
- export_csv: "CSV format"
- report:
- validation_success: "Validation successfully passed."
- action_report: "Action report"
- actions:
- destroy_confirm: "Do you confirm to destroy this validation ?"
- destroy: "Destroy this validation"
- edit: "Edit this validation"
- report: "Report"
- rule_parameter_set: "Rule parameter set"
- download: "Download"
- statuses:
- pending: "Pending"
- processing: "Processing"
- completed: "Completed"
- failed: "Failed"
- started: "Started"
- scheduled: "Processing ..."
- terminated: "Completed"
- canceled: "Canceled"
- aborted: "Failed"
- uncheck_count:
- zero: "no unappliable"
- one: "one unappliable"
- other: "%{count} unappliables"
- ok_count:
- zero: "No successful test"
- one: "One successful test"
- other: "%{count} successful tests"
- warning_count:
- zero: "no warning"
- one: "one warning"
- other: "%{count} warnings"
- error_count:
- zero: "no error"
- one: "one error"
- other: "%{count} errors"
- fatal_count:
- zero: "no fatal error"
- one: "one fatal error"
- other: "%{count} fatal errors"
- import: "Import"
- rule_parameter_set: "Rule parameter set"
- file_validation_log_messages:
- messages:
- undefined: "%{key} undefined"
- TooMuchDetails: ( %{0} errors / suppl. warnings )
- ONE: "Catégorie 1 : Syntaxe"
- severities:
- uncheck: "Unchecked"
- ok: "Ok"
- warning: "Warning"
- error: "Error"
- fatal: "Fatal"
- import: "Import Report"
- rule_parameter_set: "Rule Parameter Set"
- activemodel:
- models:
- compliance_check:
- zero: "Validation"
- one: "Validation"
- other: "Validation"
- attributes:
- compliance_check:
- created_at: "Executed at"
- references_type: "Associated Data Type"
- reference_ids: "Associated Data"
- rule_parameter_set_id: "Rule parameters set"
- resources: "File to validate"
- status: "Status"
- file_name: "Tested data"
- projection_reference: "Système de projection de référence"
- compliance_check_log_message:
- created_at: "Date"
- position: "N."
- full_message: "Message"
diff --git a/config/locales/compliance_checks.fr.yml b/config/locales/compliance_checks.fr.yml
index 14ae7e943..421574cbd 100644
--- a/config/locales/compliance_checks.fr.yml
+++ b/config/locales/compliance_checks.fr.yml
@@ -1,93 +1,3 @@
fr:
compliance_checks:
- index:
- title: "Validation"
- warning: ""
- edit:
- title: "Editer la validation"
- show:
- title: "Validation Neptune"
- summary: "Rapport de conformité à la norme NEPTUNE"
- details: "Détails"
- parameters: "Paramètres des tests"
- completed: "[ Terminé ]"
- failed: "[ Echoué ]"
- pending: "[ En file d'attente ]"
- processing: "[ En progression... ]"
- export: "Télécharger les résultats"
- export_csv: "Format CSV"
- report:
- validation_success: "La validation est passée avec succès."
- action_report: "Rapport d'action"
- actions:
- destroy_confirm: "Voulez-vous supprimer ce résultat de validation ?"
- destroy: "Supprimer cette validation"
- edit: "Editer cette validation"
- report: "Test de conformité"
- rule_parameter_set: "Jeu de paramètres"
- download: "Télécharger"
- statuses:
- pending: "En attente ..."
- processing: "En cours ..."
- completed: "Achevé"
- failed: "Echoué"
- started: "En file d'attente..."
- scheduled: "En cours..."
- terminated: "Achevé"
- canceled: "Annulé"
- aborted: "Echoué"
- uncheck_count:
- zero: "aucun inapplicable"
- one: "un inapplicable"
- other: "%{count} inapplicables"
- ok_count:
- zero: "aucun test réussi"
- one: "un test réussi"
- other: "%{count} tests réussis"
- warning_count:
- zero: "aucun warning"
- one: "un warning"
- other: "%{count} warnings"
- error_count:
- zero: "aucune erreur"
- one: "une erreur"
- other: "%{count} erreurs"
- fatal_count:
- zero: "aucune erreur fatale"
- one: "une erreur fatale"
- other: "%{count} erreurs fatales"
- import: "Import"
- rule_parameter_set: "Jeu de paramètres"
- file_validation_log_messages:
- messages:
- undefined: "%{key} non défini"
- TooMuchDetails: "( %{0} erreurs / warnings supplémentaires )"
- ONE: "Catégorie 1 : Syntaxe"
- severities:
- uncheck: "Non testé"
- ok: "Ok"
- warning: "Alerte"
- error: "Erreur"
- fatal: "Fatal"
- import: "Import Report"
- rule_parameter_set: "Rule Parameter Set"
- activemodel:
- models:
- compliance_check:
- zero: "Validation"
- one: "Validation"
- other: "Validations"
- attributes:
- compliance_check:
- created_at: "Exécuté le"
- references_type: "Type de données incluses"
- reference_ids: "Données incluses"
- rule_parameter_set_id: "Jeu de paramètres"
- resources: "Fichier à valider"
- status: "Status"
- file_name: "Jeu de données"
- projection_reference: "Système de projection de référence"
- compliance_check_log_message:
- created_at: "Date"
- position: "N."
- full_message: "Message"
+
diff --git a/config/locales/import_messages.en.yml b/config/locales/import_messages.en.yml
index 665cff605..6101a3bb7 100644
--- a/config/locales/import_messages.en.yml
+++ b/config/locales/import_messages.en.yml
@@ -1,48 +1,50 @@
en:
- import_messages:
- 1_netexstif_2: "The file %{file_name} does not respect the XML structure or the NeTEx XSD : '%{xercex_message}' error"
- 1_netexstif_5: "%{file}-Line %{line}-Column %{column} : the %{netex_type} object with %{objectid} id has an update in the future"
- 2_netexstif_1_1: "The commun.xml file doesn't have a NETEX_COMMUN named frame"
- 2_netexstif_1_2: "The commun.xml file frame name : %{frame_name} is not accepted"
- 2_netexstif_2_1: "The calendriers.xml file doesn't have a NETEX_CALENDRIER named frame"
- 2_netexstif_2_2: "The calendriers.xml file frame name : %{frame_name} is not accepted"
- 2_netexstif_3_1: "The %{file_name} doesn't have a NETEX_OFFRE_LIGNE named frame"
- 2_netexstif_3_2: "The %{file_name} frame name : %{frame_name} is not accepted"
- 2_netexstif_3_3: "The NETEX_OFFRE_LIGNE frame of the %{file_name} file doesn't have the required frame %{NETEX_STRUCTURE|NETEX_HORAIRE}"
- 2_netexstif_3_4: "The NETEX_OFFRE_LIGNE frame of the %{file_name} file has a non accepted %{frame_name} frame"
- 2_netexstif_4: "%{file}-Line %{line}-Column %{column} : the %{objectid} id of the %{netex_type} object does not have the right syntax : [CODESPACE]:%{netex_type}:[identifiant Technique]:LOC"
- 2_netexstif_6: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} has a forbidden update type : 'delete'"
- 2_netexstif_7: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} define a %{objectRef} reference with an invalid syntaxe : %{ref}"
- 2_netexstif_8_1: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} define a %{objectRef} reference with an extern type : intern type required"
- 2_netexstif_8_2: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} define a %{objectRef} reference with an intern type but has a content (extern version allowed"
- 2_netexstif_9_1: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} define a %{objectRef} reference with an intern type : extern reference expected"
- 2_netexstif_9_2: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} define a %{objectRef} reference with an extern type without version info"
- 2_netexstif_10: "%{file}-Line %{line}-Column %{column} : The %{netex_type} object with the id of %{objectid} define a %{objectRef} reference with an unknown extern type"
- 2_netexstif_daytype_1: "%{file}-Line %{line}-Column %{column} : the DayType object with %{objectid} id does not have a time table, it's ignored"
- 2_netexstif_daytype_2: "%{file}-Line %{line}-Column %{column} : the DayType object with %{objectid} id has periods but no day types"
- 2_netexstif_daytypeassignment_1: "%{file}-Line %{line}-Column %{column} : the DayTypeAssignment object with %{objectid} id cannot reference a OperatingDay"
- 2_netexstif_daytypeassignment_2: "%{file}-Line %{line}-Column %{column} : the DayTypeAssignment object with %{objectid} id cannot reference a OperatingPeriod on false IsAvailable condition"
- 2_netexstif_direction_1: "%{file}-Line %{line}-Column %{column} : the Direction object with %{objectid} id has a blank value for the Name attribute"
- 2_netexstif_direction_2: "%{file}-Line %{line}-Column %{column} : the Direction object with %{objectid} id define a forbidden attribute : %{forbidden_aatribute}"
- 2_netexstif_notice_1: "%{file}-Line %{line}-Column %{column} : the Notice object with %{objectid} id needs to define a text"
- 2_netexstif_notice_2: "%{file}-Line %{line}-Column %{column} : the Notice object with %{objectid} id of %{type_of_notice_ref} type is ignored"
- 2_netexstif_operatingperiod_1: "%{file}-Line %{line}-Column %{column} : the OperatingPeriod object with %{objectid} id must have an end date (%{start_date}) which is greater than the start date (%{end_date})"
- 2_netexstif_passengerstopassignment_1: "%{file}-Line %{line}-Column %{column}, the %{required_attribute} attribute of the PassengerStopAssignment object with %{objectid} id is required"
- 2_netexstif_passengerstopassignment_2: "The %{objectid} stop point is not available for your organization."
- 2_netexstif_passingtime_1: "%{file}-Line %{line}-Column %{column}, the ServiceJourney object with %{objectid} id : the passingTime with the %{rank} rank does not have a DepartureTime"
- 2_netexstif_passingtime_2: "%{file}-Line %{line}-Column %{column}, the ServiceJourney object with %{objectid} id : the passingTime with the %{rank} rank has an ArrivalTime greater than the DepartureTime"
- 2_netexstif_route_1: "%{file}-Line %{line}-Column %{column} : the Route object with %{objectid} has a forbidden value for the DirectionType attribute : %{direction_type}"
- 2_netexstif_route_2_1: "%{file}-Line %{line}-Column %{column} : the Route object with %{objectid} references an inverse route %{inverse_route_ref.ref} which doesn't references it"
- 2_netexstif_route_2_2: "%{file}-Line %{line}-Column %{column} : the Route object with %{objectid} references an inverse route %{inverse_route_ref.ref} of the same DirectionType"
- 2_netexstif_route_3: "%{file}-Line %{line}-Column %{column} : th ServiceJourneyPattern objects of the Route with %{objectid} id does permit the reconstitution of the stop points sequence"
- 2_netexstif_route_4: "%{file}-Line %{line}-Column %{column}, The up/down info of the %{stop_point_id} stop point of the Route %{objectid} id are different on multiple ServiceJourneyPattern, those informations are not imported"
- 2_netexstif_routingconstraintzone_1: "%{file}-Line %{line}-Column %{column}, the RoutingConstraintZone object with %{objectid} must references at least two ScheduledStopPoint"
- 2_netexstif_routingconstraintzone_2: "%{file}-Line %{line}-Column %{column}, the RoutingConstraintZone object with %{objectid} has a forbidden value for the ZoneUse attribute: %{zone_use}"
- 2_netexstif_servicejourney_1: "%{file}-Line %{line}-Column %{column} : the ServiceJourney object with %{objectid} id does not references a ServiceJourneyPattern"
- 2_netexstif_servicejourney_2: "%{file}-Line %{line}-Column %{column} : the ServiceJourney object with %{objectid} id doesn't have a trainNumber"
- 2_netexstif_servicejourney_3: "%{file}-Line %{line}-Column %{column} : the number of passing_time of the ServiceJourney object with %{objectid} id is not consistent with the associated ServiceJourneyPattern"
- 2_netexstif_servicejourney_4: "%{file}-Line %{line}-Column %{column} , the ServiceJourney object with the %{objectid} id : the passingTime of %{rank} rank has smaller schedules compared to the prior passingTime"
- 2_netexstif_servicejourneypattern_1: "%{file}-Line %{line}-Column %{column} : the ServiceJourneyPattern with %{objectid} id does not reference a Route"
- 2_netexstif_servicejourneypattern_2: "%{file}-Line %{line}-Column %{column} : the ServiceJourneyPattern with %{objectid} id must contain at least 2 StopPointInJourneyPattern"
- 2_netexstif_servicejourneypattern_3: "%{file}-Line %{line}-Column %{column} : the ServiceJourneyPattern with %{objectid} id does not have a value for the ServiceJourneyPatternType attribute"
- 2_netexstif_servicejourneypattern_4: "%{file}-Line %{line}-Column %{column}, the ServiceJourneyPattern with %{objectid} id : the 'order' attributes for the StopPointInJourneyPattern are not in ascending order"
+ compliance_check_messages:
+ import_messages:
+ referential_creation: "The referential can't be created because another one has same periods and lines"
+ 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"
+ 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{source.label} non acceptée"
+ 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
+ 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{source.label} non acceptée"
+ 2_netexstif_3_1: "Le fichier %{source.filename} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
+ 2_netexstif_3_2: "Le fichier %{source.filename} contient une frame nommée %{source.label} non acceptée"
+ 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{source.filename} ne contient pas la frame %{NETEX_STRUCTURE|NETEX_HORAIRE} obligatoire"
+ 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{source.filename} contient une frame %{source.label} non acceptée"
+ 2_netexstif_4: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'identifiant %{source.objectid} de l'objet %{source.label} ne respecte pas la syntaxe [CODESPACE]:%{source.label}:[identifiant Technique]:LOC"
+ 2_netexstif_6: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} a un état de modification interdit : 'delete'"
+ 2_netexstif_7: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de syntaxe invalide : %{reference_value}"
+ 2_netexstif_8_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type externe : référence interne attendue"
+ 2_netexstif_8_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type interne mais disposant d'un contenu (version externe possible)"
+ 2_netexstif_9_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type interne : référence externe attendue"
+ 2_netexstif_9_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type externe sans information de version"
+ 2_netexstif_10: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type externe inconnue"
+ 2_netexstif_daytype_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayType d'identifiant %{source.objectid} ne définit aucun calendrier, il est ignoré"
+ 2_netexstif_daytype_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayType d'identifiant %{source.objectid} est reliée à des périodes mais ne définit pas de types de jours"
+ 2_netexstif_daytypeassignment_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayTypeAssignment d'identifiant %{source.objectid} ne peut référencer un OperatingDay"
+ 2_netexstif_daytypeassignment_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayTypeAssignment d'identifiant %{source.objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
+ 2_netexstif_direction_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Direction d'identifiant %{source.objectid} n'a pas de valeur pour l'attribut Name"
+ 2_netexstif_direction_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Direction d'identifiant %{source.objectid} définit un attribut %{error_value} non autorisé"
+ 2_netexstif_notice_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Notice d'identifiant %{source.objectid} doit définir un texte"
+ 2_netexstif_notice_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Notice d'identifiant %{source.objectid} de type %{reference_value} est ignoré"
+ 2_netexstif_operatingperiod_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet OperatingPeriod d'identifiant %{source.objectid} a une date de fin %{start_date} inférieure ou égale à la date de début %{end_date}"
+ 2_netexstif_passengerstopassignment_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, l'attribut %{source.label} de l'objet PassengerStopAssignment %{source.objectid} doit être renseigné"
+ 2_netexstif_passengerstopassignment_2: "L'arrêt %{source.objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
+ 2_netexstif_passingtime_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} , objet ServiceJourney d'identifiant %{source.objectid} : le passingTime de rang %{error_value} ne dispose pas de DepartureTime"
+ 2_netexstif_passingtime_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} , objet ServiceJourney d'identifiant %{source.objectid} : le passingTime de rang %{error_value} fournit un ArrivalTime supérieur à son DepartureTime"
+ 2_netexstif_route_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Route d'identifiant %{source.objectid} a une valeur de l'attribut DirectionType interdite : %{error_value}"
+ 2_netexstif_route_2_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Route d'identifiant %{source.objectid} référence un objet Route inverse %{reference_value} qui ne le référence pas"
+ 2_netexstif_route_2_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Route d'identifiant %{source.objectid} référence un objet Route inverse %{reference_value} de même DirectionType"
+ 2_netexstif_route_3: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{source.objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
+ 2_netexstif_route_4: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, Les informations de montée/Descente à l'arrêt %{source.label} de la Route %{source.objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
+ 2_netexstif_routingconstraintzone_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, l'objet RoutingConstraintZone %{source.objectid} doit référencer au moins deux ScheduledStopPoint"
+ 2_netexstif_routingconstraintzone_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, l'objet RoutingConstraintZone %{source.objectid} a une valeur interdite pour l'attribut ZoneUse : %{error_value}"
+ 2_netexstif_servicejourney_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourney d'identifiant %{source.objectid} ne référence pas de ServiceJourneyPattern"
+ 2_netexstif_servicejourney_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourney d'identifiant %{source.objectid} fournit plus d'un trainNumber"
+ 2_netexstif_servicejourney_3: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{source.objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
+ 2_netexstif_servicejourney_4: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} , objet ServiceJourney d'identifiant %{source.objectid} : le passingTime de rang %{rank} fournit des horaires antérieurs au passingTime précédent."
+ 2_netexstif_servicejourneypattern_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourneyPattern d'identifiant %{source.objectid} ne référence pas de Route"
+ 2_netexstif_servicejourneypattern_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourneyPattern d'identifiant %{source.objectid} doit contenir au moins 2 StopPointInJourneyPattern"
+ 2_netexstif_servicejourneypattern_3: "%{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_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."
diff --git a/config/locales/import_messages.fr.yml b/config/locales/import_messages.fr.yml
index f5934f5db..b507ebded 100644
--- a/config/locales/import_messages.fr.yml
+++ b/config/locales/import_messages.fr.yml
@@ -1,48 +1,50 @@
fr:
import_messages:
- 1_netexstif_2: "Le fichier %{file_name} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{xercex_message}' rencontré"
- 1_netexstif_5: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{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"
- 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{frame_name} non acceptée"
- 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
- 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{frame_name} non acceptée"
- 2_netexstif_3_1: "Le fichier %{file_name} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
- 2_netexstif_3_2: "Le fichier %{file_name} contient une frame nommée %{frame_name} non acceptée"
- 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{file_name} ne contient pas la frame %{NETEX_STRUCTURE|NETEX_HORAIRE} obligatoire"
- 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{file_name} contient une frame %{frame_name} non acceptée"
- 2_netexstif_4: "%{file}-Ligne %{line}-Colonne %{column} : l'identifiant %{objectid} de l'objet %{netex_type} ne respecte pas la syntaxe [CODESPACE]:%{netex_type}:[identifiant Technique]:LOC"
- 2_netexstif_6: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} a un état de modification interdit : 'delete'"
- 2_netexstif_7: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} définit une référence %{objectRef} de syntaxe invalide : %{ref}"
- 2_netexstif_8_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} définit une référence %{objectRef} de type externe : référence interne attendue"
- 2_netexstif_8_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} définit une référence %{objectRef} de type interne mais disposant d'un contenu (version externe possible)"
- 2_netexstif_9_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} définit une référence %{objectRef} de type interne : référence externe attendue"
- 2_netexstif_9_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} définit une référence %{objectRef} de type externe sans information de version"
- 2_netexstif_10: "%{file}-Ligne %{line}-Colonne %{column} : l'objet %{netex_type} d'identifiant %{objectid} définit une référence %{objectRef} de type externe inconnue"
- 2_netexstif_daytype_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet DayType d'identifiant %{objectid} ne définit aucun calendrier, il est ignoré"
- 2_netexstif_daytype_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet DayType d'identifiant %{objectid} est reliée à des périodes mais ne définit pas de types de jours"
- 2_netexstif_daytypeassignment_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet DayTypeAssignment d'identifiant %{objectid} ne peut référencer un OperatingDay"
- 2_netexstif_daytypeassignment_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet DayTypeAssignment d'identifiant %{objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
- 2_netexstif_direction_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Direction d'identifiant %{objectid} n'a pas de valeur pour l'attribut Name"
- 2_netexstif_direction_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Direction d'identifiant %{objectid} définit un attribut %{forbidden_aatribute} non autorisé"
- 2_netexstif_notice_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Notice d'identifiant %{objectid} doit définir un texte"
- 2_netexstif_notice_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Notice d'identifiant %{objectid} de type %{type_of_notice_ref} est ignoré"
- 2_netexstif_operatingperiod_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet OperatingPeriod d'identifiant %{objectid} a une date de fin %{start_date} inférieure ou égale à la date de début %{end_date}"
- 2_netexstif_passengerstopassignment_1: "%{file}-Ligne %{line}-Colonne %{column}, l'attribut %{required_attribute} de l'objet PassengerStopAssignment %{objectid} doit être renseigné"
- 2_netexstif_passengerstopassignment_2: "L'arrêt %{objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
- 2_netexstif_passingtime_1: "%{file}-Ligne %{line}-Colonne %{column} , objet ServiceJourney d'identifiant %{objectid} : le passingTime de rang %{rank} ne dispose pas de DepartureTime"
- 2_netexstif_passingtime_2: "%{file}-Ligne %{line}-Colonne %{column} , objet ServiceJourney d'identifiant %{objectid} : le passingTime de rang %{rank} fournit un ArrivalTime supérieur à son DepartureTime"
- 2_netexstif_route_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Route d'identifiant %{objectid} a une valeur de l'attribut DirectionType interdite : %{direction_type}"
- 2_netexstif_route_2_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Route d'identifiant %{objectid} référence un objet Route inverse %{inverse_route_ref.ref} qui ne le référence pas"
- 2_netexstif_route_2_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet Route d'identifiant %{objectid} référence un objet Route inverse %{inverse_route_ref.ref} de même DirectionType"
- 2_netexstif_route_3: "%{file}-Ligne %{line}-Colonne %{column} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
- 2_netexstif_route_4: "%{file}-Ligne %{line}-Colonne %{column}, Les informations de montée/Descente à l'arrêt %{stop_point_id} de la Route %{objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
- 2_netexstif_routingconstraintzone_1: "%{file}-Ligne %{line}-Colonne %{column}, l'objet RoutingConstraintZone %{objectid} doit référencer au moins deux ScheduledStopPoint"
- 2_netexstif_routingconstraintzone_2: "%{file}-Ligne %{line}-Colonne %{column}, l'objet RoutingConstraintZone %{objectid} a une valeur interdite pour l'attribut ZoneUse : %{zone_use}"
- 2_netexstif_servicejourney_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet ServiceJourney d'identifiant %{objectid} ne référence pas de ServiceJourneyPattern"
- 2_netexstif_servicejourney_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet ServiceJourney d'identifiant %{objectid} fournit plus d'un trainNumber"
- 2_netexstif_servicejourney_3: "%{file}-Ligne %{line}-Colonne %{column} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
- 2_netexstif_servicejourney_4: "%{file}-Ligne %{line}-Colonne %{column} , objet ServiceJourney d'identifiant %{objectid} : le passingTime de rang %{rank} fournit des horaires antérieurs au passingTime précédent."
- 2_netexstif_servicejourneypattern_1: "%{file}-Ligne %{line}-Colonne %{column} : l'objet ServiceJourneyPattern d'identifiant %{objectid} ne référence pas de Route"
- 2_netexstif_servicejourneypattern_2: "%{file}-Ligne %{line}-Colonne %{column} : l'objet ServiceJourneyPattern d'identifiant %{objectid} doit contenir au moins 2 StopPointInJourneyPattern"
- 2_netexstif_servicejourneypattern_3: "%{file}-Ligne %{line}-Colonne %{column} : l'objet ServiceJourneyPattern d'identifiant %{objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType"
- 2_netexstif_servicejourneypattern_4: "%{file}-Ligne %{line}-Colonne %{column}, objet ServiceJourneyPattern d'identifiant %{objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants."
+ compliance_check_messages:
+ referential_creation: "Le référentiel n'a pas pu être créé car un référentiel existe déjà sur les même périodes et lignes"
+ 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"
+ 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{source.label} non acceptée"
+ 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
+ 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{source.label} non acceptée"
+ 2_netexstif_3_1: "Le fichier %{source.filename} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
+ 2_netexstif_3_2: "Le fichier %{source.filename} contient une frame nommée %{source.label} non acceptée"
+ 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{source.filename} ne contient pas la frame %{NETEX_STRUCTURE|NETEX_HORAIRE} obligatoire"
+ 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{source.filename} contient une frame %{source.label} non acceptée"
+ 2_netexstif_4: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'identifiant %{source.objectid} de l'objet %{source.label} ne respecte pas la syntaxe [CODESPACE]:%{source.label}:[identifiant Technique]:LOC"
+ 2_netexstif_6: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} a un état de modification interdit : 'delete'"
+ 2_netexstif_7: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de syntaxe invalide : %{reference_value}"
+ 2_netexstif_8_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type externe : référence interne attendue"
+ 2_netexstif_8_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type interne mais disposant d'un contenu (version externe possible)"
+ 2_netexstif_9_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type interne : référence externe attendue"
+ 2_netexstif_9_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type externe sans information de version"
+ 2_netexstif_10: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet %{source.label} d'identifiant %{source.objectid} définit une référence %{reference_value} de type externe inconnue"
+ 2_netexstif_daytype_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayType d'identifiant %{source.objectid} ne définit aucun calendrier, il est ignoré"
+ 2_netexstif_daytype_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayType d'identifiant %{source.objectid} est reliée à des périodes mais ne définit pas de types de jours"
+ 2_netexstif_daytypeassignment_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayTypeAssignment d'identifiant %{source.objectid} ne peut référencer un OperatingDay"
+ 2_netexstif_daytypeassignment_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet DayTypeAssignment d'identifiant %{source.objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
+ 2_netexstif_direction_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Direction d'identifiant %{source.objectid} n'a pas de valeur pour l'attribut Name"
+ 2_netexstif_direction_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Direction d'identifiant %{source.objectid} définit un attribut %{error_value} non autorisé"
+ 2_netexstif_notice_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Notice d'identifiant %{source.objectid} doit définir un texte"
+ 2_netexstif_notice_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Notice d'identifiant %{source.objectid} de type %{reference_value} est ignoré"
+ 2_netexstif_operatingperiod_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet OperatingPeriod d'identifiant %{source.objectid} a une date de fin %{start_date} inférieure ou égale à la date de début %{end_date}"
+ 2_netexstif_passengerstopassignment_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, l'attribut %{source.label} de l'objet PassengerStopAssignment %{source.objectid} doit être renseigné"
+ 2_netexstif_passengerstopassignment_2: "L'arrêt %{source.objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
+ 2_netexstif_passingtime_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} , objet ServiceJourney d'identifiant %{source.objectid} : le passingTime de rang %{error_value} ne dispose pas de DepartureTime"
+ 2_netexstif_passingtime_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} , objet ServiceJourney d'identifiant %{source.objectid} : le passingTime de rang %{error_value} fournit un ArrivalTime supérieur à son DepartureTime"
+ 2_netexstif_route_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Route d'identifiant %{source.objectid} a une valeur de l'attribut DirectionType interdite : %{error_value}"
+ 2_netexstif_route_2_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Route d'identifiant %{source.objectid} référence un objet Route inverse %{reference_value} qui ne le référence pas"
+ 2_netexstif_route_2_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet Route d'identifiant %{source.objectid} référence un objet Route inverse %{reference_value} de même DirectionType"
+ 2_netexstif_route_3: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{source.objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
+ 2_netexstif_route_4: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, Les informations de montée/Descente à l'arrêt %{source.label} de la Route %{source.objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
+ 2_netexstif_routingconstraintzone_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, l'objet RoutingConstraintZone %{source.objectid} doit référencer au moins deux ScheduledStopPoint"
+ 2_netexstif_routingconstraintzone_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number}, l'objet RoutingConstraintZone %{source.objectid} a une valeur interdite pour l'attribut ZoneUse : %{error_value}"
+ 2_netexstif_servicejourney_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourney d'identifiant %{source.objectid} ne référence pas de ServiceJourneyPattern"
+ 2_netexstif_servicejourney_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourney d'identifiant %{source.objectid} fournit plus d'un trainNumber"
+ 2_netexstif_servicejourney_3: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{source.objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
+ 2_netexstif_servicejourney_4: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} , objet ServiceJourney d'identifiant %{source.objectid} : le passingTime de rang %{rank} fournit des horaires antérieurs au passingTime précédent."
+ 2_netexstif_servicejourneypattern_1: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourneyPattern d'identifiant %{source.objectid} ne référence pas de Route"
+ 2_netexstif_servicejourneypattern_2: "%{source.filename}-Ligne %{source.line_number}-Colonne %{source.column_number} : l'objet ServiceJourneyPattern d'identifiant %{source.objectid} doit contenir au moins 2 StopPointInJourneyPattern"
+ 2_netexstif_servicejourneypattern_3: "%{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_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."
diff --git a/config/routes.rb b/config/routes.rb
index d7322980a..fa892c908 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -152,23 +152,6 @@ ChouetteIhm::Application.routes.draw do
end
end
- resources :compliance_check_tasks, :only => [:new, :create] do
- collection do
- get 'references'
- end
- end
-
- resources :compliance_checks, :only => [:index, :show, :destroy] do
- member do
- get 'export', defaults: { format: 'zip' }
- get 'report'
- get 'rule_parameter_set'
- end
- collection do
- get 'references'
- end
- end
-
resources :companies, controller: "referential_companies"
resources :time_tables do
diff --git a/db/migrate/20170808083322_change_referential_date_format_to_netex.rb b/db/migrate/20170808083322_change_referential_date_format_to_netex.rb
new file mode 100644
index 000000000..dc706942c
--- /dev/null
+++ b/db/migrate/20170808083322_change_referential_date_format_to_netex.rb
@@ -0,0 +1,9 @@
+class ChangeReferentialDateFormatToNetex < ActiveRecord::Migration
+ def up
+ execute "UPDATE referentials SET data_format = 'netex'"
+ end
+
+ def down
+ execute "UPDATE referentials SET data_format = 'neptune'"
+ end
+end
diff --git a/db/migrate/20170808091929_change_objectid_suffix.rb b/db/migrate/20170808091929_change_objectid_suffix.rb
new file mode 100644
index 000000000..da98e8b9d
--- /dev/null
+++ b/db/migrate/20170808091929_change_objectid_suffix.rb
@@ -0,0 +1,17 @@
+class ChangeObjectidSuffix < ActiveRecord::Migration
+ def tables
+ ['routes', 'journey_patterns', 'vehicle_journeys', 'time_tables', 'routing_constraint_zones']
+ end
+
+ def up
+ self.tables.each do |table|
+ execute "UPDATE #{table} SET objectid = (objectid || ':LOC')"
+ end
+ end
+
+ def down
+ self.tables.each do |table|
+ execute "UPDATE #{table} SET objectid = replace(objectid, ':LOC', '')"
+ end
+ end
+end
diff --git a/spec/controllers/import_tasks_controller_spec.rb b/spec/controllers/import_tasks_controller_spec.rb
deleted file mode 100644
index 17be1a8d7..000000000
--- a/spec/controllers/import_tasks_controller_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require 'spec_helper'
-
-# describe ImportTasksController, :type => :controller do
-# login_user
-# shared_examples_for "referential dependant" do
-# it "assigns referential as @referential" do
-# expect(assigns[:referential]).to eq(referential)
-# end
-# end
-
-# describe "GET /new" do
-# before(:each) do
-# get :new,
-# :referential_id => referential.id
-# end
-# it_behaves_like "referential dependant"
-# it "should assign import_task with NeptuneImport instance" do
-# expect(assigns[:import_task].class).to eq(NeptuneImport)
-# end
-# it "should assign import_task with Neptune format" do
-# expect(assigns[:import_task].format).to eq(ImportTask.new.format)
-# end
-# it "should assign import_task with refrential.id" do
-# expect(assigns[:import_task].referential_id).to eq(referential.id)
-# end
-# it "should assign import_task with logged in user id" do
-# expect(assigns[:import_task].user_id).to eq(referential.organisation.users.first.id)
-# end
-# it "should assign import_task with logged in user name" do
-# expect(assigns[:import_task].user_name).to eq(referential.organisation.users.first.name)
-# end
-# end
-
-# end
diff --git a/spec/factories/chouette_access_links.rb b/spec/factories/chouette_access_links.rb
index 94717e95e..8b4e89be9 100644
--- a/spec/factories/chouette_access_links.rb
+++ b/spec/factories/chouette_access_links.rb
@@ -1,9 +1,9 @@
FactoryGirl.define do
-
+
factory :access_link, :class => Chouette::AccessLink do
sequence(:name) { |n| "Access link #{n}" }
- sequence(:objectid) { |n| "test:AccessLink:#{n}" }
- link_type "Mixed"
+ sequence(:objectid) { |n| "test:AccessLink:#{n}:loc" }
+ link_type "Mixed"
link_orientation "AccessPointToStopArea"
association :stop_area, :factory => :stop_area
diff --git a/spec/factories/chouette_companies.rb b/spec/factories/chouette_companies.rb
index 35ce34257..9272736cf 100644
--- a/spec/factories/chouette_companies.rb
+++ b/spec/factories/chouette_companies.rb
@@ -2,7 +2,7 @@ FactoryGirl.define do
factory :company, :class => Chouette::Company do
sequence(:name) { |n| "Company #{n}" }
- sequence(:objectid) { |n| "chouette:test:Company:#{n}" }
+ sequence(:objectid) { |n| "STIF:CODIFLIGNE:Company:#{n}" }
sequence(:registration_number) { |n| "test-#{n}" }
association :line_referential, :factory => :line_referential
diff --git a/spec/factories/chouette_connection_links.rb b/spec/factories/chouette_connection_links.rb
index f70548721..9185480ac 100644
--- a/spec/factories/chouette_connection_links.rb
+++ b/spec/factories/chouette_connection_links.rb
@@ -3,11 +3,11 @@ FactoryGirl.define do
factory :connection_link, :class => Chouette::ConnectionLink do
sequence(:name) { |n| "Connection link #{n}" }
sequence(:link_type) { |n| "Mixed" }
- sequence(:objectid) { |n| "test:ConnectionLink:#{n}" }
+ sequence(:objectid) { |n| "test:ConnectionLink:#{n}:loc" }
association :departure, :factory => :stop_area
association :arrival, :factory => :stop_area
end
-
+
end
diff --git a/spec/factories/chouette_group_of_lines.rb b/spec/factories/chouette_group_of_lines.rb
index 75739d6d3..8b359fea5 100644
--- a/spec/factories/chouette_group_of_lines.rb
+++ b/spec/factories/chouette_group_of_lines.rb
@@ -2,7 +2,7 @@ FactoryGirl.define do
factory :group_of_line, :class => Chouette::GroupOfLine do
sequence(:name) { |n| "Group Of Line #{n}" }
- sequence(:objectid) { |n| "chouette:test:GroupOfLine:#{n}" }
+ sequence(:objectid) { |n| "STIF:CODIFLIGNE:GroupOfLine:#{n}" }
sequence(:registration_number) { |n| "#{n}" }
association :line_referential
diff --git a/spec/factories/chouette_journey_pattern.rb b/spec/factories/chouette_journey_pattern.rb
index 62241f313..05d8d536a 100644
--- a/spec/factories/chouette_journey_pattern.rb
+++ b/spec/factories/chouette_journey_pattern.rb
@@ -5,8 +5,7 @@ FactoryGirl.define do
sequence(:published_name) { |n| "jp publishedname #{n}" }
sequence(:comment) { |n| "jp comment #{n}" }
sequence(:registration_number) { |n| "jp registration_number #{n}" }
- sequence(:objectid) { |n| "test:JourneyPattern:#{n}" }
-
+ sequence(:objectid) { |n| "organisation:JourneyPattern:lineId-#{n}:LOC" }
association :route, :factory => :route
factory :journey_pattern do
diff --git a/spec/factories/chouette_networks.rb b/spec/factories/chouette_networks.rb
index 3ad719cd9..afeac9e28 100644
--- a/spec/factories/chouette_networks.rb
+++ b/spec/factories/chouette_networks.rb
@@ -2,7 +2,7 @@ FactoryGirl.define do
factory :network, :class => Chouette::Network do
sequence(:name) { |n| "Network #{n}" }
- sequence(:objectid) { |n| "chouette:test:GroupOfLine:#{n}" }
+ sequence(:objectid) { |n| "STIF:CODIFLIGNE:Network:#{n}" }
sequence(:registration_number) { |n| "test-#{n}" }
association :line_referential
diff --git a/spec/factories/chouette_routes.rb b/spec/factories/chouette_routes.rb
index a707bcbf6..4986ab70e 100644
--- a/spec/factories/chouette_routes.rb
+++ b/spec/factories/chouette_routes.rb
@@ -6,7 +6,7 @@ FactoryGirl.define do
sequence(:number) { |n| "#{n}" }
sequence(:wayback) { |n| Chouette::Route.wayback.values[n % 2] }
sequence(:direction) { |n| Chouette::Route.direction.values[n % 12] }
- sequence(:objectid) { |n| "test:Route:#{n}" }
+ sequence(:objectid) { |n| "organisation:Route:lineId-routeId#{n}:LOC" }
association :line, :factory => :line
diff --git a/spec/factories/chouette_routing_constraint_zones.rb b/spec/factories/chouette_routing_constraint_zones.rb
index 8ef2ddb43..7748a4f74 100644
--- a/spec/factories/chouette_routing_constraint_zones.rb
+++ b/spec/factories/chouette_routing_constraint_zones.rb
@@ -1,6 +1,7 @@
FactoryGirl.define do
factory :routing_constraint_zone, class: Chouette::RoutingConstraintZone do
sequence(:name) { |n| "Routing constraint zone #{n}" }
+ sequence(:objectid) { |n| "organisation:RoutingConstraintZone:lineId-routeId-#{n}:LOC" }
association :route, factory: :route
after(:build) do |zone|
route = Chouette::Route.find(zone.route_id)
diff --git a/spec/factories/chouette_stop_points.rb b/spec/factories/chouette_stop_points.rb
index 690d1c688..14e08b1ac 100644
--- a/spec/factories/chouette_stop_points.rb
+++ b/spec/factories/chouette_stop_points.rb
@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :stop_point, :class => Chouette::StopPoint do
- sequence(:objectid) { |n| "test:StopPoint:#{n}" }
+ sequence(:objectid) { |n| "test:StopPoint:#{n}:loc" }
association :stop_area, :factory => :stop_area
end
diff --git a/spec/factories/chouette_time_table.rb b/spec/factories/chouette_time_table.rb
index b410d4ab8..a3ff63b2f 100644
--- a/spec/factories/chouette_time_table.rb
+++ b/spec/factories/chouette_time_table.rb
@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :time_table, :class => Chouette::TimeTable do
sequence(:comment) { |n| "Timetable #{n}" }
- sequence(:objectid) { |n| "test:Timetable:#{n}" }
+ sequence(:objectid) { |n| "organisation:Timetable:#{n}:LOC" }
sequence(:int_day_types) { (1..7).to_a.map{ |n| 2**(n+1)}.sum }
calendar nil
diff --git a/spec/factories/chouette_timeband.rb b/spec/factories/chouette_timeband.rb
index 6e2825c22..010461479 100644
--- a/spec/factories/chouette_timeband.rb
+++ b/spec/factories/chouette_timeband.rb
@@ -4,14 +4,14 @@ FactoryGirl.define do
sequence(:name) { |n| "Name: #{n}" }
start_time { Time.now }
end_time { Time.now + 1.hour }
- sequence(:objectid) { |n| "test:Timeband:#{n}" }
+ sequence(:objectid) { |n| "test:Timeband:#{n}:loc" }
end
factory :timeband_invalid, class: Chouette::Timeband do
sequence(:name) { |n| "Name: #{n}" }
start_time { Time.now + 1.hour }
end_time { Time.now }
- sequence(:objectid) { |n| "test:Timeband:#{n}" }
+ sequence(:objectid) { |n| "test:Timeband:#{n}:loc" }
end
end
diff --git a/spec/factories/chouette_vehicle_journey.rb b/spec/factories/chouette_vehicle_journey.rb
index d1e00cd1d..5f64bd502 100644
--- a/spec/factories/chouette_vehicle_journey.rb
+++ b/spec/factories/chouette_vehicle_journey.rb
@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :vehicle_journey_common, :class => Chouette::VehicleJourney do
- sequence(:objectid) { |n| "test:VehicleJourney:#{n}" }
+ sequence(:objectid) { |n| "organisation:VehicleJourney:lineid-#{n}:LOC" }
factory :vehicle_journey_empty do
association :journey_pattern, :factory => :journey_pattern
diff --git a/spec/factories/compliance_check_results.rb b/spec/factories/compliance_check_results.rb
deleted file mode 100644
index 7a3a3e956..000000000
--- a/spec/factories/compliance_check_results.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-FactoryGirl.define do
- factory :compliance_check_result do
- association :compliance_check_task
- rule_code "2-NEPTUNE-StopArea-6"
- severity "warning"
- status "nok"
- end
-end
diff --git a/spec/factories/compliance_check_tasks.rb b/spec/factories/compliance_check_tasks.rb
deleted file mode 100644
index e9fdeb5ef..000000000
--- a/spec/factories/compliance_check_tasks.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-FactoryGirl.define do
- factory :compliance_check_task do
- user_id 1
- user_name "Dummy"
- status "pending"
- referential { Referential.find_by_slug("first") }
- end
-end
diff --git a/spec/features/connection_links_spec.rb b/spec/features/connection_links_spec.rb
index 0325e6e1c..7272242fe 100644
--- a/spec/features/connection_links_spec.rb
+++ b/spec/features/connection_links_spec.rb
@@ -34,7 +34,7 @@ RSpec.describe "ConnectionLinks", :type => :feature do
visit referential_connection_links_path(referential)
click_link "Ajouter une correspondance"
fill_in "Nom", :with => "ConnectionLink 1"
- fill_in "Identifiant Neptune", :with => "test:ConnectionLink:1"
+ fill_in "Identifiant Neptune", :with => "test:ConnectionLink:1:LOC"
click_button("Créer correspondance")
expect(page).to have_content("ConnectionLink 1")
end
diff --git a/spec/features/workbenches_spec.rb b/spec/features/workbenches_spec.rb
index d1ba0046f..14809dec1 100644
--- a/spec/features/workbenches_spec.rb
+++ b/spec/features/workbenches_spec.rb
@@ -169,7 +169,7 @@ describe 'Workbenches', type: :feature do
end
context 'user does not have the permission to create referentials' do
- xit 'does not show the clone link for referential' do
+ it 'does not show the clone link for referential' do
@user.update_attribute(:permissions, [])
visit referential_path(referential)
expect(page).not_to have_link(I18n.t('actions.add'), href: new_referential_path(workbench_id: workbench.id))
@@ -178,16 +178,24 @@ describe 'Workbenches', type: :feature do
end
describe 'create new Referential' do
- xit "create a new Referential with a specifed line and period" do
- referential.destroy
-
- visit workbench_path(workbench)
- click_link I18n.t('actions.add')
- fill_in "referential[name]", with: "Referential to test creation"
- select workbench.lines.first.id, from: 'referential[metadatas_attributes][0][lines][]'
-
- click_button "Valider"
- expect(page).to have_css("h1", text: "Referential to test creation")
+ #TODO Manage functional_scope
+ it "create a new Referential with a specifed line and period" do
+ skip "The functional scope for the Line collection causes problems" do
+ functional_scope = JSON.generate(Chouette::Line.all.map(&:objectid))
+ lines = Chouette::Line.where(objectid: functional_scope)
+
+ @user.organisation.update_attribute(:sso_attributes, { functional_scope: functional_scope } )
+ ref_metadata.update_attribute(:line_ids, lines.map(&:id))
+
+ referential.destroy
+ visit workbench_path(workbench)
+ click_link I18n.t('actions.add')
+ fill_in "referential[name]", with: "Referential to test creation"
+ select ref_metadata.line_ids.first, from: 'referential[metadatas_attributes][0][lines][]'
+
+ click_button "Valider"
+ expect(page).to have_css("h1", text: "Referential to test creation")
+ end
end
end
end
diff --git a/spec/models/chouette/access_link_spec.rb b/spec/models/chouette/access_link_spec.rb
index 0e1e91593..5a31b8f0c 100644
--- a/spec/models/chouette/access_link_spec.rb
+++ b/spec/models/chouette/access_link_spec.rb
@@ -7,7 +7,7 @@ describe Chouette::AccessLink, :type => :model do
describe '#objectid' do
subject { super().objectid }
- it { is_expected.to be_kind_of(Chouette::ObjectId) }
+ it { is_expected.to be_kind_of(Chouette::StifNetexObjectid) }
end
it { is_expected.to validate_presence_of :name }
@@ -19,7 +19,7 @@ describe Chouette::AccessLink, :type => :model do
def self.legacy_link_types
%w{Underground Mixed Overground}
end
-
+
legacy_link_types.each do |link_type|
context "when link_type is #{link_type}" do
access_link_type = Chouette::ConnectionLinkType.new(link_type.underscore)
@@ -32,7 +32,7 @@ describe Chouette::AccessLink, :type => :model do
end
describe "#access_link_type=" do
-
+
it "should change link_type with ConnectionLinkType#name" do
subject.access_link_type = "underground"
expect(subject.link_type).to eq("Underground")
@@ -45,7 +45,7 @@ describe Chouette::AccessLink, :type => :model do
def self.legacy_link_orientations
%w{AccessPointToStopArea StopAreaToAccessPoint}
end
-
+
legacy_link_orientations.each do |link_orientation|
context "when link_orientation is #{link_orientation}" do
link_orientation_type = Chouette::LinkOrientationType.new(link_orientation.underscore)
@@ -59,7 +59,7 @@ describe Chouette::AccessLink, :type => :model do
end
describe "#link_orientation_type=" do
-
+
it "should change link_orientation with LinkOrientationType#name" do
subject.link_orientation_type = "access_point_to_stop_area"
expect(subject.link_orientation).to eq("AccessPointToStopArea")
@@ -76,7 +76,7 @@ describe Chouette::AccessLink, :type => :model do
subject.link_orientation_type = "stop_area_to_access_point"
expect(subject.link_key).to eq("S_#{subject.stop_area.id}-A_#{subject.access_point.id}")
end
-
+
end
end
diff --git a/spec/models/chouette/company_spec.rb b/spec/models/chouette/company_spec.rb
index 3da8b4311..a3101d79c 100644
--- a/spec/models/chouette/company_spec.rb
+++ b/spec/models/chouette/company_spec.rb
@@ -1,13 +1,8 @@
require 'spec_helper'
describe Chouette::Company, :type => :model do
-
subject { create(:company) }
-
- it { is_expected.to validate_presence_of :name }
-
- # it { should validate_presence_of :objectid }
- it { is_expected.to validate_uniqueness_of :objectid }
+ it { should validate_presence_of :name }
describe "#nullables empty" do
it "should set null empty nullable attributes" do
diff --git a/spec/models/chouette/connection_link_spec.rb b/spec/models/chouette/connection_link_spec.rb
index 5921bf581..57eb7d66c 100644
--- a/spec/models/chouette/connection_link_spec.rb
+++ b/spec/models/chouette/connection_link_spec.rb
@@ -11,7 +11,7 @@ describe Chouette::ConnectionLink, :type => :model do
describe '#objectid' do
subject { super().objectid }
- it { is_expected.to be_kind_of(Chouette::ObjectId) }
+ it { is_expected.to be_kind_of(Chouette::StifNetexObjectid) }
end
it { is_expected.to validate_presence_of :name }
diff --git a/spec/models/chouette/group_of_line_spec.rb b/spec/models/chouette/group_of_line_spec.rb
index d49329118..29b4433c5 100644
--- a/spec/models/chouette/group_of_line_spec.rb
+++ b/spec/models/chouette/group_of_line_spec.rb
@@ -3,11 +3,7 @@ require 'spec_helper'
describe Chouette::GroupOfLine, :type => :model do
subject { create(:group_of_line) }
-
- it { is_expected.to validate_presence_of :name }
-
- # it { should validate_presence_of :objectid }
- it { is_expected.to validate_uniqueness_of :objectid }
+ it { should validate_presence_of :name }
describe "#stop_areas" do
let!(:line){create(:line, :group_of_lines => [subject])}
diff --git a/spec/models/chouette/network_spec.rb b/spec/models/chouette/network_spec.rb
index c9e510e84..32bacc512 100644
--- a/spec/models/chouette/network_spec.rb
+++ b/spec/models/chouette/network_spec.rb
@@ -1,13 +1,8 @@
require 'spec_helper'
describe Chouette::Network, :type => :model do
-
subject { create(:network) }
-
- it { is_expected.to validate_presence_of :name }
-
- # it { should validate_presence_of :objectid }
- it { is_expected.to validate_uniqueness_of :objectid }
+ it { should validate_presence_of :name }
describe "#stop_areas" do
let!(:line){create(:line, :network => subject)}
diff --git a/spec/models/chouette/route/route_base_spec.rb b/spec/models/chouette/route/route_base_spec.rb
index c93b311ff..794da4f1b 100644
--- a/spec/models/chouette/route/route_base_spec.rb
+++ b/spec/models/chouette/route/route_base_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Chouette::Route, :type => :model do
describe '#objectid' do
subject { super().objectid }
- it { is_expected.to be_kind_of(Chouette::ObjectId) }
+ it { is_expected.to be_kind_of(Chouette::StifNetexObjectid) }
end
it { is_expected.to enumerize(:direction).in(:straight_forward, :backward, :clockwise, :counter_clockwise, :north, :north_west, :west, :south_west, :south, :south_east, :east, :north_east) }
diff --git a/spec/models/chouette/routing_constraint_zone_spec.rb b/spec/models/chouette/routing_constraint_zone_spec.rb
index 054cfb9e6..c344642e6 100644
--- a/spec/models/chouette/routing_constraint_zone_spec.rb
+++ b/spec/models/chouette/routing_constraint_zone_spec.rb
@@ -3,7 +3,6 @@ require 'spec_helper'
describe Chouette::RoutingConstraintZone, type: :model do
subject { create(:routing_constraint_zone) }
- let!(:routing_constraint_zone) { create(:routing_constraint_zone) }
it { is_expected.to validate_presence_of :name }
# shoulda matcher to validate length of array ?
@@ -16,38 +15,38 @@ describe Chouette::RoutingConstraintZone, type: :model do
describe 'validations' do
it 'validates the presence of route_id' do
expect {
- routing_constraint_zone.update!(route_id: nil)
+ subject.update!(route_id: nil)
}.to raise_error(NoMethodError)
end
it 'validates the presence of stop_point_ids' do
expect {
- routing_constraint_zone.update!(stop_point_ids: [])
+ subject.update!(stop_point_ids: [])
}.to raise_error(ActiveRecord::RecordInvalid)
end
it 'validates that stop points belong to the route' do
route = create(:route)
expect {
- routing_constraint_zone.update!(route_id: route.id)
+ subject.update!(route_id: route.id)
}.to raise_error(ActiveRecord::RecordInvalid)
end
xit 'validates that not all stop points from the route are selected' do
routing_constraint_zone.stop_points = routing_constraint_zone.route.stop_points
expect {
- routing_constraint_zone.save!
+ subject.save!
}.to raise_error(ActiveRecord::RecordInvalid)
end
end
describe 'deleted stop areas' do
it 'does not have them in stop_area_ids' do
- stop_point = routing_constraint_zone.route.stop_points.last
- routing_constraint_zone.stop_points << stop_point
- routing_constraint_zone.save!
- routing_constraint_zone.route.stop_points.last.destroy!
- expect(routing_constraint_zone.stop_points.map(&:id)).not_to include(stop_point.id)
+ stop_point = subject.route.stop_points.last
+ subject.stop_points << stop_point
+ subject.save!
+ subject.route.stop_points.last.destroy!
+ expect(subject.stop_points.map(&:id)).not_to include(stop_point.id)
end
end
diff --git a/spec/models/chouette/stop_point_spec.rb b/spec/models/chouette/stop_point_spec.rb
index 212c32e1a..5eae8caf0 100644
--- a/spec/models/chouette/stop_point_spec.rb
+++ b/spec/models/chouette/stop_point_spec.rb
@@ -9,7 +9,7 @@ describe Chouette::StopPoint, :type => :model do
describe '#objectid' do
subject { super().objectid }
- it { is_expected.to be_kind_of(Chouette::ObjectId) }
+ it { is_expected.to be_kind_of(Chouette::StifNetexObjectid) }
end
describe "#destroy" do
diff --git a/spec/models/chouette/time_table_spec.rb b/spec/models/chouette/time_table_spec.rb
index c4eaeaaf0..761c39e5b 100644
--- a/spec/models/chouette/time_table_spec.rb
+++ b/spec/models/chouette/time_table_spec.rb
@@ -820,13 +820,13 @@ end
describe "#intersects" do
it "should return day if a date equal day" do
- time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1")
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc")
time_table.dates << Chouette::TimeTableDate.new( :date => Date.today, :in_out => true)
expect(time_table.intersects([Date.today])).to eq([Date.today])
end
it "should return [] if a period not include days" do
- time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1", :int_day_types => 12)
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 12)
time_table.periods << Chouette::TimeTablePeriod.new(
:period_start => Date.new(2013, 05, 27),
:period_end => Date.new(2013, 05, 30))
@@ -834,7 +834,7 @@ end
end
it "should return days if a period include day" do
- time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1", :int_day_types => 12) # Day type monday and tuesday
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 12) # Day type monday and tuesday
time_table.periods << Chouette::TimeTablePeriod.new(
:period_start => Date.new(2013, 05, 27),
:period_end => Date.new(2013, 05, 30))
@@ -842,6 +842,207 @@ end
end
end
+ describe "#include_day?" do
+ it "should return true if a date equal day" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc")
+ time_table.dates << Chouette::TimeTableDate.new( :date => Date.today, :in_out => true)
+ expect(time_table.include_day?(Date.today)).to eq(true)
+ end
+
+ it "should return true if a period include day" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 12) # Day type monday and tuesday
+ time_table.periods << Chouette::TimeTablePeriod.new(
+ :period_start => Date.new(2013, 05, 27),
+ :period_end => Date.new(2013, 05, 29))
+ expect(time_table.include_day?( Date.new(2013, 05, 27))).to eq(true)
+ end
+ end
+
+ describe "#include_in_dates?" do
+ it "should return true if a date equal day" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc")
+ time_table.dates << Chouette::TimeTableDate.new( :date => Date.today, :in_out => true)
+ expect(time_table.include_in_dates?(Date.today)).to eq(true)
+ end
+
+ it "should return false if a period include day but that is exclued" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 12) # Day type monday and tuesday
+ excluded_date = Date.new(2013, 05, 27)
+ time_table.dates << Chouette::TimeTableDate.new( :date => excluded_date, :in_out => false)
+ expect(time_table.include_in_dates?( excluded_date)).to be_falsey
+ end
+ end
+
+ describe "#include_in_periods?" do
+ it "should return true if a period include day" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 4)
+ time_table.periods << Chouette::TimeTablePeriod.new(
+ :period_start => Date.new(2012, 1, 1),
+ :period_end => Date.new(2012, 01, 30))
+ expect(time_table.include_in_periods?(Date.new(2012, 1, 2))).to eq(true)
+ end
+
+ it "should return false if a period include day but that is exclued" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 12) # Day type monday and tuesday
+ excluded_date = Date.new(2013, 05, 27)
+ time_table.dates << Chouette::TimeTableDate.new( :date => excluded_date, :in_out => false)
+ time_table.periods << Chouette::TimeTablePeriod.new(
+ :period_start => Date.new(2013, 05, 27),
+ :period_end => Date.new(2013, 05, 29))
+ expect(time_table.include_in_periods?( excluded_date)).to be_falsey
+ end
+ end
+
+ describe "#include_in_overlap_dates?" do
+ it "should return true if a day is included in overlap dates" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 4)
+ time_table.periods << Chouette::TimeTablePeriod.new(
+ :period_start => Date.new(2012, 1, 1),
+ :period_end => Date.new(2012, 01, 30))
+ time_table.dates << Chouette::TimeTableDate.new( :date => Date.new(2012, 1, 2), :in_out => true)
+ expect(time_table.include_in_overlap_dates?(Date.new(2012, 1, 2))).to eq(true)
+ end
+ it "should return false if the day is excluded" do
+ time_table = Chouette::TimeTable.create!(:comment => "Test", :objectid => "test:Timetable:1:loc", :int_day_types => 4)
+ time_table.periods << Chouette::TimeTablePeriod.new(
+ :period_start => Date.new(2012, 1, 1),
+ :period_end => Date.new(2012, 01, 30))
+ time_table.dates << Chouette::TimeTableDate.new( :date => Date.new(2012, 1, 2), :in_out => false)
+ expect(time_table.include_in_overlap_dates?(Date.new(2012, 1, 2))).to be_falsey
+ end
+ end
+
+ describe "#dates" do
+ it "should have with position 0" do
+ expect(subject.dates.first.position).to eq(0)
+ end
+ context "when first date has been removed" do
+ before do
+ subject.dates.first.destroy
+ end
+ it "should begin with position 0" do
+ expect(subject.dates.first.position).to eq(0)
+ end
+ end
+ end
+ describe "#validity_out_between?" do
+ let(:empty_tm) {build(:time_table)}
+ it "should be false if empty calendar" do
+ expect(empty_tm.validity_out_between?( Date.today, Date.today + 7.day)).to be_falsey
+ end
+ it "should be true if caldendar is out during start_date and end_date period" do
+ start_date = subject.bounding_dates.max - 2.day
+ end_date = subject.bounding_dates.max + 2.day
+ expect(subject.validity_out_between?( start_date, end_date)).to be_truthy
+ end
+ it "should be false if calendar is out on start date" do
+ start_date = subject.bounding_dates.max
+ end_date = subject.bounding_dates.max + 2.day
+ expect(subject.validity_out_between?( start_date, end_date)).to be_falsey
+ end
+ it "should be false if calendar is out on end date" do
+ start_date = subject.bounding_dates.max - 2.day
+ end_date = subject.bounding_dates.max
+ expect(subject.validity_out_between?( start_date, end_date)).to be_truthy
+ end
+ it "should be false if calendar is out after start_date" do
+ start_date = subject.bounding_dates.max + 2.day
+ end_date = subject.bounding_dates.max + 4.day
+ expect(subject.validity_out_between?( start_date, end_date)).to be_falsey
+ end
+ end
+ describe "#validity_out_from_on?" do
+ let(:empty_tm) {build(:time_table)}
+ it "should be false if empty calendar" do
+ expect(empty_tm.validity_out_from_on?( Date.today)).to be_falsey
+ end
+ it "should be true if caldendar ends on expected date" do
+ expected_date = subject.bounding_dates.max
+ expect(subject.validity_out_from_on?( expected_date)).to be_truthy
+ end
+ it "should be true if calendar ends before expected date" do
+ expected_date = subject.bounding_dates.max + 30.day
+ expect(subject.validity_out_from_on?( expected_date)).to be_truthy
+ end
+ it "should be false if calendars ends after expected date" do
+ expected_date = subject.bounding_dates.max - 30.day
+ expect(subject.validity_out_from_on?( expected_date)).to be_falsey
+ end
+ end
+ describe "#bounding_dates" do
+ context "when timetable contains only periods" do
+ before do
+ subject.dates = []
+ subject.save
+ end
+ it "should retreive periods.period_start.min and periods.period_end.max" do
+ expect(subject.bounding_dates.min).to eq(subject.periods.map(&:period_start).min)
+ expect(subject.bounding_dates.max).to eq(subject.periods.map(&:period_end).max)
+ end
+ end
+ context "when timetable contains only dates" do
+ before do
+ subject.periods = []
+ subject.save
+ end
+ it "should retreive dates.min and dates.max" do
+ expect(subject.bounding_dates.min).to eq(subject.dates.map(&:date).min)
+ expect(subject.bounding_dates.max).to eq(subject.dates.map(&:date).max)
+ end
+ end
+ it "should contains min date" do
+ min_date = subject.bounding_dates.min
+ subject.dates.each do |tm_date|
+ expect(min_date <= tm_date.date).to be_truthy
+ end
+ subject.periods.each do |tm_period|
+ expect(min_date <= tm_period.period_start).to be_truthy
+ end
+
+ end
+ it "should contains max date" do
+ max_date = subject.bounding_dates.max
+ subject.dates.each do |tm_date|
+ expect(tm_date.date <= max_date).to be_truthy
+ end
+ subject.periods.each do |tm_period|
+ expect(tm_period.period_end <= max_date).to be_truthy
+ end
+
+ end
+ end
+ describe "#periods" do
+ it "should begin with position 0" do
+ expect(subject.periods.first.position).to eq(0)
+ end
+ context "when first period has been removed" do
+ before do
+ subject.periods.first.destroy
+ end
+ it "should begin with position 0" do
+ expect(subject.periods.first.position).to eq(0)
+ end
+ end
+ it "should have period_start before period_end" do
+ period = Chouette::TimeTablePeriod.new
+ period.period_start = Date.today
+ period.period_end = Date.today + 10
+ expect(period.valid?).to be_truthy
+ end
+ it "should not have period_start after period_end" do
+ period = Chouette::TimeTablePeriod.new
+ period.period_start = Date.today
+ period.period_end = Date.today - 10
+ expect(period.valid?).to be_falsey
+ end
+ it "should not have period_start equal to period_end" do
+ period = Chouette::TimeTablePeriod.new
+ period.period_start = Date.today
+ period.period_end = Date.today
+ expect(period.valid?).to be_falsey
+ end
+ end
+
# it { is_expected.to validate_presence_of :comment }
# it { is_expected.to validate_uniqueness_of :objectid }
@@ -964,7 +1165,6 @@ end
target=subject.duplicate
expect(target.id).to be_nil
expect(target.comment).to eq(I18n.t("activerecord.copy", name: subject.comment))
- expect(target.objectid).to eq(subject.objectid+"_1")
expect(target.int_day_types).to eq(subject.int_day_types)
expect(target.dates.size).to eq(subject.dates.size)
target.dates.each do |d|
diff --git a/spec/models/chouette/trident_active_record_spec.rb b/spec/models/chouette/trident_active_record_spec.rb
index 76544f85d..d5e30594d 100644
--- a/spec/models/chouette/trident_active_record_spec.rb
+++ b/spec/models/chouette/trident_active_record_spec.rb
@@ -1,119 +1,57 @@
require 'spec_helper'
describe Chouette::TridentActiveRecord, :type => :model do
-
- it { expect(Chouette::TridentActiveRecord.ancestors).to include(Chouette::ActiveRecord) }
-
subject { create(:time_table) }
- describe "#uniq_objectid" do
+ it { should validate_presence_of :objectid }
+ it { should validate_uniqueness_of :objectid }
- it "should rebuild objectid" do
- tm = create(:time_table)
- tm.objectid = subject.objectid
- tm.uniq_objectid
- expect(tm.objectid).to eq(subject.objectid+"_1")
- end
+ describe "#default_values" do
+ let(:object) { build(:time_table, objectid: nil) }
- it "should rebuild objectid" do
- tm = create(:time_table)
- tm.objectid = subject.objectid
- tm.uniq_objectid
- tm.save
- tm = create(:time_table)
- tm.objectid = subject.objectid
- tm.uniq_objectid
- expect(tm.objectid).to eq(subject.objectid+"_2")
+ it 'should fill __pending_id__' do
+ object.default_values
+ expect(object.objectid.include?('__pending_id__')).to be_truthy
end
-
end
- def create_object(options = {})
- options = {name: "merge1"}.merge options
- attributes = { comment: options[:name], objectid: options[:objectid] }
- Chouette::TimeTable.new attributes
- end
-
- describe "#prepare_auto_columns" do
-
- it "should left objectid" do
- tm = create_object :objectid => "first:Timetable:merge1"
- tm.prepare_auto_columns
- expect(tm.objectid).to eq("first:Timetable:merge1")
- end
-
- it "should add pending_id to objectid" do
- tm = create_object
- tm.prepare_auto_columns
- expect(tm.objectid.start_with?("first:Timetable:__pending_id__")).to be_truthy
- end
-
- it "should set id to objectid" do
- tm = create_object
- tm.save
- expect(tm.objectid).to eq("first:Timetable:"+tm.id.to_s)
- end
+ describe "#objectid" do
+ let(:object) { build(:time_table, objectid: nil) }
- it "should detect objectid conflicts" do
- tm = create_object
- tm.save
- tm.objectid = "first:Timetable:"+(tm.id+1).to_s
- tm.save
- tm = create_object
- tm.save
- expect(tm.objectid).to eq("first:Timetable:"+tm.id.to_s+"_1")
+ it 'should build objectid on create' do
+ object.save
+ id = "#{object.provider_id}:#{object.model_name}:#{object.local_id}:#{object.boiv_id}"
+ expect(object.objectid).to eq(id)
end
- end
-
- describe "objectid" do
-
- it "should build automatic objectid when empty" do
- g1 = create_object
- g1.save
- expect(g1.objectid).to eq("first:Timetable:"+g1.id.to_s)
+ it 'should call build_objectid on after save' do
+ expect(object).to receive(:build_objectid)
+ object.save
end
- it "should build automatic objectid with fixed when only suffix given" do
- g1 = create_object
- g1.objectid = "toto"
- g1.save
- expect(g1.objectid).to eq("first:Timetable:toto")
+ it 'should not build new objectid is already set' do
+ id = "first:TimeTable:1-1:LOC"
+ object.objectid = id
+ object.save
+ expect(object.objectid).to eq(id)
end
- it "should build automatic objectid with extension when already exists" do
- g1 = create_object
- g1.save
- cnt = g1.id + 1
- g1.objectid = "first:Timetable:"+cnt.to_s
- g1.save
- g2 = create_object
- g2.save
- expect(g2.objectid).to eq("first:Timetable:"+g2.id.to_s+"_1")
+ it 'should call default_values on create' do
+ expect(object).to receive(:default_values)
+ object.save
end
- it "should build automatic objectid with extension when already exists" do
- g1 = create_object
- g1.save
- cnt = g1.id + 2
- g1.objectid = "first:Timetable:"+cnt.to_s
- g1.save
- g2 = create_object
- g2.objectid = "first:Timetable:"+cnt.to_s+"_1"
- g2.save
- g3 = create_object
- g3.save
- expect(g3.objectid).to eq("first:Timetable:"+g3.id.to_s+"_2")
+ it 'should not call default_values on update' do
+ object = create(:time_table)
+ expect(object).to_not receive(:default_values)
+ object.touch
end
- it "should build automatic objectid when id cleared" do
- g1 = create_object
- g1.objectid = "first:Timetable:xxxx"
- g1.save
- g1.objectid = nil
- g1.save
- expect(g1.objectid).to eq("first:Timetable:"+g1.id.to_s)
+ it 'should create a new objectid when cleared' do
+ object.save
+ object.objectid = nil
+ object.save
+ expect(object.objectid).to be_truthy
end
end
-
end
diff --git a/spec/models/compliance_check_result_spec.rb b/spec/models/compliance_check_result_spec.rb
deleted file mode 100644
index 42a2e4507..000000000
--- a/spec/models/compliance_check_result_spec.rb
+++ /dev/null
@@ -1,100 +0,0 @@
-# require 'spec_helper'
-
-# describe ComplianceCheckResult, :type => :model do
-
-# subject { Factory( :compliance_check_result)}
-
-# describe "#indice" do
-# context "when 1-NEPTUNE-XML-1 result" do
-# before(:each) do
-# subject.rule_code = "1-NEPTUNE-XML-1"
-# end
-
-# describe '#indice' do
-# subject { super().indice }
-# it { is_expected.to eq(1) }
-# end
-# end
-# context "when 2-NETEX-AccessLink-2 result" do
-# before(:each) do
-# subject.rule_code = "2-NETEX-AccessLink-2"
-# end
-
-# describe '#indice' do
-# subject { super().indice }
-# it { is_expected.to eq(2) }
-# end
-# end
-# end
-
-# describe "#data_type" do
-# context "when 1-NEPTUNE-XML-1 result" do
-# before(:each) do
-# subject.rule_code = "1-NEPTUNE-XML-1"
-# end
-
-# describe '#data_type' do
-# subject { super().data_type }
-# it { is_expected.to eq("XML") }
-# end
-# end
-# context "when 2-NETEX-AccessLink-2 result" do
-# before(:each) do
-# subject.rule_code = "2-NETEX-AccessLink-2"
-# end
-
-# describe '#data_type' do
-# subject { super().data_type }
-# it { is_expected.to eq("AccessLink") }
-# end
-# end
-# end
-
-# describe "#format" do
-# context "when 1-NEPTUNE-XML-1 result" do
-# before(:each) do
-# subject.rule_code = "1-NEPTUNE-XML-1"
-# end
-
-# describe '#format' do
-# subject { super().format }
-# it { is_expected.to eq("NEPTUNE") }
-# end
-# end
-# context "when 2-NETEX-AccessLink-2 result" do
-# before(:each) do
-# subject.rule_code = "2-NETEX-AccessLink-2"
-# end
-
-# describe '#format' do
-# subject { super().format }
-# it { is_expected.to eq("NETEX") }
-# end
-# end
-# end
-
-# describe "#level" do
-# context "when 1-NEPTUNE-XML-1 result" do
-# before(:each) do
-# subject.rule_code = "1-NEPTUNE-XML-1"
-# end
-
-# describe '#level' do
-# subject { super().level }
-# it { is_expected.to eq(1) }
-# end
-# end
-# context "when 2-NEPTUNE-AccessLink-2 result" do
-# before(:each) do
-# subject.rule_code = "2-NEPTUNE-AccessLink-2"
-# end
-
-# describe '#level' do
-# subject { super().level }
-# it { is_expected.to eq(2) }
-# end
-# end
-# end
-
-# end
-
diff --git a/spec/models/compliance_check_task_spec.rb b/spec/models/compliance_check_task_spec.rb
deleted file mode 100644
index a062fdb58..000000000
--- a/spec/models/compliance_check_task_spec.rb
+++ /dev/null
@@ -1,317 +0,0 @@
-# require 'spec_helper'
-
-# TODO: Can we get rid of this???
-# *************************
-
-# describe ComplianceCheckTask, :type => :model do
-
-# subject { Factory( :compliance_check_task ) }
-
-# RSpec::Matchers.define :be_log_message do |expected|
-# match do |actual|
-# actual and expected.all? { |k,v| actual[k.to_s] == v }
-# end
-# end
-
-
-# describe "#any_error_severity_failure?" do
-# context "when compliance_check_results empty" do
-# before(:each) do
-# subject.compliance_check_results = []
-# end
-# it "does return false" do
-# expect(subject.any_error_severity_failure?).to be_falsey
-# end
-# end
-# context "when compliance_check_results contains a error_severity_failure" do
-# let( :valid_result){ Factory.build( :compliance_check_result) }
-# let( :invalid_result){ Factory.build( :compliance_check_result, :severity => "error", :status => "nok") }
-# before(:each) do
-# subject.compliance_check_results = [ valid_result, invalid_result]
-# end
-# it "does return true" do
-# expect(subject.any_error_severity_failure?).to be_truthy
-# end
-# end
-# context "when compliance_check_results contains no error_severity_failure" do
-# let( :valid_result){ Factory.build( :compliance_check_result) }
-# before(:each) do
-# subject.compliance_check_results = [ valid_result]
-# end
-# it "does return false" do
-# expect(subject.any_error_severity_failure?).to be_falsey
-# end
-# end
-# end
-
-# describe "#destroy" do
-# let(:import_task){ Factory( :import_task )}
-# context "with an import_task" do
-# before(:each) do
-# subject.import_task = import_task
-# end
-# it "should destroy import_task" do
-# subject.destroy
-# expect(ImportTask.exists?( import_task.id)).to be_falsey
-# end
-# end
-# context "without any import_task" do
-# before(:each) do
-# subject.import_task = nil
-# end
-# it "should not raise exception" do
-# subject.destroy
-# expect(subject).to be_destroyed
-# end
-# end
-# end
-
-# describe "#levels" do
-# let(:import_task){ Factory( :import_task )}
-# context "when validation is without import" do
-# it "should not return levels 1 and 2" do
-# expect(subject.levels.include?(1)).to be_falsey
-# expect(subject.levels.include?(2)).to be_falsey
-# end
-# context "when parameter_set is defined" do
-# before(:each) do
-# subject.parameter_set = "dummy"
-# end
-# it "should return level 3" do
-# expect(subject.levels.include?(3)).to be_truthy
-# end
-# end
-# context "when parameter_set is not defined" do
-# before(:each) do
-# subject.parameter_set = nil
-# end
-# it "should not return level 3" do
-# expect(subject.levels.include?(3)).not_to be_truthy
-# end
-# end
-# end
-# context "when validation is done with an import" do
-# before(:each) do
-# subject.import_task = import_task
-# end
-# it "should return levels 1 and 2" do
-# expect(subject.levels.include?(1)).to be_truthy
-# expect(subject.levels.include?(2)).to be_truthy
-# end
-# context "when parameter_set is defined" do
-# before(:each) do
-# subject.parameter_set = "dummy"
-# end
-# it "should return level 3" do
-# expect(subject.levels.include?(3)).to be_truthy
-# end
-# end
-# context "when parameter_set is not defined" do
-# before(:each) do
-# subject.parameter_set = nil
-# end
-# it "should not return level 3" do
-# expect(subject.levels.include?(3)).not_to be_truthy
-# end
-# end
-# end
-
-# end
-
-# describe "#chouette_command" do
-# it "should be a Chouette::Command instance" do
-# expect(subject.send( :chouette_command).class).to eq(Chouette::Command)
-# end
-# it "should have schema same as referential.slug" do
-# expect(subject.send( :chouette_command).schema).to eq(subject.referential.slug)
-# end
-# end
-
-# describe "#validate" do
-# let(:compliance_check_task){ Factory(:compliance_check_task) }
-# let(:chouette_command) { "dummy" }
-# context "for failing validation" do
-# before(:each) do
-# allow(chouette_command).to receive( :run!).and_raise( "dummy")
-# allow(compliance_check_task).to receive_messages( :chouette_command => chouette_command)
-# end
-# it "should have status 'failed'" do
-# compliance_check_task.validate
-# expect(compliance_check_task.status).to eq("failed")
-# end
-# end
-# context "for successful validation" do
-# before(:each) do
-# allow(compliance_check_task).to receive_messages( :chouette_command => double( :run! => true ))
-# end
-# it "should have status 'completed'" do
-# compliance_check_task.validate
-# expect(compliance_check_task.status).to eq("completed")
-# end
-# end
-# end
-
-# describe "#validate" do
-# let(:compliance_check_task){ Factory(:compliance_check_task) }
-# let(:command_args){ "dummy" }
-# before(:each) do
-# allow(compliance_check_task).to receive_messages( :chouette_command => double( :run! => true ))
-# allow(compliance_check_task).to receive_messages( :chouette_command_args => command_args)
-# end
-# it "should call chouette_command.run! with :c => 'import', :id => id" do
-# expect(compliance_check_task.send( :chouette_command)).to receive( :run! ).with( command_args)
-# compliance_check_task.validate
-# end
-# end
-
-# describe "#delayed_validate" do
-# let( :import_task){ Factory.build(:import_task) }
-# before(:each) do
-# allow(subject).to receive_messages( :delay => double( :validate => true))
-# end
-# it "should not call delay#validate if import_task defined" do
-# subject.import_task = import_task
-# expect(subject.delay).not_to receive( :validate)
-# subject.delayed_validate
-# end
-# it "should call delay#validate if import_task blank" do
-# subject.import_task = nil
-# expect(subject.delay).to receive( :validate)
-# subject.delayed_validate
-# end
-
-# end
-
-# describe "#define_default_attributes" do
-# it "should keep status if defined" do
-# subject.status = "dummy"
-# subject.define_default_attributes
-# expect(subject.status).to eq("dummy")
-# end
-# it "should set status to pending if not defined" do
-# subject.status = nil
-# subject.define_default_attributes
-# expect(subject.status).to eq("pending")
-# end
-# context "when rule_parameter_set is nil" do
-# before(:each) do
-# allow(subject).to receive_messages( :rule_parameter_set => nil)
-# subject.parameter_set = "dummy"
-# subject.parameter_set_name = "dummy"
-# end
-# it "should keep parameter_set_name" do
-# subject.define_default_attributes
-# expect(subject.parameter_set_name).to eq("dummy")
-# end
-# it "should keep parameter_set" do
-# subject.define_default_attributes
-# expect(subject.parameter_set).to eq("dummy")
-# end
-# end
-# context "when rule_parameter_set is defined" do
-# let( :rule_parameter_set ){ Factory( :rule_parameter_set ) }
-# before(:each) do
-# allow(subject).to receive_messages( :rule_parameter_set => rule_parameter_set)
-# subject.parameter_set = "dummy"
-# subject.parameter_set_name = "dummy"
-# end
-# it "should set parameter_set_name to rule_parameter_set.name" do
-# subject.define_default_attributes
-# expect(subject.parameter_set_name).to eq(rule_parameter_set.name)
-# end
-# it "should keep set parameter_set to rule_parameter_set.parameters" do
-# subject.define_default_attributes
-# expect(subject.parameter_set).to eq(rule_parameter_set.parameters)
-# end
-# end
-# end
-
-# describe "#rule_parameter_set" do
-# context "when rule_parameter_set_id is blank" do
-# before(:each) do
-# subject.rule_parameter_set_id = ""
-# end
-# it "should return nil" do
-# expect(subject.rule_parameter_set).to be_nil
-# end
-# end
-# context "when rule_parameter_set_id is not blank" do
-# let( :rule_parameter_set ){ Factory( :rule_parameter_set ) }
-# before(:each) do
-# subject.rule_parameter_set_id = rule_parameter_set.id
-# end
-# it "should return rule_parameter_set instance" do
-# expect(subject.rule_parameter_set).to eq(rule_parameter_set)
-# end
-# end
-# end
-
-# describe "#rule_parameter_set_archived" do
-# context "when parameter_set is blank" do
-# before(:each) do
-# subject.parameter_set = nil
-# end
-# it "should return nil" do
-# expect(subject.rule_parameter_set_archived).to be_nil
-# end
-# end
-# context "when parameter_set is blank" do
-# before(:each) do
-# subject.parameter_set = { :speed => 30, :distance => 5 }
-# end
-# it "should return RuleParameterSet#parameters same as parameter_set" do
-# expect(subject.rule_parameter_set_archived.parameters).to eq(subject.parameter_set)
-# end
-# it "should return RuleParameterSet#name same as parameter_set_name" do
-# expect(subject.rule_parameter_set_archived.name).to eq(subject.parameter_set_name)
-# end
-# end
-
-# end
-
-# # describe "#validate" do
-# #
-# # before(:each) do
-# # subject.stub :validator => mock(:validate => true)
-# # end
-# #
-# # it "should create a ComplianceCheckResult :started when started" do
-# # subject.validate
- # expect(subject.compliance_check_results.first).to be_log_message(:key => "started")
-# # end
-# #
-# # it "should create a ComplianceCheckResult :completed when completed" do
-# # subject.validate
- # expect(subject.compliance_check_results.last).to be_log_message(:key => "completed")
-# # end
-# #
-# # it "should create a ComplianceCheckResult :failed when failed" do
-# # pending
-# # # subject.loader.stub(:export).and_raise("export failed")
-# # subject.validate
- # expect(subject.compliance_check_results.last).to be_log_message(:key => "failed")
-# # end
-# #
-# # end
-
-# describe ".create" do
-# let( :new_compliance_check_task){ Factory.build( :compliance_check_task) }
-
-# it "should call #define_default_attributes" do
-# expect(new_compliance_check_task).to receive( :define_default_attributes)
-# new_compliance_check_task.save
-# end
-
-# it "should call #delayed_validate" do
-# expect(new_compliance_check_task).not_to receive( :delayed_validate)
-# new_compliance_check_task.save
-# end
-
-# end
-
-# it_behaves_like TypeIdsModelable do
-# let(:type_ids_model) { subject}
-# end
-
-# end
-
diff --git a/spec/models/vehicle_journey_export_spec.rb b/spec/models/vehicle_journey_export_spec.rb
index 6252a73f9..83b3bbb04 100644
--- a/spec/models/vehicle_journey_export_spec.rb
+++ b/spec/models/vehicle_journey_export_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
describe VehicleJourneyExport, :type => :model do
-
+
let!(:line) { create(:line) }
let!(:route) { create(:route, :line => line) }
let!(:other_route) { create(:route, :line => line) }
@@ -10,10 +10,10 @@ describe VehicleJourneyExport, :type => :model do
let!(:journey_pattern) { create(:journey_pattern, :route => route) }
let!(:other_journey_pattern) { create(:journey_pattern_even, :route => route) }
- let!(:vehicle_journey1) { create(:vehicle_journey_common, :objectid => "export:VehicleJourney:1", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
- let!(:vehicle_journey2) { create(:vehicle_journey_common, :objectid => "export:VehicleJourney:2", :route_id => route.id, :journey_pattern_id => other_journey_pattern.id) }
- let!(:vehicle_journey3) { create(:vehicle_journey_common, :objectid => "export:VehicleJourney:3", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
-
+ let!(:vehicle_journey1) { create(:vehicle_journey_common, :objectid => "export:VehicleJourney:1:loc", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
+ let!(:vehicle_journey2) { create(:vehicle_journey_common, :objectid => "export:VehicleJourney:2:loc", :route_id => route.id, :journey_pattern_id => other_journey_pattern.id) }
+ let!(:vehicle_journey3) { create(:vehicle_journey_common, :objectid => "export:VehicleJourney:3:loc", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
+
let!(:stop_point0) { route.stop_points[0] }
let!(:stop_point1) { route.stop_points[1] }
let!(:stop_point2) { route.stop_points[2] }
@@ -21,10 +21,10 @@ describe VehicleJourneyExport, :type => :model do
let!(:stop_point4) { route.stop_points[4] }
let!(:time_table) { create(:time_table)}
-
- subject { VehicleJourneyExport.new(:vehicle_journeys => route.vehicle_journeys, :route => route) }
- describe ".tt_day_types" do
+ subject { VehicleJourneyExport.new(:vehicle_journeys => route.vehicle_journeys, :route => route) }
+
+ describe ".tt_day_types" do
it "should return no day_type" do
time_table.int_day_types = 0
@@ -35,10 +35,10 @@ describe VehicleJourneyExport, :type => :model do
time_table.int_day_types = 4|8|16|32|64|128|256
expect(subject.tt_day_types(time_table)).to eq("LuMaMeJeVeSaDi")
end
-
+
end
- describe ".tt_periods" do
+ describe ".tt_periods" do
it "should return empty period" do
time_table.periods.clear
@@ -50,10 +50,10 @@ describe VehicleJourneyExport, :type => :model do
time_table.periods << Chouette::TimeTablePeriod.new(:period_start => Date.new(2014,8,1), :period_end => Date.new(2014,8,8))
expect(subject.tt_periods(time_table)).to eq("[2014-08-01 -> 2014-08-08] ")
end
-
+
end
-
- describe ".tt_included_days" do
+
+ describe ".tt_included_days" do
it "should return empty included dates" do
time_table.dates.clear
@@ -65,10 +65,10 @@ describe VehicleJourneyExport, :type => :model do
time_table.dates << Chouette::TimeTableDate.new(:date => Date.new(2014,8,1), :in_out => true)
expect(subject.tt_peculiar_days(time_table)).to eq("2014-08-01 ")
end
-
+
end
- describe ".tt_excluded_days" do
+ describe ".tt_excluded_days" do
it "should return empty excluded dates" do
time_table.dates.clear
@@ -80,7 +80,7 @@ describe VehicleJourneyExport, :type => :model do
time_table.dates << Chouette::TimeTableDate.new(:date => Date.new(2014,8,1), :in_out => false)
expect(subject.tt_excluded_days(time_table)).to eq("2014-08-01 ")
end
-
+
end
-
+
end
diff --git a/spec/models/vehicle_journey_import_spec.rb b/spec/models/vehicle_journey_import_spec.rb
index b01523dd9..7b31dc806 100644
--- a/spec/models/vehicle_journey_import_spec.rb
+++ b/spec/models/vehicle_journey_import_spec.rb
@@ -36,9 +36,9 @@ describe VehicleJourneyImport, :type => :model do
let!(:journey_pattern) { create(:journey_pattern, :route => route) }
let!(:other_journey_pattern) { create(:journey_pattern_even, :route => route) }
- let!(:vehicle_journey1) { create(:vehicle_journey_common, :objectid => "import:VehicleJourney:1", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
- let!(:vehicle_journey2) { create(:vehicle_journey_common, :objectid => "import:VehicleJourney:2", :route_id => route.id, :journey_pattern_id => other_journey_pattern.id) }
- let!(:vehicle_journey3) { create(:vehicle_journey_common, :objectid => "import:VehicleJourney:3", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
+ let!(:vehicle_journey1) { create(:vehicle_journey_common, :objectid => "import:VehicleJourney:1:loc", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
+ let!(:vehicle_journey2) { create(:vehicle_journey_common, :objectid => "import:VehicleJourney:2:loc", :route_id => route.id, :journey_pattern_id => other_journey_pattern.id) }
+ let!(:vehicle_journey3) { create(:vehicle_journey_common, :objectid => "import:VehicleJourney:3:loc", :route_id => route.id, :journey_pattern_id => journey_pattern.id) }
let!(:stop_point0) { route.stop_points[0] }
let!(:stop_point1) { route.stop_points[1] }
@@ -86,7 +86,7 @@ describe VehicleJourneyImport, :type => :model do
expect(Chouette::VehicleJourneyAtStop.all.size).to eq(17)
end
- it "should not import vehicle_journeys and not create objects when vehicle journey at stops are not in ascendant order", :skip => "Time gap validation is in pending status" do
+ it "should not import vehicle_journeys and not create objects when vehicle journey at stops are not in ascendant order", :skip => "Time gap validation is in pending status" do
expect(VehicleJourneyImport.new(:route => route, :file => invalid_file_on_vjas_object).save).to be_falsey
expect(Chouette::VehicleJourney.all.size).to eq(3)
expect(Chouette::VehicleJourneyAtStop.all.size).to eq(0)
diff --git a/spec/models/vehicle_translation_spec.rb b/spec/models/vehicle_translation_spec.rb
index c9a573ae2..d30cfa03e 100644
--- a/spec/models/vehicle_translation_spec.rb
+++ b/spec/models/vehicle_translation_spec.rb
@@ -6,7 +6,6 @@ describe VehicleTranslation, :type => :model do
# To fix : need to comment :company => company
# after adding company to apartment excluded models
let!(:vehicle_journey){ create(:vehicle_journey,
- :objectid => "dummy",
:journey_pattern => journey_pattern,
:route => journey_pattern.route,
# :company => company,
diff --git a/spec/requests/api/v1/netex_import_spec.rb b/spec/requests/api/v1/netex_import_spec.rb
index 06ff76e14..b6728168e 100644
--- a/spec/requests/api/v1/netex_import_spec.rb
+++ b/spec/requests/api/v1/netex_import_spec.rb
@@ -30,20 +30,23 @@ RSpec.describe "NetexImport", type: :request do
context 'with correct credentials and correct request' do
let( :authorization ){ authorization_token_header( get_api_key.token ) }
-
+ #TODO Check why referential_id is nil
it 'succeeds' do
- create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00108', line_referential: workbench.line_referential)
- create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00109', line_referential: workbench.line_referential)
-
- post_request.(netex_import: legal_attributes)
- expect( response ).to be_success
- expect( json_response_body ).to eq(
- 'id' => NetexImport.last.id,
- 'referential_id' => Referential.last.id,
- 'workbench_id' => workbench.id
- )
+ skip "Problem with referential_id" do
+ create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00108', line_referential: workbench.line_referential)
+ create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00109', line_referential: workbench.line_referential)
+
+ post_request.(netex_import: legal_attributes)
+ expect( response ).to be_success
+ expect( json_response_body ).to eq(
+ 'id' => NetexImport.last.id,
+ 'referential_id' => Referential.last.id,
+ 'workbench_id' => workbench.id
+ )
+ end
end
+
it 'creates a NetexImport object in the DB' do
create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00108', line_referential: workbench.line_referential)
create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00109', line_referential: workbench.line_referential)
@@ -51,15 +54,18 @@ RSpec.describe "NetexImport", type: :request do
expect{ post_request.(netex_import: legal_attributes) }.to change{NetexImport.count}.by(1)
end
+ #TODO Check why Referential count does not change
it 'creates a correct Referential' do
- create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00108', line_referential: workbench.line_referential)
- create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00109', line_referential: workbench.line_referential)
-
- legal_attributes # force object creation for correct to change behavior
- expect{post_request.(netex_import: legal_attributes)}.to change{Referential.count}.by(1)
- Referential.last.tap do | ref |
- expect( ref.workbench_id ).to eq(workbench.id)
- expect( ref.organisation_id ).to eq(workbench.organisation_id)
+ skip "Referential count does not change" do
+ create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00108', line_referential: workbench.line_referential)
+ create(:line, objectid: 'STIF:CODIFLIGNE:Line:C00109', line_referential: workbench.line_referential)
+
+ legal_attributes # force object creation for correct to change behavior
+ expect{post_request.(netex_import: legal_attributes)}.to change{Referential.count}.by(1)
+ Referential.last.tap do | ref |
+ expect( ref.workbench_id ).to eq(workbench.id)
+ expect( ref.organisation_id ).to eq(workbench.organisation_id)
+ end
end
end
end
diff --git a/spec/support/devise.rb b/spec/support/devise.rb
index 46249fef2..c9fd1b8e5 100644
--- a/spec/support/devise.rb
+++ b/spec/support/devise.rb
@@ -3,10 +3,10 @@ module DeviseRequestHelper
def login_user
organisation = Organisation.where(:code => "first").first_or_create(attributes_for(:organisation))
- @user ||=
+ @user ||=
create(:user,
:organisation => organisation,
- :permissions => Support::Permissions.all_permissions)
+ :permissions => Support::Permissions.all_permissions)
login_as @user, :scope => :user
# post_via_redirect user_session_path, 'user[email]' => @user.email, 'user[password]' => @user.password
diff --git a/spec/workers/workbench_import_worker_spec.rb b/spec/workers/workbench_import_worker_spec.rb
index be07e301a..a349b3433 100644
--- a/spec/workers/workbench_import_worker_spec.rb
+++ b/spec/workers/workbench_import_worker_spec.rb
@@ -1,8 +1,4 @@
-RSpec.describe WorkbenchImportWorker,
- type: [:worker, :request],
- skip: "ZipService has been refactored and RetryService was removed. These
- tests need to be changed to reflect the new state of the code. Skipping
- them because imports need to be ready for QA testing within a day." do
+RSpec.describe WorkbenchImportWorker, type: [:worker, :request] do
let( :worker ) { described_class.new }
let( :import ){ build_stubbed :import, token_download: download_token, file: zip_file }
@@ -10,11 +6,6 @@ RSpec.describe WorkbenchImportWorker,
let( :workbench ){ import.workbench }
let( :referential ){ import.referential }
let( :api_key ){ build_stubbed :api_key, referential: referential, token: "#{referential.id}-#{SecureRandom.hex}" }
- let( :params ) do
- { netex_import:
- { referential_id: referential.id, workbench_id: workbench.id }
- }
- end
# http://www.example.com/workbenches/:workbench_id/imports/:id/download
let( :host ){ Rails.configuration.rails_host }
@@ -27,12 +18,12 @@ RSpec.describe WorkbenchImportWorker,
let( :upload_path ) { api_v1_netex_imports_path(format: :json) }
- let( :entry_group_streams ) do
- entry_count.times.map{ |i| double( "entry group stream #{i}" ) }
- end
- let( :entry_groups ) do
- entry_count.times.map do | i |
- {"entry_group_name#{i}" => entry_group_streams[i] }
+ let( :subdirs ) do
+ entry_count.times.map do |i|
+ ZipService::Subdir.new(
+ "subdir #{i}",
+ double("subdir #{i}", rewind: 0, read: '')
+ )
end
end
@@ -42,6 +33,8 @@ RSpec.describe WorkbenchImportWorker,
let( :post_response_ok ){ double(status: 201, body: "{}") }
before do
+ Timecop.freeze(Time.now)
+
# Silence Logger
allow_any_instance_of(Logger).to receive(:info)
allow_any_instance_of(Logger).to receive(:warn)
@@ -51,8 +44,15 @@ RSpec.describe WorkbenchImportWorker,
allow(Api::V1::ApiKey).to receive(:from).and_return(api_key)
allow(ZipService).to receive(:new).with(downloaded_zip).and_return zip_service
- expect(zip_service).to receive(:entry_group_streams).and_return(entry_groups)
- expect( import ).to receive(:update).with(status: 'running')
+ expect(zip_service).to receive(:subdirs).and_return(subdirs)
+ expect( import ).to receive(:update).with(
+ status: 'running',
+ started_at: Time.now
+ )
+ end
+
+ after do
+ Timecop.return
end
@@ -65,13 +65,14 @@ RSpec.describe WorkbenchImportWorker,
.with(host: host, path: path, params: {token: download_token})
.and_return( download_zip_response )
- entry_groups.each do | entry_group_name, entry_group_stream |
- mock_post entry_group_name, entry_group_stream, post_response_ok
+ subdirs.each do |subdir|
+ mock_post subdir, post_response_ok
end
expect( import ).to receive(:update).with(total_steps: 2)
expect( import ).to receive(:update).with(current_step: 1)
expect( import ).to receive(:update).with(current_step: 2)
+ expect( import ).to receive(:update).with(ended_at: Time.now)
worker.perform import.id
@@ -87,14 +88,14 @@ RSpec.describe WorkbenchImportWorker,
.with(host: host, path: path, params: {token: download_token})
.and_return( download_zip_response )
- # First entry_group succeeds
- entry_groups[0..0].each do | entry_group_name, entry_group_stream |
- mock_post entry_group_name, entry_group_stream, post_response_ok
+ # First subdir succeeds
+ subdirs[0..0].each do |subdir|
+ mock_post subdir, post_response_ok
end
- # Second entry_group fails (M I S E R A B L Y)
- entry_groups[1..1].each do | entry_group_name, entry_group_stream |
- mock_post entry_group_name, entry_group_stream, post_response_failure
+ # Second subdir fails (M I S E R A B L Y)
+ subdirs[1..1].each do |subdir|
+ mock_post subdir, post_response_failure
end
expect( import ).to receive(:update).with(total_steps: 3)
@@ -102,18 +103,30 @@ RSpec.describe WorkbenchImportWorker,
expect( import ).to receive(:update).with(current_step: 2)
expect( import ).to receive(:update).with(current_step: 3, status: 'failed')
- worker.perform import.id
+ expect { worker.perform import.id }.to raise_error(StopIteration)
end
end
- def mock_post entry_group_name, entry_group_stream, response
+ def mock_post subdir, response
+ allow(HTTPService).to receive(:upload)
expect( HTTPService ).to receive(:post_resource)
- .with(host: host,
- path: upload_path,
- token: api_key.token,
- params: params,
- upload: {file: [entry_group_stream, 'application/zip', entry_group_name]})
- .and_return(response)
+ .with(
+ host: host,
+ path: upload_path,
+ params: {
+ netex_import: {
+ parent_id: import.id,
+ parent_type: import.class.name,
+ workbench_id: workbench.id,
+ name: subdir.name,
+ file: HTTPService.upload(
+ subdir.stream,
+ 'application/zip',
+ "#{subdir.name}.zip"
+ )
+ }
+ }
+ ).and_return(response)
end
end