diff --git a/pkg/api/dtos/index.go b/pkg/api/dtos/index.go index 7c28d734be4..21201d30adf 100644 --- a/pkg/api/dtos/index.go +++ b/pkg/api/dtos/index.go @@ -16,9 +16,10 @@ type PluginCss struct { } type NavLink struct { - Text string `json:"text"` - Icon string `json:"icon"` - Img string `json:"img"` - Url string `json:"url"` - Children []*NavLink `json:"children"` + Text string `json:"text,omitempty"` + Icon string `json:"icon,omitempty"` + Img string `json:"img,omitempty"` + Url string `json:"url,omitempty"` + Divider bool `json:"divider,omitempty"` + Children []*NavLink `json:"children,omitempty"` } diff --git a/pkg/api/index.go b/pkg/api/index.go index 3b7c195b91b..9edbdda7c96 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -53,9 +53,12 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { Icon: "icon-gf icon-gf-dashboard", Url: setting.AppSubUrl + "/", Children: []*dtos.NavLink{ - {Text: "Home dashboard", Icon: "fa fa-fw fa-list", Url: setting.AppSubUrl + "/"}, - {Text: "Playlists", Icon: "fa fa-fw fa-list", Url: setting.AppSubUrl + "/playlists"}, - {Text: "Snapshots", Icon: "fa-fw icon-gf icon-gf-snapshot", Url: setting.AppSubUrl + "/dashboard/snapshots"}, + {Text: "Home", Url: setting.AppSubUrl + "/"}, + {Text: "Playlists", Url: setting.AppSubUrl + "/playlists"}, + {Text: "Snapshots", Url: setting.AppSubUrl + "/dashboard/snapshots"}, + {Divider: true}, + {Text: "New", Url: setting.AppSubUrl + "/dashboard/new"}, + {Text: "Import", Url: setting.AppSubUrl + "/import/dashboard"}, }, }) diff --git a/public/app/core/components/grafana_app.ts b/public/app/core/components/grafana_app.ts index 96c609018c0..0a2e49e5d72 100644 --- a/public/app/core/components/grafana_app.ts +++ b/public/app/core/components/grafana_app.ts @@ -77,8 +77,8 @@ export class GrafanaCtrl { }); }; - $rootScope.performance.scopeCount = scopes; f(root); + $rootScope.performance.scopeCount = scopes; return count; }; diff --git a/public/app/core/components/sidemenu/sidemenu.html b/public/app/core/components/sidemenu/sidemenu.html index 200f01e23cf..7fa5cc56647 100644 --- a/public/app/core/components/sidemenu/sidemenu.html +++ b/public/app/core/components/sidemenu/sidemenu.html @@ -1,53 +1,51 @@