Settings to enable Explore UI

pull/11742/head
David Kaltschmidt 8 years ago
parent f1220fd2a4
commit 1e6e89121c
  1. 5
      conf/defaults.ini
  2. 5
      conf/sample.ini
  3. 22
      pkg/api/index.go
  4. 6
      pkg/setting/setting.go

@ -442,6 +442,11 @@ enabled = true
# Makes it possible to turn off alert rule execution but alerting UI is visible # Makes it possible to turn off alert rule execution but alerting UI is visible
execute_alerts = true execute_alerts = true
#################################### Explore #############################
[explore]
# Enable the Explore section
enabled = false
#################################### Internal Grafana Metrics ############ #################################### Internal Grafana Metrics ############
# Metrics available at HTTP API Url /metrics # Metrics available at HTTP API Url /metrics
[metrics] [metrics]

@ -377,6 +377,11 @@ log_queries =
# Makes it possible to turn off alert rule execution but alerting UI is visible # Makes it possible to turn off alert rule execution but alerting UI is visible
;execute_alerts = true ;execute_alerts = true
#################################### Explore #############################
[explore]
# Enable the Explore section
;enabled = false
#################################### Internal Grafana Metrics ########################## #################################### Internal Grafana Metrics ##########################
# Metrics available at HTTP API Url /metrics # Metrics available at HTTP API Url /metrics
[metrics] [metrics]

@ -117,16 +117,18 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
Children: dashboardChildNavs, Children: dashboardChildNavs,
}) })
// data.NavTree = append(data.NavTree, &dtos.NavLink{ if setting.ExploreEnabled {
// Text: "Explore", data.NavTree = append(data.NavTree, &dtos.NavLink{
// Id: "explore", Text: "Explore",
// SubTitle: "Explore your data", Id: "explore",
// Icon: "fa fa-rocket", SubTitle: "Explore your data",
// Url: setting.AppSubUrl + "/explore", Icon: "fa fa-rocket",
// Children: []*dtos.NavLink{ Url: setting.AppSubUrl + "/explore",
// {Text: "New tab", Icon: "gicon gicon-dashboard-new", Url: setting.AppSubUrl + "/explore/new"}, Children: []*dtos.NavLink{
// }, {Text: "New tab", Icon: "gicon gicon-dashboard-new", Url: setting.AppSubUrl + "/explore/new"},
// }) },
})
}
if c.IsSignedIn { if c.IsSignedIn {
// Only set login if it's different from the name // Only set login if it's different from the name

@ -168,6 +168,9 @@ var (
AlertingEnabled bool AlertingEnabled bool
ExecuteAlerts bool ExecuteAlerts bool
// Explore UI
ExploreEnabled bool
// logger // logger
logger log.Logger logger log.Logger
@ -609,6 +612,9 @@ func NewConfigContext(args *CommandLineArgs) error {
AlertingEnabled = alerting.Key("enabled").MustBool(true) AlertingEnabled = alerting.Key("enabled").MustBool(true)
ExecuteAlerts = alerting.Key("execute_alerts").MustBool(true) ExecuteAlerts = alerting.Key("execute_alerts").MustBool(true)
explore := Cfg.Section("explore")
ExploreEnabled = explore.Key("enabled").MustBool(true)
readSessionConfig() readSessionConfig()
readSmtpSettings() readSmtpSettings()
readQuotaSettings() readQuotaSettings()

Loading…
Cancel
Save