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

[core] Time range selection is not intuitive #178

Closed
ricoberger opened this issue Oct 13, 2021 · 0 comments · Fixed by #181
Closed

[core] Time range selection is not intuitive #178

ricoberger opened this issue Oct 13, 2021 · 0 comments · Fixed by #181
Assignees
Labels
bug Something isn't working

Comments

@ricoberger
Copy link
Member

Describe the bug

When we select a time range to view get some data, e.g. metrics in the Prometheus plugin, we are adding the time, timeEnd and timeStart parameter to the URL. When we then copy this URL and open it a day later, it will still use the selected time range, but in the options dialog it shows Last 15 Minutes.

To Reproduce

  1. Open the Prometheus plugin
  2. Run a query and copy the URL
  3. Wait some minutes and refresh the browser page
  4. It still shows Last 15 Minutes but uses the time range from some minutes ago

Expected behavior

When the URL is opened, it should use the formerly selected time range, but it should show the custom time range instead of Last 15 Minutes.

Additional context

At the moment we have to pass the time parameter within the URL so that we can refresh the page. It would be better to not set the time parameter and instead change it directly in the state.

This must be done in nearly all plugins, so that we should create a general function in the core plugin to parse the search location which can be used across plugins. Then we can pass the time as additional parameter to this function and use it directly, so that we do not have to add it to the URL.

When a user then opens a plugin, we can decide on the provided parameter what we want to do:

  • If the timeEnd and timeStart parameters are present, we use them to set a custom time range.
  • If only the time parameter is present we, use it to set the time range, but where the timeStart is the current time and not a old one.
@ricoberger ricoberger added the bug Something isn't working label Oct 13, 2021
@ricoberger ricoberger self-assigned this Oct 13, 2021
@ricoberger ricoberger moved this to In Progress in v0.7.0 Oct 15, 2021
Repository owner moved this from In Progress to Done in v0.7.0 Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant