From 2c2157f3b01f53ff8e096fd712ee5f07c5bdb2c8 Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 15 Aug 2016 20:17:32 +0200 Subject: [PATCH 1/2] fix(alerting): rename events to evalMatches --- emails/templates/alert_notification.html | 2 +- public/emails/alert_notification.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emails/templates/alert_notification.html b/emails/templates/alert_notification.html index cbac962a95a..5adcda1a620 100644 --- a/emails/templates/alert_notification.html +++ b/emails/templates/alert_notification.html @@ -42,7 +42,7 @@ Value - [[range .Events]] + [[range .EvalMatches]] [[.Metric]] diff --git a/public/emails/alert_notification.html b/public/emails/alert_notification.html index 75e1e21a9c3..f80a8330eaf 100644 --- a/public/emails/alert_notification.html +++ b/public/emails/alert_notification.html @@ -157,7 +157,7 @@ color: #FFFFFF !important; Value - {{range .Events}} + {{range .EvalMatches}} {{.Metric}} From aaabdbe33b779f15775ccc09fd398988a5b8fccb Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 15 Aug 2016 20:26:36 +0200 Subject: [PATCH 2/2] feat(alerting): make post execution fields nullable --- pkg/services/sqlstore/migrations/alert_mig.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/sqlstore/migrations/alert_mig.go b/pkg/services/sqlstore/migrations/alert_mig.go index 342c2282933..8985e87492e 100644 --- a/pkg/services/sqlstore/migrations/alert_mig.go +++ b/pkg/services/sqlstore/migrations/alert_mig.go @@ -22,9 +22,9 @@ func addAlertMigrations(mg *Migrator) { {Name: "severity", Type: DB_Text, Nullable: false}, {Name: "paused", Type: DB_Bool, Nullable: false}, {Name: "silenced", Type: DB_Bool, Nullable: false}, - {Name: "execution_error", Type: DB_Text, Nullable: false}, - {Name: "last_eval_data", Type: DB_Text, Nullable: false}, - {Name: "last_eval_time", Type: DB_DateTime, Nullable: false}, + {Name: "execution_error", Type: DB_Text, Nullable: true}, + {Name: "last_eval_data", Type: DB_Text, Nullable: true}, + {Name: "last_eval_time", Type: DB_DateTime, Nullable: true}, {Name: "created", Type: DB_DateTime, Nullable: false}, {Name: "updated", Type: DB_DateTime, Nullable: false}, {Name: "updated_by", Type: DB_BigInt, Nullable: false},