mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix tabs to spaces
This commit is contained in:
parent
2a4fedb6ee
commit
ddcbc753d3
@ -7,6 +7,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"gocloud.dev/blob/fileblob"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
grafanaregistry "github.com/grafana/grafana/pkg/apiserver/registry/generic"
|
||||
@ -244,13 +245,17 @@ func (b *entityBridge) PrepareList(ctx context.Context, req *resource.ListReques
|
||||
WithBody: true,
|
||||
}
|
||||
|
||||
// Assumes everything is equals
|
||||
if len(req.Options.Labels) > 0 {
|
||||
query.Labels = make(map[string]string)
|
||||
for _, q := range req.Options.Labels {
|
||||
// The entity structure only supports equals
|
||||
// the rest will be processed handled by the upstream predicate
|
||||
op := selection.Operator(q.Operator)
|
||||
if op == selection.Equals || op == selection.DoubleEquals {
|
||||
query.Labels[q.Key] = q.Values[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
found, err := b.client.List(ctx, query)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user