Files
grafana/pkg/services/frontend/frontend_settings.go
T
Josh Hunt bb6d7d02c7 FS: Call IndexDataHooks for custom version string (#112670)
* Add enterprise hooks

* wip...

* undo

* update wire gen

* remove old hook thing

* move build info into seperate func

* align fs context middleware with grafana, setting SignedInUser

* Call IndexDataHooks to get modified build info

* update tests

* go workspace

* idk, reset workspace files or whatever

* conditionally mount license

* support loading decoupled plugins from cdn

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-10-24 11:04:44 +01:00

49 lines
2.6 KiB
Go

package frontend
import (
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/setting"
)
// This is a copy of dtos.FrontendSettingsDTO with only the fields that the frontend-service
// sends, to prevent default values from overriding what comes from the /bootdata call.
//
// It's important the JSON names for these fields match dtos.FrontendSettingsDTO
// so the frontend can merge the two together correctly.
type FSFrontendSettings struct {
AuthProxyEnabled bool `json:"authProxyEnabled,omitempty"`
LdapEnabled bool `json:"ldapEnabled,omitempty"`
JwtHeaderName string `json:"jwtHeaderName,omitempty"`
JwtUrlLogin bool `json:"jwtUrlLogin,omitempty"`
AutoAssignOrg bool `json:"autoAssignOrg,omitempty"`
VerifyEmailEnabled bool `json:"verifyEmailEnabled,omitempty"`
DisableLoginForm bool `json:"disableLoginForm,omitempty"`
DisableUserSignUp bool `json:"disableUserSignUp,omitempty"`
LoginHint string `json:"loginHint,omitempty"`
PasswordHint string `json:"passwordHint,omitempty"`
AnonymousEnabled bool `json:"anonymousEnabled,omitempty"`
BuildInfo dtos.FrontendSettingsBuildInfoDTO `json:"buildInfo"`
GoogleAnalyticsId string `json:"googleAnalyticsId,omitempty"`
GoogleAnalytics4Id string `json:"googleAnalytics4Id,omitempty"`
GoogleAnalytics4SendManualPageViews bool `json:"GoogleAnalytics4SendManualPageViews,omitempty"`
RudderstackWriteKey string `json:"rudderstackWriteKey,omitempty"`
RudderstackDataPlaneUrl string `json:"rudderstackDataPlaneUrl,omitempty"`
RudderstackSdkUrl string `json:"rudderstackSdkUrl,omitempty"`
RudderstackConfigUrl string `json:"rudderstackConfigUrl,omitempty"`
RudderstackIntegrationsUrl string `json:"rudderstackIntegrationsUrl,omitempty"`
AnalyticsConsoleReporting bool `json:"analyticsConsoleReporting,omitempty"`
GrafanaJavascriptAgent setting.GrafanaJavascriptAgent `json:"grafanaJavascriptAgent,omitempty"`
ApplicationInsightsConnectionString string `json:"applicationInsightsConnectionString,omitempty"`
ApplicationInsightsEndpointUrl string `json:"applicationInsightsEndpointUrl,omitempty"`
TrustedTypesDefaultPolicyEnabled bool `json:"trustedTypesDefaultPolicyEnabled,omitempty"`
CSPReportOnlyEnabled bool `json:"cspReportOnlyEnabled,omitempty"`
Http2Enabled bool `json:"http2Enabled,omitempty"`
ReportingStaticContext map[string]string `json:"reportingStaticContext,omitempty"`
}