wire up the ui to the new search api (#97866)
wire up the ui to the new search api Co-authored-by: Scott Lepper <scott.lepper@gmail.com> Co-authored-by: Ryan McKinley <ryantxu@gmail.com> Co-authored-by: Dan Cech <dcech@grafana.com>
This commit is contained in:
co-authored by
Ryan McKinley
Dan Cech
parent
86a13ea4bd
commit
a8f347144d
@@ -51,26 +51,16 @@ type SortableField struct {
|
||||
Type string `json:"type,omitempty"` // string or number
|
||||
}
|
||||
|
||||
// Dashboard or folder hit
|
||||
// +enum
|
||||
type HitKind string
|
||||
|
||||
// PluginType values
|
||||
const (
|
||||
HitTypeDash HitKind = "Dashboard"
|
||||
HitTypeFolder HitKind = "Folder"
|
||||
)
|
||||
|
||||
type DashboardHit struct {
|
||||
// Dashboard or folder
|
||||
Kind HitKind `json:"kind"`
|
||||
Resource string `json:"resource"` // dashboards | folders
|
||||
// The k8s "name" (eg, grafana UID)
|
||||
Name string `json:"name"`
|
||||
// The display nam
|
||||
Title string `json:"title"`
|
||||
// Filter tags
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
// The UID/name for the folder
|
||||
// The k8s name (eg, grafana UID) for the parent folder
|
||||
Folder string `json:"folder,omitempty"`
|
||||
// Stick untyped extra fields in this object (including the sort value)
|
||||
Field *common.Unstructured `json:"field,omitempty"`
|
||||
|
||||
@@ -216,13 +216,12 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardHit(ref common.ReferenceCallbac
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"kind": {
|
||||
"resource": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Dashboard or folder\n\nPossible enum values:\n - `\"Dashboard\"`\n - `\"Folder\"`",
|
||||
Description: "Dashboard or folder",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"Dashboard", "Folder"},
|
||||
},
|
||||
},
|
||||
"name": {
|
||||
@@ -258,7 +257,7 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardHit(ref common.ReferenceCallbac
|
||||
},
|
||||
"folder": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The UID/name for the folder",
|
||||
Description: "The k8s name (eg, grafana UID) for the parent folder",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
@@ -283,7 +282,7 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardHit(ref common.ReferenceCallbac
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"kind", "name", "title"},
|
||||
Required: []string{"resource", "name", "title"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
|
||||
Reference in New Issue
Block a user