Sort notification channels alphabetically (#37426)

Even without the ability to control the sort order or to filter, this notably improves usability for long lists of notification channels.

Partially fixes #20067.
This commit is contained in:
Jason Stangroome
2021-08-20 06:49:14 +10:00
committed by GitHub
parent 170d1bf954
commit 28784935b8
2 changed files with 5 additions and 1 deletions

View File

@@ -112,7 +112,7 @@ func GetAlertNotificationsWithUid(query *models.GetAlertNotificationsWithUidQuer
func GetAllAlertNotifications(query *models.GetAllAlertNotificationsQuery) error {
results := make([]*models.AlertNotification, 0)
if err := x.Where("org_id = ?", query.OrgId).Find(&results); err != nil {
if err := x.Where("org_id = ?", query.OrgId).Asc("name").Find(&results); err != nil {
return err
}