AlertNotifications: Translate notifications IDs to UIDs in Rule builder (#19882)

* AlertNotifications: Translate notifications IDs to UIDs in alert Rule builder

* Avoid shadowing errors, raise validation error on non-existing notification id

* create a cache for notification Uids to minimize db overhead

* add cache usage test

* avoid caching empty notification Uids

* isolate db in alert notificationUid caching tests
This commit is contained in:
Dima Ryskin
2020-03-18 15:00:56 +02:00
committed by GitHub
parent 492264abc3
commit 44b7f3ea1c
6 changed files with 198 additions and 8 deletions

View File

@@ -91,6 +91,13 @@ type DeleteAlertNotificationWithUidCommand struct {
OrgId int64
}
type GetAlertNotificationUidQuery struct {
Id int64
OrgId int64
Result string
}
type GetAlertNotificationsQuery struct {
Name string
Id int64