From d659a5d79f2603c5e7f82d72de202f4ce1600a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 15 Aug 2017 20:53:31 +0200 Subject: [PATCH] ux: more nav work --- public/app/core/components/navbar/navbar.ts | 17 +++++++++++++++++ .../features/alerting/notification_edit_ctrl.ts | 4 +++- .../features/alerting/partials/alert_list.html | 6 ++---- .../alerting/partials/notification_edit.html | 3 +-- .../alerting/partials/notifications_list.html | 5 +---- public/app/features/org/orgDetailsCtrl.js | 2 +- .../features/org/partials/change_password.html | 5 +---- .../app/features/org/partials/orgApiKeys.html | 2 +- .../app/features/org/partials/orgDetails.html | 5 +---- public/app/features/org/partials/profile.html | 5 +---- public/app/features/plugins/ds_edit_ctrl.ts | 8 ++++++-- .../app/features/plugins/partials/ds_edit.html | 11 +---------- .../app/features/plugins/partials/ds_list.html | 6 ++---- .../features/plugins/partials/plugin_list.html | 1 + public/sass/layout/_page.scss | 1 - 15 files changed, 39 insertions(+), 42 deletions(-) diff --git a/public/app/core/components/navbar/navbar.ts b/public/app/core/components/navbar/navbar.ts index 4b42bdaade0..59d3af10cb1 100644 --- a/public/app/core/components/navbar/navbar.ts +++ b/public/app/core/components/navbar/navbar.ts @@ -41,4 +41,21 @@ export function navbarDirective() { }; } +export function pageH1() { + return { + restrict: 'E', + template: ` +

+ + {{model.node.text}} +

+ `, + scope: { + model: "=", + } + }; +} + + +coreModule.directive('pageH1', pageH1); coreModule.directive('navbar', navbarDirective); diff --git a/public/app/features/alerting/notification_edit_ctrl.ts b/public/app/features/alerting/notification_edit_ctrl.ts index 5f940a4359d..6e89558a5f1 100644 --- a/public/app/features/alerting/notification_edit_ctrl.ts +++ b/public/app/features/alerting/notification_edit_ctrl.ts @@ -36,12 +36,14 @@ export class AlertNotificationEditCtrl { } if (!this.$routeParams.id) { - this.navModel.breadcrumbs.push({text: 'New'}); + this.navModel.breadcrumbs.push({text: 'New channel'}); + this.navModel.node = {text: 'New channel'}; return _.defaults(this.model, this.defaults); } return this.backendSrv.get(`/api/alert-notifications/${this.$routeParams.id}`).then(result => { this.navModel.breadcrumbs.push({text: result.name}); + this.navModel.node = {text: result.name}; return result; }); }).then(model => { diff --git a/public/app/features/alerting/partials/alert_list.html b/public/app/features/alerting/partials/alert_list.html index c3586b1d9a6..447069bc8ee 100644 --- a/public/app/features/alerting/partials/alert_list.html +++ b/public/app/features/alerting/partials/alert_list.html @@ -2,10 +2,8 @@