PanelTitleSearch: Show datasource usage in plugins (#83922)

This commit is contained in:
Ryan McKinley
2024-03-05 22:20:38 +02:00
committed by GitHub
parent cb008657cb
commit 3e86a4edc8
4 changed files with 19 additions and 3 deletions
+6
View File
@@ -435,6 +435,12 @@ func doSearchQuery(
hasConstraints = true
}
// DatasourceType
if q.DatasourceType != "" {
fullQuery.AddMust(bluge.NewTermQuery(q.DatasourceType).SetField(documentFieldDSType))
hasConstraints = true
}
// Folder
if q.Location != "" {
fullQuery.AddMust(bluge.NewTermQuery(q.Location).SetField(documentFieldLocation))
+1 -1
View File
@@ -18,7 +18,7 @@ type DashboardQuery struct {
Query string `json:"query"`
Location string `json:"location,omitempty"` // parent folder ID
Sort string `json:"sort,omitempty"` // field ASC/DESC
Datasource string `json:"ds_uid,omitempty"` // "datasource" collides with the JSON value at the same leel :()
Datasource string `json:"ds_uid,omitempty"` // "datasource" collides with the JSON value at the same level :()
DatasourceType string `json:"ds_type,omitempty"`
Tags []string `json:"tags,omitempty"`
Kind []string `json:"kind,omitempty"`