* LibraryPanels: Adds usage collection
* Refactor: renames Panel and Variable consts
* Chore: initialize stats
* Refactor: moves library element migrations to migration namespace
(cherry picked from commit 7204a64717)
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
This commit is contained in:
co-authored by
Hugo Häggmark
parent
34a1621a5c
commit
7f919c0e55
@@ -76,7 +76,7 @@ func (lps *LibraryPanelService) LoadLibraryPanelsForDashboard(c *models.ReqConte
|
||||
continue
|
||||
}
|
||||
|
||||
if libraryelements.LibraryElementKind(elementInDB.Kind) != libraryelements.Panel {
|
||||
if models.LibraryElementKind(elementInDB.Kind) != models.PanelElement {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ func TestConnectLibraryPanelsForDashboard(t *testing.T) {
|
||||
"description": "Unused description"
|
||||
}
|
||||
`),
|
||||
Kind: int64(libraryelements.Panel),
|
||||
Kind: int64(models.PanelElement),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
dashJSON := map[string]interface{}{
|
||||
@@ -783,7 +783,7 @@ func scenarioWithLibraryPanel(t *testing.T, desc string, fn func(t *testing.T, s
|
||||
"description": "A description"
|
||||
}
|
||||
`),
|
||||
Kind: int64(libraryelements.Panel),
|
||||
Kind: int64(models.PanelElement),
|
||||
}
|
||||
resp, err := sc.elementService.CreateElement(sc.reqContext, command)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user