Dashboards: Add a config setting that limits the number of series that will be displayed in a panel. Users can opt in to render all series. (#103405)
* Limit series in panels in dashboards * fix mangled comment
This commit is contained in:
@@ -194,6 +194,7 @@ type FrontendSettingsDTO struct {
|
||||
AnalyticsConsoleReporting bool `json:"analyticsConsoleReporting"`
|
||||
|
||||
DashboardPerformanceMetrics []string `json:"dashboardPerformanceMetrics"`
|
||||
PanelSeriesLimit int `json:"panelSeriesLimit"`
|
||||
|
||||
FeedbackLinksEnabled bool `json:"feedbackLinksEnabled"`
|
||||
ApplicationInsightsConnectionString string `json:"applicationInsightsConnectionString"`
|
||||
|
||||
@@ -216,6 +216,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
RudderstackIntegrationsUrl: hs.Cfg.RudderstackIntegrationsURL,
|
||||
AnalyticsConsoleReporting: hs.Cfg.FrontendAnalyticsConsoleReporting,
|
||||
DashboardPerformanceMetrics: hs.Cfg.DashboardPerformanceMetrics,
|
||||
PanelSeriesLimit: hs.Cfg.PanelSeriesLimit,
|
||||
FeedbackLinksEnabled: hs.Cfg.FeedbackLinksEnabled,
|
||||
ApplicationInsightsConnectionString: hs.Cfg.ApplicationInsightsConnectionString,
|
||||
ApplicationInsightsEndpointUrl: hs.Cfg.ApplicationInsightsEndpointUrl,
|
||||
|
||||
@@ -226,6 +226,7 @@ type Cfg struct {
|
||||
MinRefreshInterval string
|
||||
DefaultHomeDashboardPath string
|
||||
DashboardPerformanceMetrics []string
|
||||
PanelSeriesLimit int
|
||||
|
||||
// Auth
|
||||
LoginCookieName string
|
||||
@@ -1149,6 +1150,7 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
|
||||
cfg.MinRefreshInterval = valueAsString(dashboards, "min_refresh_interval", "5s")
|
||||
cfg.DefaultHomeDashboardPath = dashboards.Key("default_home_dashboard_path").MustString("")
|
||||
cfg.DashboardPerformanceMetrics = util.SplitString(dashboards.Key("dashboard_performance_metrics").MustString(""))
|
||||
cfg.PanelSeriesLimit = dashboards.Key("panel_series_limit").MustInt(0)
|
||||
|
||||
if err := readUserSettings(iniFile, cfg); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user