From 149c2ae91394042fa7f4416f0f71d6b564ecadfd Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 16 Jun 2016 15:21:23 +0200 Subject: [PATCH] feat(alerting): add submenu for alerting --- pkg/api/index.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/api/index.go b/pkg/api/index.go index 9377b21a957..4cfdad5cca9 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -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) { + alertChildNavs := []*dtos.NavLink{ + {Text: "Home", Url: setting.AppSubUrl + "/alerting"}, + {Text: "Notifications", Url: setting.AppSubUrl + "/alerting/notifications"}, + } + data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{ - Text: "Alerting", - Icon: "icon-gf icon-gf-monitoring", - Url: setting.AppSubUrl + "/alerting", + Text: "Alerting", + Icon: "icon-gf icon-gf-monitoring", + Url: setting.AppSubUrl + "/alerting", + Children: alertChildNavs, }) }