From d56b9a720a5de170db0a3e46294b94b1087852bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 6 Dec 2016 08:11:00 +0100 Subject: [PATCH] feat(alerting): added confirm text when removing panel with alert rule --- public/app/features/dashboard/row/row_model.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/app/features/dashboard/row/row_model.ts b/public/app/features/dashboard/row/row_model.ts index d99e75b3621..037a7ad1a4a 100644 --- a/public/app/features/dashboard/row/row_model.ts +++ b/public/app/features/dashboard/row/row_model.ts @@ -86,10 +86,18 @@ export class DashboardRow { removePanel(panel, ask?) { if (ask !== false) { + var text2, confirmText; + if (panel.alert) { + text2 = "Panel includes an alert rule, removing panel will also remove alert rule"; + confirmText = "YES"; + } + appEvents.emit('confirm-modal', { title: 'Remove Panel', text: 'Are you sure you want to remove this panel?', + text2: text2, icon: 'fa-trash', + confirmText: confirmText, yesText: 'Remove', onConfirm: () => { this.removePanel(panel, false);