@@ -53,8 +53,8 @@ type IndexableDocument struct {
|
||||
// The resource key
|
||||
Key *ResourceKey `json:"key"`
|
||||
|
||||
// The resource type ( for federated indexes )
|
||||
Kind string `json:"kind,omitempty"`
|
||||
// The k8s name
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// Resource version for the resource (if known)
|
||||
RV int64 `json:"rv,omitempty"`
|
||||
@@ -164,8 +164,8 @@ func NewIndexableDocument(key *ResourceKey, rv int64, obj utils.GrafanaMetaAcces
|
||||
}
|
||||
doc := &IndexableDocument{
|
||||
Key: key,
|
||||
Kind: key.Resource,
|
||||
RV: rv,
|
||||
Name: key.Name,
|
||||
Title: title, // We always want *something* to display
|
||||
TitleSort: strings.ToLower(title), // Lowercase for case-insensitive sorting
|
||||
Labels: obj.GetLabels(),
|
||||
|
||||
@@ -33,13 +33,13 @@ func TestStandardDocumentBuilder(t *testing.T) {
|
||||
"resource": "playlists",
|
||||
"name": "test1"
|
||||
},
|
||||
"kind": "playlists",
|
||||
"rv": 10,
|
||||
"title": "test playlist unified storage",
|
||||
"title_sort": "test playlist unified storage",
|
||||
"created": 1717236672000,
|
||||
"createdBy": "user:ABC",
|
||||
"updatedBy": "user:XYZ",
|
||||
"name": "test1",
|
||||
"repository": {
|
||||
"name": "SQL",
|
||||
"path": "15",
|
||||
|
||||
Reference in New Issue
Block a user