mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 19:02:36 +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:
@ -67,7 +67,7 @@ func TestPatchLibraryElement(t *testing.T) {
|
||||
Version: 2,
|
||||
Meta: model.LibraryElementDTOMeta{
|
||||
FolderName: "NewFolder",
|
||||
FolderUID: "NewFolder",
|
||||
FolderUID: "uid_for_NewFolder",
|
||||
ConnectedDashboards: 0,
|
||||
Created: sc.initialResult.Result.Meta.Created,
|
||||
Updated: result.Result.Meta.Updated,
|
||||
@ -111,7 +111,7 @@ func TestPatchLibraryElement(t *testing.T) {
|
||||
sc.initialResult.Result.Meta.Updated = result.Result.Meta.Updated
|
||||
sc.initialResult.Result.Version = 2
|
||||
sc.initialResult.Result.Meta.FolderName = "NewFolder"
|
||||
sc.initialResult.Result.Meta.FolderUID = "NewFolder"
|
||||
sc.initialResult.Result.Meta.FolderUID = "uid_for_NewFolder"
|
||||
if diff := cmp.Diff(sc.initialResult.Result, result.Result, getCompareOptions()...); diff != "" {
|
||||
t.Fatalf("Result mismatch (-want +got):\n%s", diff)
|
||||
}
|
||||
|
Reference in New Issue
Block a user