[release-11.6.8] Annotations: Honor dashboardUID on dashboardsWithVisibleAnnotations (#113235)
Annotations: Honor dashboardUID on dashboardsWithVisibleAnnotations (#112350)
* Annotations: Honor dashboardUID on dashboardsWithVisibleAnnotations
---------
(cherry picked from commit 75a1846344)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
This commit is contained in:
@@ -131,7 +131,9 @@ func (authz *AuthService) dashboardsWithVisibleAnnotations(ctx context.Context,
|
||||
searchstore.OrgFilter{OrgId: query.OrgID},
|
||||
}
|
||||
|
||||
var dashboardUIDs []string
|
||||
if query.DashboardUID != "" {
|
||||
dashboardUIDs = append(dashboardUIDs, query.DashboardUID)
|
||||
filters = append(filters, searchstore.DashboardFilter{
|
||||
UIDs: []string{query.DashboardUID},
|
||||
})
|
||||
@@ -143,12 +145,13 @@ func (authz *AuthService) dashboardsWithVisibleAnnotations(ctx context.Context,
|
||||
}
|
||||
|
||||
dashs, err := authz.dashSvc.SearchDashboards(ctx, &dashboards.FindPersistedDashboardsQuery{
|
||||
OrgId: query.SignedInUser.GetOrgID(),
|
||||
Filters: filters,
|
||||
SignedInUser: query.SignedInUser,
|
||||
Page: query.Page,
|
||||
Type: filterType,
|
||||
Limit: authz.searchDashboardsPageLimit,
|
||||
DashboardUIDs: dashboardUIDs,
|
||||
OrgId: query.SignedInUser.GetOrgID(),
|
||||
Filters: filters,
|
||||
SignedInUser: query.SignedInUser,
|
||||
Page: query.Page,
|
||||
Type: filterType,
|
||||
Limit: authz.searchDashboardsPageLimit,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user