[v10.4.x] Add FolderUID for library elements (#86281)
Add FolderUID for library elements (#83819) * Revert "Revert "Add FolderUID for library elements" (#83776)" This reverts commit0dfdb2ae47. * Fix bug, dashboard id and library element fodler_id are the corresponding values Dashboard table hold both dahboards and tables (cherry picked from commit5c4a2de59b) Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
This commit is contained in:
co-authored by
idafurjes
parent
367051d038
commit
8e9b524b55
@@ -446,10 +446,12 @@ func TestIntegrationNestedFolderService(t *testing.T) {
|
||||
|
||||
// nolint:staticcheck
|
||||
libraryElementCmd.FolderID = parent.ID
|
||||
libraryElementCmd.FolderUID = &parent.UID
|
||||
_, err = lps.LibraryElementService.CreateElement(context.Background(), &signedInUser, libraryElementCmd)
|
||||
require.NoError(t, err)
|
||||
// nolint:staticcheck
|
||||
libraryElementCmd.FolderID = subfolder.ID
|
||||
libraryElementCmd.FolderUID = &subfolder.UID
|
||||
_, err = lps.LibraryElementService.CreateElement(context.Background(), &signedInUser, libraryElementCmd)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -526,10 +528,12 @@ func TestIntegrationNestedFolderService(t *testing.T) {
|
||||
|
||||
// nolint:staticcheck
|
||||
libraryElementCmd.FolderID = parent.ID
|
||||
libraryElementCmd.FolderUID = &parent.UID
|
||||
_, err = lps.LibraryElementService.CreateElement(context.Background(), &signedInUser, libraryElementCmd)
|
||||
require.NoError(t, err)
|
||||
// nolint:staticcheck
|
||||
libraryElementCmd.FolderID = subfolder.ID
|
||||
libraryElementCmd.FolderUID = &subfolder.UID
|
||||
_, err = lps.LibraryElementService.CreateElement(context.Background(), &signedInUser, libraryElementCmd)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -665,11 +669,13 @@ func TestIntegrationNestedFolderService(t *testing.T) {
|
||||
_ = createRule(t, alertStore, subfolder.UID, "sub alert")
|
||||
// nolint:staticcheck
|
||||
libraryElementCmd.FolderID = subfolder.ID
|
||||
libraryElementCmd.FolderUID = &subPanel.FolderUID
|
||||
subPanel, err = lps.LibraryElementService.CreateElement(context.Background(), &signedInUser, libraryElementCmd)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
// nolint:staticcheck
|
||||
libraryElementCmd.FolderID = parent.ID
|
||||
libraryElementCmd.FolderUID = &parent.UID
|
||||
parentPanel, err := lps.LibraryElementService.CreateElement(context.Background(), &signedInUser, libraryElementCmd)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user