mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): add submenu for alerting
This commit is contained in:
parent
7f767224af
commit
149c2ae913
@ -80,10 +80,16 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if setting.AlertingEnabled && (c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR) {
|
if setting.AlertingEnabled && (c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR) {
|
||||||
|
alertChildNavs := []*dtos.NavLink{
|
||||||
|
{Text: "Home", Url: setting.AppSubUrl + "/alerting"},
|
||||||
|
{Text: "Notifications", Url: setting.AppSubUrl + "/alerting/notifications"},
|
||||||
|
}
|
||||||
|
|
||||||
data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
|
data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
|
||||||
Text: "Alerting",
|
Text: "Alerting",
|
||||||
Icon: "icon-gf icon-gf-monitoring",
|
Icon: "icon-gf icon-gf-monitoring",
|
||||||
Url: setting.AppSubUrl + "/alerting",
|
Url: setting.AppSubUrl + "/alerting",
|
||||||
|
Children: alertChildNavs,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user