Search: fix uid/name filter (#98981)

[search] fix uid/name filter
pull/98184/head
Scott Lepper 4 months ago committed by GitHub
parent feb334cdbb
commit 3b8477dcda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      pkg/services/dashboards/service/dashboard_service.go

@ -1717,7 +1717,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
if len(query.DashboardUIDs) > 0 {
request.Options.Fields = []*resource.Requirement{{
Key: "key.name",
Key: "name",
Operator: string(selection.In),
Values: query.DashboardUIDs,
}}
@ -1791,6 +1791,10 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
request.Options.Fields = append(request.Options.Fields, req...)
}
if query.Limit > 0 {
request.Limit = query.Limit
}
res, err := dr.k8sclient.getSearcher().Search(ctx, request)
if err != nil {
return nil, err

Loading…
Cancel
Save