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

Remember selected calendar period within session #460

Closed
Flix6x opened this issue Jul 12, 2022 · 0 comments · Fixed by #467
Closed

Remember selected calendar period within session #460

Flix6x opened this issue Jul 12, 2022 · 0 comments · Fixed by #467
Assignees
Labels

Comments

@Flix6x
Copy link
Contributor

Flix6x commented Jul 12, 2022

From #449:

The date selection resets to the most recent available data when you load an asset or sensor page. I was thinking of adding the date selection to the session, so that the same period will load when a user switches to a different page.

I like a selected range to persist across these data plot pages. We have start_time and end_time in the session variables (see ui/utils/view_utils.py::render_flexmeasures_template and set_time_range_for_session) - maybe that is where this should be going?

We don't want it to be necessary to reload the page in order to set a session variable, so I was thinking we could have relevant API endpoints (like /chart or /chart_data), or a new dedicated API endpoint (called when selecting a calendar period), to set the session variable, instead of doing that when the server is called to load the page.

I believe the /chart_data endpoint is a good place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant