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

Hotkeys: Make time range absolute/permanent #43802

Merged
merged 1 commit into from
Jan 7, 2022
Merged

Conversation

davkal
Copy link
Contributor

@davkal davkal commented Jan 7, 2022

Typing t a in Explore or Dashboards will turn a relative time like "Last 1 hour"
into an absolute range to make the URL permanent, so that when sharing it others
will see the same data.

  • registered t a in key service
  • new AbsoluteTimeEvent dispatch via global event bus
  • dashboard times handled in TimeSrv
  • Explore times handled in Explore.tsx and Explore's time reducer
  • added t a to help screen

I could not find an easy way to combine time handling for Exlore and Dashboard in one place.

Fixes #37893
Supersedes #37899

CC @owen-d

Typing `t a` in Explore or Dashboards will turn a relative time like "Last 1 hour"
into an absolute range to make the URL permanent, so that when sharing it others
will see the same data.

- registered `t a` in key service
- new `AbsoluteTimeEvent` dispatch via global event bus
- dashboard times handled in TimeSrv
- Explore times handled in Explore.tsx and Explore's time reducer

I could not find an easy way to combine time handling for Exlore and Dashboard in one place.
@davkal davkal requested review from a team and connorlindsey and removed request for a team January 7, 2022 14:17
@davkal davkal added this to the 8.4.0 milestone Jan 7, 2022
Copy link
Contributor

@connorlindsey connorlindsey left a comment

Choose a reason for hiding this comment

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

Tested in dashboard and explore, and it works great. lgtm!

@davkal davkal merged commit a08e058 into main Jan 7, 2022
@davkal davkal deleted the davkal/make-time-permanent branch January 7, 2022 15:51
@davkal davkal changed the title Hotkeys: Make time range permanent Hotkeys: Make time range absolute/permanent Jan 7, 2022
@candlerb
Copy link
Contributor

candlerb commented Sep 8, 2023

This is awesome (when I finally found this issue), but I was expecting a button somewhere in the GUI to do this, and spent ages clicking around looking for it. Also the documentation for using dashboards doesn't mention the ta key sequence.

When you hover over a relative time range, it shows the absolute time range. Perhaps there could be a button inside here to grab this range and apply it?

image

Apart from that, it makes me wonder how much other functionality in Grafana is hidden in the GUI but available with magic key sequences :-)

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

Successfully merging this pull request may close these issues.

None yet

4 participants