NGAlert: Migrate old notification channel config (#33846)
* NGAlert: Migrate old notification channel config Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Copy the required structs and functions Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Fix lint Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Fix review comments and error on discontinued channels Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Use both ID and UID to map channels, attach UID to channels Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Fix lint Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Bug fixes Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Use alert table instead of dashboard for channel IDs Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Fix offline reviews: don't add empty receivers and routes, add receiver for unmigrated channels Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Handle multiple default channels, pick default from used channels Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com> * Include default channels in all receivers Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
@@ -21,8 +21,8 @@ type dashAlert struct {
|
||||
}
|
||||
|
||||
var slurpDashSQL = `
|
||||
SELECT id,
|
||||
org_id,
|
||||
SELECT id,
|
||||
org_id,
|
||||
dashboard_id,
|
||||
panel_id,
|
||||
org_id,
|
||||
@@ -70,7 +70,8 @@ type dashAlertSettings struct {
|
||||
// dashAlertNot is the object that represents the Notifications array in
|
||||
// dashAlertSettings
|
||||
type dashAlertNot struct {
|
||||
UID string `json:"uid"`
|
||||
UID string `json:"uid,omitempty"`
|
||||
ID int64 `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// dashAlertingConditionJSON is like classic.ClassicConditionJSON except that it
|
||||
|
||||
Reference in New Issue
Block a user