diff --git a/pkg/api/dtos/index.go b/pkg/api/dtos/index.go
index 8f1cdd9a92d..8c7f505277d 100644
--- a/pkg/api/dtos/index.go
+++ b/pkg/api/dtos/index.go
@@ -31,5 +31,6 @@ type NavLink struct {
Target string `json:"target,omitempty"`
Divider bool `json:"divider,omitempty"`
HideFromMenu bool `json:"hideFromMenu,omitempty"`
+ HideFromTabs bool `json:"hideFromTabs,omitempty"`
Children []*NavLink `json:"children,omitempty"`
}
diff --git a/pkg/api/index.go b/pkg/api/index.go
index 8f5e27023e9..a0f21cc9571 100644
--- a/pkg/api/index.go
+++ b/pkg/api/index.go
@@ -101,17 +101,19 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
}
dashboardChildNavs := []*dtos.NavLink{
- {Text: "Home", Url: setting.AppSubUrl + "/", Icon: "fa fa-fw fa-home"},
+ {Text: "Home", Url: setting.AppSubUrl + "/", Icon: "fa fa-fw fa-home", HideFromTabs: true},
+ {Divider: true},
+ {Text: "Manage", Id: "dashboards", Url: setting.AppSubUrl + "/dashboards", Icon: "fa fa-fw fa-sitemap"},
{Text: "Playlists", Id: "playlists", Url: setting.AppSubUrl + "/playlists", Icon: "fa fa-fw fa-film"},
{Text: "Snapshots", Id: "snapshots", Url: setting.AppSubUrl + "/dashboard/snapshots", Icon: "icon-gf icon-gf-fw icon-gf-snapshot"},
- {Text: "Dashboard List", Id: "dashboards", Url: setting.AppSubUrl + "/dashboards", Icon: "fa fa-fw fa-bars"},
}
data.NavTree = append(data.NavTree, &dtos.NavLink{
Text: "Dashboards",
Id: "dashboards",
+ SubTitle: "Manage dashboards & folders",
Icon: "gicon gicon-dashboard",
- Url: setting.AppSubUrl + "/",
+ Url: setting.AppSubUrl + "/dashboards",
Children: dashboardChildNavs,
})
diff --git a/public/app/core/components/PageHeader.tsx b/public/app/core/components/PageHeader.tsx
index cf3aa0d0cd4..57bcdc3b896 100644
--- a/public/app/core/components/PageHeader.tsx
+++ b/public/app/core/components/PageHeader.tsx
@@ -28,6 +28,10 @@ export interface IProps {
// }
function TabItem(tab: NavModelItem) {
+ if (tab.hideFromTabs || tab.divider) {
+ return (null);
+ }
+
let tabClasses = classNames({
'gf-tabs-link': true,
active: tab.active,
diff --git a/public/app/core/nav_model_srv.ts b/public/app/core/nav_model_srv.ts
index bfc275015db..81a82cd4c5f 100644
--- a/public/app/core/nav_model_srv.ts
+++ b/public/app/core/nav_model_srv.ts
@@ -9,6 +9,8 @@ export interface NavModelItem {
img?: string;
id: string;
active?: boolean;
+ hideFromTabs?: boolean;
+ divider?: boolean;
children: NavModelItem[];
}
diff --git a/public/app/features/alerting/notification_edit_ctrl.ts b/public/app/features/alerting/notification_edit_ctrl.ts
index a4ab20e8cf7..bb20b6fbde2 100644
--- a/public/app/features/alerting/notification_edit_ctrl.ts
+++ b/public/app/features/alerting/notification_edit_ctrl.ts
@@ -9,7 +9,7 @@ export class AlertNotificationEditCtrl {
testSeverity = "critical";
notifiers: any;
notifierTemplateId: string;
-
+ isNew: boolean;
model: any;
defaults: any = {
type: 'email',
@@ -23,7 +23,8 @@ export class AlertNotificationEditCtrl {
/** @ngInject */
constructor(private $routeParams, private backendSrv, private $location, private $templateCache, navModelSrv) {
- this.navModel = navModelSrv.getNav('alerting', 'channels');
+ this.navModel = navModelSrv.getNav('alerting', 'channels', 0);
+ this.isNew = !this.$routeParams.id;
this.backendSrv.get(`/api/alert-notifiers`).then(notifiers => {
this.notifiers = notifiers;
diff --git a/public/app/features/alerting/partials/notification_edit.html b/public/app/features/alerting/partials/notification_edit.html
index 2cd0c7984e1..35e335bb02b 100644
--- a/public/app/features/alerting/partials/notification_edit.html
+++ b/public/app/features/alerting/partials/notification_edit.html
@@ -1,9 +1,9 @@
-