Dashboards: Make path to default dashboard configurable (#25595)
Closes #25463 Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
co-authored by
Arve Knudsen
Diana Payton
parent
cc95754e0d
commit
703f728c0c
@@ -227,6 +227,7 @@ type Cfg struct {
|
||||
AppUrl string
|
||||
AppSubUrl string
|
||||
ServeFromSubPath bool
|
||||
StaticRootPath string
|
||||
|
||||
// build
|
||||
BuildVersion string
|
||||
@@ -272,6 +273,9 @@ type Cfg struct {
|
||||
DisableSanitizeHtml bool
|
||||
EnterpriseLicensePath string
|
||||
|
||||
// Dashboards
|
||||
DefaultHomeDashboardPath string
|
||||
|
||||
// Auth
|
||||
LoginCookieName string
|
||||
LoginMaxInactiveLifetimeDays int
|
||||
@@ -699,6 +703,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
return err
|
||||
}
|
||||
StaticRootPath = makeAbsolute(staticRoot, HomePath)
|
||||
cfg.StaticRootPath = StaticRootPath
|
||||
|
||||
if err := cfg.validateStaticRootPath(); err != nil {
|
||||
return err
|
||||
@@ -778,6 +783,8 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cfg.DefaultHomeDashboardPath = dashboards.Key("default_home_dashboard_path").MustString("")
|
||||
|
||||
// read data source proxy white list
|
||||
DataProxyWhiteList = make(map[string]bool)
|
||||
securityStr, err := valueAsString(security, "data_source_proxy_whitelist", "")
|
||||
|
||||
Reference in New Issue
Block a user