feat(alerting): move alert deletion to alert code

This commit is contained in:
bergquist
2016-04-26 15:48:29 +02:00
parent bb42579b0f
commit 3ef2be13df
3 changed files with 163 additions and 57 deletions

View File

@@ -227,7 +227,6 @@ func DeleteDashboard(cmd *m.DeleteDashboardCommand) error {
"DELETE FROM dashboard_tag WHERE dashboard_id = ? ",
"DELETE FROM star WHERE dashboard_id = ? ",
"DELETE FROM dashboard WHERE id = ?",
"DELETE FROM alert_rule WHERE dashboard_id = ?",
}
for _, sql := range deletes {
@@ -237,6 +236,10 @@ func DeleteDashboard(cmd *m.DeleteDashboardCommand) error {
}
}
if err := DeleteAlertDefinition(dashboard.Id, sess.Session); err != nil {
return nil
}
return nil
})
}