mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 07:32:12 +08:00
Library Panels: Remove dashboards table dependency when getting all library panels (#99160)
* Remove dashboards table dependency when getting all library panels * Filter library elements a user can see using the folder service * Stop using folder name as UID in get all elements tests * Set actual folder name not UID when getting all elements * Stop selecting folder name in the get all elements sql query * Introduce a library elements param selector without where clause * Include empty string as general folder UID when getting all library elements --------- Co-authored-by: suntala <arati.rana@grafana.com>
This commit is contained in:
@ -343,11 +343,11 @@ func createFolder(t *testing.T, sc scenarioContext, title string, folderSvc fold
|
||||
store := folderimpl.ProvideStore(sc.sqlStore)
|
||||
folderSvc = folderimpl.ProvideService(store, ac, bus.ProvideBus(tracing.InitializeTracerForTest()), dashboardStore, folderStore, sc.sqlStore,
|
||||
features, supportbundlestest.NewFakeBundleService(), nil, cfg, nil, tracing.InitializeTracerForTest())
|
||||
t.Logf("Creating folder with title and UID %q", title)
|
||||
t.Logf("Creating folder with title %q and UID uid_for_%s", title, title)
|
||||
}
|
||||
ctx := identity.WithRequester(context.Background(), &sc.user)
|
||||
folder, err := folderSvc.Create(ctx, &folder.CreateFolderCommand{
|
||||
OrgID: sc.user.OrgID, Title: title, UID: title, SignedInUser: &sc.user,
|
||||
OrgID: sc.user.OrgID, Title: title, UID: "uid_for_" + title, SignedInUser: &sc.user,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user