Plugins: Allow a non-dashboard page to be the default home page (#32926)

* feat: introduce home page redirect if default dashboard

* style: clean up

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* chore(dashboard): remove obsolete setting import

* docs(config): add home_page description

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
This commit is contained in:
Jack Westbrook
2021-04-13 15:27:51 +02:00
committed by GitHub
co-authored by Hugo Häggmark
parent 31a6d12d34
commit bd74953f0d
5 changed files with 19 additions and 0 deletions
+2
View File
@@ -366,6 +366,7 @@ type Cfg struct {
Quota QuotaSettings
DefaultTheme string
HomePage string
AutoAssignOrg bool
AutoAssignOrgId int
@@ -1252,6 +1253,7 @@ func readUserSettings(iniFile *ini.File, cfg *Cfg) error {
LoginHint = valueAsString(users, "login_hint", "")
PasswordHint = valueAsString(users, "password_hint", "")
cfg.DefaultTheme = valueAsString(users, "default_theme", "")
cfg.HomePage = valueAsString(users, "home_page", "")
ExternalUserMngLinkUrl = valueAsString(users, "external_manage_link_url", "")
ExternalUserMngLinkName = valueAsString(users, "external_manage_link_name", "")
ExternalUserMngInfo = valueAsString(users, "external_manage_info", "")