mirror of https://github.com/grafana/grafana.git
Include library elements on counts endpoint (#98246)
This commit is contained in:
parent
989ee681f8
commit
c1e078b3a3
|
@ -63,6 +63,12 @@ func (s *LegacyStatsGetter) GetStats(ctx context.Context, in *resource.ResourceS
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Legacy library_elements table
|
||||
err = fn("library_element", "org_id=? AND folder_uid=?", group, "library_elements")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
|
@ -133,6 +133,10 @@ func TestDirectSQLStats(t *testing.T) {
|
|||
"group": "sql-fallback",
|
||||
"resource": "folders",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"group": "sql-fallback",
|
||||
"resource": "library_elements"
|
||||
}
|
||||
]`, string(jj))
|
||||
})
|
||||
|
@ -161,6 +165,10 @@ func TestDirectSQLStats(t *testing.T) {
|
|||
{
|
||||
"group": "sql-fallback",
|
||||
"resource": "folders"
|
||||
},
|
||||
{
|
||||
"group": "sql-fallback",
|
||||
"resource": "library_elements"
|
||||
}
|
||||
]`, string(jj))
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue