| Age | Commit message (Collapse) | Author |
|
imports#show
|
|
Refs #4280
|
|
Retry removed (but not the deadcode yet) [amend me]
|
|
|
|
organisation code
|
|
|
|
|
|
Debugging Java Integration (ZipService -> HTTPService -> Object Creation)
- Created an ErrorFormat concern to see what went wrong in the HTTP call
as so many things can go wrong due to:
* Timeout Issues
* Illegal database setup or cleaning before tests
|
|
|
|
|
|
Refs #4270
|
|
|
|
Send POST requests for duplication to a new controller method so we can
more easily handle them and separate setup and creation code.
Note that the test doesn't work. The `to change` part succeeds even
though it shouldn't. Still need to figure out what's going on there, but
committing this to hand off the feature to Robert.
Refs #4189
|
|
Build a breadcrumb. In order to do so, we need to set the `@line`
instance variable (how would I know that? I wouldn't, damn implicit
dependencies).
Refs #4189
|
|
Set header text in the locale files and display it on the page given the
route ID in the URL. Remove the third argument from `pageheader` because
after looking at the helper method's signature, I see that it's not
necessary.
Refs #4189
|
|
This method was commented out in 2012. Safe to say we can remove it.
|
|
A couple of new routes for a form that will allow us to duplicate an
itinéraire/route inside a line.
Refs #4189
|
|
|
|
|
|
|
|
|
|
|
|
- Specing that, in case of a correct request Referential & NetexImport instances are created and a 201 is returned
- Specing that, in case of an incorrect request, no instance is created and a 406 with a correct error message is returned
- Implemented
MISSING:
Refactor controller implmentation
|
|
1726 workbench import for multi netex import
|
|
3507 1726 impl workbench import
|
|
|
|
Refs #4185 @1
|
|
|
|
Sorting by stop point count and route name wasn't working. Only sorting
by name worked.
This was because these HTML table columns get their data from methods on
the `RoutingConstraintZone` model (`#stop_points_count` and
`#route_name`). Those methods can't be sorted on in the database.
Furthermore, when setting up the order ActiveRecord call, only database
column names on `routing_constraint_zones` were taken into account. When
a `sort` parameter specified an identifier that wasn't a column name,
the `name` column would be used to sort the list.
In this change, we enable sorting by stop point count and by route name.
The SQL work for ordering comes from a couple of new scope methods
defined on the model. Xin explained that he had previously used scope
methods to enable exotic sorting of Referentials on the
Workbenches#show page. I couldn't think of a better way to deal with
these, and it seems like a reasonable thing to do here, so I went with
the same setup.
In `#sort_column`, tack on our custom sorting keys to the list of
accepted keys. This borrows the pattern used in other `#sort_column`
methods in other controllers. Ended up using "route" as the route name
sorting key because that's what gets passed from the frontend.
Eliminated the `if` condition in `#collection` that defaults to `name`
sorting because it was redundant. The `#sort_column` method already
defaults to sorting by name if no `params[:sort]` is passed in. This
makes the method a lot cleaner, nice.
Add a new private method `#sort_collection` that determines what method
to call to sort the query. When using real table column names, it calls
`#order` like before. But now, if the user asked to sort by stop point
count or route name, we delegate instead to our scope methods,
`#order_by_stop_points_count` and `#order_by_route_name`.
Refs #4130
|
|
|
|
|
|
|
|
|
|
Refs #4132
|
|
|
|
Introduction of Presence Validation in Import model, for:
- workbench
- referential
|
|
1726-WorkbenchImport-for-multi-Netex-import
|
|
We were getting errors like these:
Started GET "/referentials/4/networks?_=1500482065840" for 127.0.0.1 at 2017-07-19 18:34:27 +0200
Processing by ReferentialNetworksController#index as JS
Parameters: {"_"=>"1500482065840", "referential_id"=>"4"}
User Load (3.6ms) SELECT "public"."users".* FROM "public"."users" WHERE "public"."users"."id" = $1 ORDER BY "public"."users"."id" ASC LIMIT 1 [["id", 1]]
locale set to :fr
Organisation Load (5.6ms) SELECT "public"."organisations".* FROM "public"."organisations" WHERE "public"."organisations"."id" = $1 LIMIT 1 [["id", 1]]
Referential Load (1.0ms) SELECT "public"."referentials".* FROM "public"."referentials" WHERE "public"."referentials"."organisation_id" = $1 AND "public"."referentials"."id" = $2 LIMIT 1 [["organisation_id", 1], ["id", 4]]
Workbench Load (0.7ms) SELECT "public"."workbenches".* FROM "public"."workbenches" WHERE "public"."workbenches"."id" = $1 LIMIT 1 [["id", 1]]
(1.3ms) SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 [["id", 1]]
CACHE (0.0ms) SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 [["id", 1]]
Chouette::Network Load (2.3ms) SELECT DISTINCT "public"."networks".* FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 ORDER BY name asc LIMIT 12 OFFSET 0 [["id", 1]]
CACHE (0.0ms) SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1 [["id", 1]]
Chouette::Network Exists (1.2ms) SELECT 1 AS one FROM "public"."networks" WHERE "public"."networks"."id" = $1 LIMIT 1 [["id", 118]]
Rendered referential_networks/index.html.slim (48.9ms)
Completed 500 Internal Server Error in 184ms (ActiveRecord: 17.4ms)
ActionView::Template::Error (undefined method `action_links' for #<Chouette::Network:0x007ffea2148b08>):
22: - if @networks.any?
23: .row
24: .col-lg-12
25: = table_builder_2 @networks,
26: [ \
27: TableBuilderHelper::Column.new( \
28: name: 'ID Codifligne', \
app/helpers/table_builder_helper.rb:161:in `block in build_links'
app/helpers/table_builder_helper.rb:158:in `build_links'
app/helpers/table_builder_helper.rb:138:in `block (3 levels) in tbody'
app/helpers/table_builder_helper.rb:110:in `block (2 levels) in tbody'
app/helpers/table_builder_helper.rb:108:in `block in tbody'
app/helpers/table_builder_helper.rb:107:in `tbody'
app/helpers/table_builder_helper.rb:72:in `table_builder_2'
app/views/referential_networks/index.html.slim:25:in `_app_views_referential_networks_index_html_slim___1557411244315414919_70366016986820'
app/controllers/referential_networks_controller.rb:27:in `index'
Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (1.8ms)
Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (2.5ms)
Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb (76.0ms)
on the following pages:
- http://stif-boiv.dev:3000/referentials/4/time_tables
- http://stif-boiv.dev:3000/line_referentials/1/companies
- http://stif-boiv.dev:3000/line_referentials/1/networks
- http://stif-boiv.dev:3000/referentials/4/companies
- http://stif-boiv.dev:3000/referentials/4/networks
This was caused by the request of a JS-formatted view that rendered the
HTML template, since the collection decoration only happened in the HTML
format section.
Do the decoration in both the HTML format and JS format for the relevant
controllers in order to eliminate this error.
Maybe there's a cleaner way to do this than just duplicating the
decoration in both `format.X` blocks, but I don't know of it. Wanted to
make sure not to decorate when it wasn't necessary, like when rendering
other formats (XML, etc.).
Refs #4105
|
|
|
|
|
|
- Carrier Wave Upload with `fixture_file_upload`
- Request specs to .json
- Implementation
- API token setup
- Refuted experiments with controller specs
|
|
|
|
|
|
- Import#parent_id & #parent_type migration generated
- Import#belongs_to :parent, class_name: to_s specified
- Import#belongs_to :parent, class_name: to_s implemented
|
|
|
|
|
|
|
|
af83/3479-migrate-all-remaining-table-builder-helper-calls-to-new-version
3479 migrate all remaining table builder helper calls to new version
|
|
Update the table builder helper for the table of `Chouette::StopPoints`
on this page.
Created a new `StopPointDecorator` which unfortunately has the same code
as `StopAreaDecorator`, the only difference being that instead of using
`object`, it uses `object.stop_area`. Need to work out how to eliminate
that code duplication.
Refs #3479
|
|
Since we already have the decorator available, get the links from there
for better code reuse.
Refs #3479
|