K8s: Fix dashboard search (#98989)

pull/98995/head
Stephanie Hingtgen 4 months ago committed by GitHub
parent e15fc984c3
commit dbfc412ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      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: "name",
Key: resource.SEARCH_FIELD_NAME,
Operator: string(selection.In),
Values: query.DashboardUIDs,
}}
@ -1736,7 +1736,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
if len(query.FolderUIDs) > 0 {
req := []*resource.Requirement{{
Key: "folder",
Key: resource.SEARCH_FIELD_FOLDER,
Operator: string(selection.In),
Values: query.FolderUIDs,
}}
@ -1745,7 +1745,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
if query.ProvisionedRepo != "" {
req := []*resource.Requirement{{
Key: "repo.name",
Key: resource.SEARCH_FIELD_REPOSITORY_NAME,
Operator: string(selection.In),
Values: []string{query.ProvisionedRepo},
}}
@ -1754,7 +1754,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
if len(query.ProvisionedReposNotIn) > 0 {
req := []*resource.Requirement{{
Key: "repo.name",
Key: resource.SEARCH_FIELD_REPOSITORY_NAME,
Operator: string(selection.NotIn),
Values: query.ProvisionedReposNotIn,
}}
@ -1762,7 +1762,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
}
if query.ProvisionedPath != "" {
req := []*resource.Requirement{{
Key: "repo.path",
Key: resource.SEARCH_FIELD_REPOSITORY_PATH,
Operator: string(selection.In),
Values: []string{query.ProvisionedPath},
}}
@ -1775,7 +1775,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
// but is currently not needed by other services in the backend
if query.Title != "" {
req := []*resource.Requirement{{
Key: "title",
Key: resource.SEARCH_FIELD_TITLE,
Operator: string(selection.In),
Values: []string{query.Title},
}}
@ -1784,7 +1784,7 @@ func (dr *DashboardServiceImpl) searchDashboardsThroughK8sRaw(ctx context.Contex
if len(query.Tags) > 0 {
req := []*resource.Requirement{{
Key: "tags",
Key: resource.SEARCH_FIELD_TAGS,
Operator: string(selection.In),
Values: query.Tags,
}}

Loading…
Cancel
Save