Dashboard: Add configurable quick ranges for the time picker (#102254)

* Dashboard: Add configurable quick ranges for the time picker

* fix test and linter errors

* update from array to TimeOption

* Switching to grafana-scenes (Part 1 - remove grafana-ui changes

* Update SceneTimePicker initialization

* betterer

* remove hallucinated argument

* Revert "Bump scenes and fix types (#105167)"

This reverts commit c6428dfc74.

* make gen-go

* reset files

* Shorten documentation to increase maintainability

* Update _index.md

* the

---------

Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
This commit is contained in:
Chris Hodges
2025-06-12 17:51:46 +02:00
committed by GitHub
co-authored by joshhunt Jacob Valdez
parent f02ad33fd2
commit e0d27dc0d7
12 changed files with 246 additions and 1 deletions
+2 -1
View File
@@ -274,7 +274,8 @@ type FrontendSettingsDTO struct {
CloudMigrationIsTarget bool `json:"cloudMigrationIsTarget"`
CloudMigrationPollIntervalMs int `json:"cloudMigrationPollIntervalMs"`
DateFormats setting.DateFormats `json:"dateFormats,omitempty"`
DateFormats setting.DateFormats `json:"dateFormats,omitempty"`
QuickRanges []setting.QuickRange `json:"quickRanges,omitempty"`
LoginError string `json:"loginError,omitempty"`
+1
View File
@@ -247,6 +247,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
TrustedTypesDefaultPolicyEnabled: trustedTypesDefaultPolicyEnabled,
CSPReportOnlyEnabled: hs.Cfg.CSPReportOnlyEnabled,
DateFormats: hs.Cfg.DateFormats,
QuickRanges: hs.Cfg.QuickRanges,
SecureSocksDSProxyEnabled: hs.Cfg.SecureSocksDSProxy.Enabled && hs.Cfg.SecureSocksDSProxy.ShowUI,
EnableFrontendSandboxForPlugins: hs.Cfg.EnableFrontendSandboxForPlugins,
PublicDashboardAccessToken: c.PublicDashboardAccessToken,