From 7757d6d6366afdfbf2f7d767aa1f231fa8d87f24 Mon Sep 17 00:00:00 2001 From: bergquist Date: Wed, 4 May 2016 08:22:44 +0200 Subject: [PATCH] feat(alerting): set default title for alerts --- public/app/plugins/panel/graph/alert_tab_ctrl.ts | 3 ++- public/app/plugins/panel/graph/partials/tab_alerting.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/panel/graph/alert_tab_ctrl.ts b/public/app/plugins/panel/graph/alert_tab_ctrl.ts index 226f76f8243..778962d438c 100644 --- a/public/app/plugins/panel/graph/alert_tab_ctrl.ts +++ b/public/app/plugins/panel/graph/alert_tab_ctrl.ts @@ -21,7 +21,8 @@ export class AlertTabCtrl { this.panel.alerting.queryRange = this.panel.alerting.queryRange || '10m'; this.panel.alerting.warnOperator = this.panel.alerting.warnOperator || '>'; this.panel.alerting.critOperator = this.panel.alerting.critOperator || '>'; - this.panel.alerting.title = this.panel.alerting.title || this.panel.title + ' alert'; + var defaultTitle = (this.panelCtrl.dashboard.title + ' ' + this.panel.title + ' alert'); + this.panel.alerting.title = this.panel.alerting.title || defaultTitle; this.panel.targets.map(target => { this.metricTargets.push(target); diff --git a/public/app/plugins/panel/graph/partials/tab_alerting.html b/public/app/plugins/panel/graph/partials/tab_alerting.html index addb6932d4d..e0f160efbb3 100644 --- a/public/app/plugins/panel/graph/partials/tab_alerting.html +++ b/public/app/plugins/panel/graph/partials/tab_alerting.html @@ -60,14 +60,14 @@
Alert info
Alert name - +
Alert description
- +