diff --git a/pkg/api/index.go b/pkg/api/index.go
index bf5a128a03f..7a954ecdf22 100644
--- a/pkg/api/index.go
+++ b/pkg/api/index.go
@@ -140,8 +140,8 @@ 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: "Alert List", Id: "alert-list", Url: setting.AppSubUrl + "/alerting/list", Icon: "fa fa-fw fa-list-ul"},
- {Text: "Notification channels", Id: "channels", Url: setting.AppSubUrl + "/alerting/notifications", Icon: "fa fa-fw fa-bell-o"},
+ {Text: "Alert Rules", Id: "alert-list", Url: setting.AppSubUrl + "/alerting/list", Icon: "fa fa-fw fa-list-ul"},
+ {Text: "Notification channels", Id: "channels", Url: setting.AppSubUrl + "/alerting/notifications", Icon: "gicon gicon-alert-notification-channel"},
}
data.NavTree = append(data.NavTree, &dtos.NavLink{
diff --git a/public/app/core/components/navbar/navbar.ts b/public/app/core/components/navbar/navbar.ts
index 3bceee51356..54f39eaa889 100644
--- a/public/app/core/components/navbar/navbar.ts
+++ b/public/app/core/components/navbar/navbar.ts
@@ -40,9 +40,9 @@ export function pageH1() {
restrict: 'E',
template: `
`,
scope: {
diff --git a/public/app/core/nav_model_srv.ts b/public/app/core/nav_model_srv.ts
index 00dc8feb7cd..964f8f4bd91 100644
--- a/public/app/core/nav_model_srv.ts
+++ b/public/app/core/nav_model_srv.ts
@@ -5,15 +5,24 @@ import config from 'app/core/config';
import _ from 'lodash';
export interface NavModelItem {
- title: string;
+ text: string;
url: string;
icon?: string;
- iconUrl?: string;
+ img?: string;
}
-export interface NavModel {
- section: NavModelItem;
- menu: NavModelItem[];
+export class NavModel {
+ breadcrumbs: NavModelItem[];
+ header: NavModelItem;
+ node: NavModelItem;
+
+ constructor() {
+ this.breadcrumbs = [];
+ }
+
+ setPageHeaderIndex(index: number) {
+ this.header = this.breadcrumbs[index];
+ }
}
export class NavModelSrv {
@@ -31,12 +40,13 @@ export class NavModelSrv {
getNav(...args) {
var children = this.navItems;
- var nav = {breadcrumbs: [], node: null};
+ var nav = new NavModel();
for (let id of args) {
let node = _.find(children, {id: id});
nav.breadcrumbs.push(node);
nav.node = node;
+ nav.header = node;
children = node.children;
}
diff --git a/public/app/features/admin/partials/configuration_home.html b/public/app/features/admin/partials/configuration_home.html
index dd39c80269d..854e4eb848d 100644
--- a/public/app/features/admin/partials/configuration_home.html
+++ b/public/app/features/admin/partials/configuration_home.html
@@ -1,9 +1,14 @@
-
-
-
+
+
+
\ No newline at end of file
+
diff --git a/public/app/features/alerting/alert_list_ctrl.ts b/public/app/features/alerting/alert_list_ctrl.ts
index 5e9d8d80a92..e7a0dbf1298 100644
--- a/public/app/features/alerting/alert_list_ctrl.ts
+++ b/public/app/features/alerting/alert_list_ctrl.ts
@@ -23,7 +23,8 @@ export class AlertListCtrl {
/** @ngInject */
constructor(private backendSrv, private $location, navModelSrv) {
- this.navModel = navModelSrv.getNav('alerting');
+ this.navModel = navModelSrv.getNav('alerting', 'alert-list');
+ this.navModel.setPageHeaderIndex(0);
var params = $location.search();
this.filters.state = params.state || null;
diff --git a/public/app/features/alerting/notifications_list_ctrl.ts b/public/app/features/alerting/notifications_list_ctrl.ts
index 15ef891a979..55647857b41 100644
--- a/public/app/features/alerting/notifications_list_ctrl.ts
+++ b/public/app/features/alerting/notifications_list_ctrl.ts
@@ -10,6 +10,7 @@ export class AlertNotificationsListCtrl {
constructor(private backendSrv, navModelSrv) {
this.loadNotifications();
this.navModel = navModelSrv.getNav('alerting', 'channels');
+ this.navModel.setPageHeaderIndex(0);
}
loadNotifications() {
diff --git a/public/app/features/alerting/partials/alert_list.html b/public/app/features/alerting/partials/alert_list.html
index 148757424c5..df7105d0bfe 100644
--- a/public/app/features/alerting/partials/alert_list.html
+++ b/public/app/features/alerting/partials/alert_list.html
@@ -1,29 +1,52 @@
-
+