mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Settings to enable Explore UI
This commit is contained in:
parent
f1220fd2a4
commit
1e6e89121c
@ -442,6 +442,11 @@ enabled = true
|
||||
# Makes it possible to turn off alert rule execution but alerting UI is visible
|
||||
execute_alerts = true
|
||||
|
||||
#################################### Explore #############################
|
||||
[explore]
|
||||
# Enable the Explore section
|
||||
enabled = false
|
||||
|
||||
#################################### Internal Grafana Metrics ############
|
||||
# Metrics available at HTTP API Url /metrics
|
||||
[metrics]
|
||||
|
@ -377,6 +377,11 @@ log_queries =
|
||||
# Makes it possible to turn off alert rule execution but alerting UI is visible
|
||||
;execute_alerts = true
|
||||
|
||||
#################################### Explore #############################
|
||||
[explore]
|
||||
# Enable the Explore section
|
||||
;enabled = false
|
||||
|
||||
#################################### Internal Grafana Metrics ##########################
|
||||
# Metrics available at HTTP API Url /metrics
|
||||
[metrics]
|
||||
|
@ -117,16 +117,18 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
|
||||
Children: dashboardChildNavs,
|
||||
})
|
||||
|
||||
// data.NavTree = append(data.NavTree, &dtos.NavLink{
|
||||
// Text: "Explore",
|
||||
// Id: "explore",
|
||||
// SubTitle: "Explore your data",
|
||||
// Icon: "fa fa-rocket",
|
||||
// Url: setting.AppSubUrl + "/explore",
|
||||
// Children: []*dtos.NavLink{
|
||||
// {Text: "New tab", Icon: "gicon gicon-dashboard-new", Url: setting.AppSubUrl + "/explore/new"},
|
||||
// },
|
||||
// })
|
||||
if setting.ExploreEnabled {
|
||||
data.NavTree = append(data.NavTree, &dtos.NavLink{
|
||||
Text: "Explore",
|
||||
Id: "explore",
|
||||
SubTitle: "Explore your data",
|
||||
Icon: "fa fa-rocket",
|
||||
Url: setting.AppSubUrl + "/explore",
|
||||
Children: []*dtos.NavLink{
|
||||
{Text: "New tab", Icon: "gicon gicon-dashboard-new", Url: setting.AppSubUrl + "/explore/new"},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if c.IsSignedIn {
|
||||
// Only set login if it's different from the name
|
||||
|
@ -168,6 +168,9 @@ var (
|
||||
AlertingEnabled bool
|
||||
ExecuteAlerts bool
|
||||
|
||||
// Explore UI
|
||||
ExploreEnabled bool
|
||||
|
||||
// logger
|
||||
logger log.Logger
|
||||
|
||||
@ -609,6 +612,9 @@ func NewConfigContext(args *CommandLineArgs) error {
|
||||
AlertingEnabled = alerting.Key("enabled").MustBool(true)
|
||||
ExecuteAlerts = alerting.Key("execute_alerts").MustBool(true)
|
||||
|
||||
explore := Cfg.Section("explore")
|
||||
ExploreEnabled = explore.Key("enabled").MustBool(true)
|
||||
|
||||
readSessionConfig()
|
||||
readSmtpSettings()
|
||||
readQuotaSettings()
|
||||
|
Loading…
Reference in New Issue
Block a user