Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transit model time zone in debug UI #6087

Merged

Conversation

leonardehrenfried
Copy link
Member

Summary

Reads the transit model time zone from the server and uses it to format times in the debug UI. For this to work, I exposed the transit model time zone on the server info REST endpoint.

I added a few messages to the UI that tells you the time zone being used:

image

image

This PR also combines the date and time input into a single date-time one which makes it much easier to convert between the local and zoned date time. The combined input looks like this:

image

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.81%. Comparing base (c022422) to head (60b7383).
Report is 18 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6087   +/-   ##
==========================================
  Coverage      69.81%   69.81%           
  Complexity     17418    17418           
==========================================
  Files           1974     1974           
  Lines          74537    74545    +8     
  Branches        7633     7633           
==========================================
+ Hits           52040    52047    +7     
- Misses         19847    19848    +1     
  Partials        2650     2650           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@testower
Copy link
Contributor

Will this work for those folks who have the REST api turned off?

@leonardehrenfried
Copy link
Member Author

Will this work for those folks who have the REST api turned off?

This is a different feature flag:

APIServerInfo(true, false, "Enable the server info endpoint."),

@leonardehrenfried
Copy link
Member Author

@testower This is now using GraphQL to fetch the time zone.

client/.env Outdated Show resolved Hide resolved
client/.env.development Outdated Show resolved Hide resolved
Co-authored-by: Thomas Gran <t2gran@gmail.com>
testower
testower previously approved these changes Sep 24, 2024
Copy link
Member

@t2gran t2gran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the Java Code changes, and they looks ok - so this can be merged, one review on the Debug UI is enough for this.

@leonardehrenfried
Copy link
Member Author

I'm going to use my admin rights to merge this even though the formal requirements are not met - @t2gran's changes cancelled @testower's approval.

@leonardehrenfried leonardehrenfried merged commit f70cfd4 into opentripplanner:dev-2.x Sep 24, 2024
6 checks passed
@leonardehrenfried leonardehrenfried deleted the time-zone-2 branch September 24, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OTP Debug UI The OTP bundled client Skip Changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants