Merge branch 'alerting_ui' of https://github.com/smalik03/grafana into smalik03-alerting_ui
This commit is contained in:
@@ -140,6 +140,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
|
||||
"allowOrgCreate": (setting.AllowUserOrgCreate && c.IsSignedIn) || c.IsGrafanaAdmin,
|
||||
"authProxyEnabled": setting.AuthProxyEnabled,
|
||||
"ldapEnabled": setting.LdapEnabled,
|
||||
"showAlertingUI": setting.ShowAlertingUI,
|
||||
"buildInfo": map[string]interface{}{
|
||||
"version": setting.BuildVersion,
|
||||
"commit": setting.BuildCommit,
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
||||
Children: dashboardChildNavs,
|
||||
})
|
||||
|
||||
if c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR {
|
||||
if setting.ShowAlertingUI && (c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR) {
|
||||
alertChildNavs := []*dtos.NavLink{
|
||||
{Text: "Alert List", Url: setting.AppSubUrl + "/alerting/list"},
|
||||
{Text: "Notification channels", Url: setting.AppSubUrl + "/alerting/notifications"},
|
||||
|
||||
@@ -150,7 +150,8 @@ var (
|
||||
Quota QuotaSettings
|
||||
|
||||
// Alerting
|
||||
ExecuteAlerts bool
|
||||
ExecuteAlerts bool
|
||||
ShowAlertingUI bool
|
||||
|
||||
// logger
|
||||
logger log.Logger
|
||||
@@ -579,6 +580,7 @@ func NewConfigContext(args *CommandLineArgs) error {
|
||||
|
||||
alerting := Cfg.Section("alerting")
|
||||
ExecuteAlerts = alerting.Key("execute_alerts").MustBool(true)
|
||||
ShowAlertingUI = alerting.Key("show_alerting_ui").MustBool(true)
|
||||
|
||||
readSessionConfig()
|
||||
readSmtpSettings()
|
||||
|
||||
Reference in New Issue
Block a user