mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Hotkeys: Make time range permanent (#43802)
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.
This commit is contained in:
@@ -144,6 +144,10 @@ export class ShiftTimeEvent extends BusEventWithPayload<ShiftTimeEventPayload> {
|
||||
static type = 'shift-time';
|
||||
}
|
||||
|
||||
export class AbsoluteTimeEvent extends BusEventBase {
|
||||
static type = 'absolute-time';
|
||||
}
|
||||
|
||||
export class RemovePanelEvent extends BusEventWithPayload<number> {
|
||||
static type = 'remove-panel';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user