CUTR-at-USF / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds. See https://github.com/MobilityData/gtfs-realtime-validator for the latest!
Other
93 stars 40 forks source link

Create a shareable URL for the iteration details #177

Closed barbeau closed 7 years ago

barbeau commented 7 years ago

Summary:

PR https://github.com/CUTR-at-USF/gtfs-realtime-validator/pull/171 implements an excellent new page where you can click on an iteration number, and see details about that iteration (plain text protobuf contents, list of error occurrences).

I'd like to extend this feature so the URL could be shared between users to see the details of the iteration. I first mentioned this in https://github.com/CUTR-at-USF/gtfs-realtime-validator/pull/171#issuecomment-298077350.

Currently, the URL you see after clicking on an iteration number to see the details is: http://my.server.com:8080/iteration.html

...and the session iteration (generated only for the current user's session, starting at 1) is shown in the text at the top ("41" in this example);

image

I'd like to change it to something like: http://my.server.com:8080/iteration/378594?sessionIteration=41

In this example the primary key in the database would be 378594, and the iteration ID to show at the top of the page would be 41.

We need the iteration primary key to know which iteration globally out of all iterations in the server to use - in the web UI we always restart the iteration ID shown at 1 for a new monitoring session, but internally in the database the primary key is auto-generated.

And, we need the ?sessionIteration=41 to make sure we show the user receiving the URL the same session in the UI as what the original user saw.

Steps to reproduce:

  1. Start monitoring a feed
  2. Click on the Iteration ID in the Log UI

Expected behavior:

Give me a URL in the browser that I can copy and send to another user so they can see the same iteration error details.

Observed behavior:

Right now the URL for all iteration details (no matter which one you click on) is http://my.server.com:8080/iteration.html, which isn't sharable.

barbeau commented 7 years ago

Fixed via https://github.com/CUTR-at-USF/gtfs-realtime-validator/pull/182.