grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

feature request: SceneTimePicker could support limited time picker settings. #860

Open joeblubaugh opened 1 month ago

joeblubaugh commented 1 month ago

I'd like to be able to restrict the time picker values available in a Scene, similar to how I can control SceneRefreshPicker.

Something like:

interface SceneTimePickerState extends SceneObjectState {
    hidePicker?: boolean;
    isOnCanvas?: boolean;
    freeTimePicker?: boolean; // controls whether any time interval can be set, using the calendar / time format interface.
    intervals?: string[]; // controls which intervals appear in the RHS of the time picker
    minInterval?: string; // controls the smallest interval that can be set in SceneTimePicker
}