Chore: Deprecate FolderID from SaveDashboardCommand (#77813)
This commit is contained in:
@@ -337,7 +337,7 @@ func TestIntegrationDashboardInheritedFolderRBAC(t *testing.T) {
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
"title": dashInParentTitle,
|
||||
}),
|
||||
FolderID: nestedFolders[0].ID,
|
||||
FolderID: nestedFolders[0].ID, // nolint:staticcheck
|
||||
FolderUID: nestedFolders[0].UID,
|
||||
}
|
||||
_, err = dashboardWriteStore.SaveDashboard(context.Background(), saveDashboardCmd)
|
||||
@@ -350,7 +350,7 @@ func TestIntegrationDashboardInheritedFolderRBAC(t *testing.T) {
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
"title": dashInSubfolderTitle,
|
||||
}),
|
||||
FolderID: nestedFolders[1].ID,
|
||||
FolderID: nestedFolders[1].ID, // nolint:staticcheck
|
||||
FolderUID: nestedFolders[1].UID,
|
||||
}
|
||||
_, err = dashboardWriteStore.SaveDashboard(context.Background(), saveDashboardCmd)
|
||||
@@ -440,7 +440,7 @@ func moveDashboard(t *testing.T, dashboardStore dashboards.Store, orgId int64, d
|
||||
|
||||
cmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: orgId,
|
||||
FolderID: newFolderId,
|
||||
FolderID: newFolderId, // nolint:staticcheck
|
||||
FolderUID: newFolderUID,
|
||||
Dashboard: dashboard,
|
||||
Overwrite: true,
|
||||
|
||||
@@ -25,7 +25,7 @@ func TestIntegrationDashboardProvisioningTest(t *testing.T) {
|
||||
|
||||
folderCmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: 1,
|
||||
FolderID: 0,
|
||||
FolderID: 0, // nolint:staticcheck
|
||||
FolderUID: "",
|
||||
IsFolder: true,
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
@@ -40,7 +40,7 @@ func TestIntegrationDashboardProvisioningTest(t *testing.T) {
|
||||
saveDashboardCmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: 1,
|
||||
IsFolder: false,
|
||||
FolderID: dash.ID,
|
||||
FolderID: dash.ID, // nolint:staticcheck
|
||||
FolderUID: dash.UID,
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
"id": nil,
|
||||
@@ -67,7 +67,7 @@ func TestIntegrationDashboardProvisioningTest(t *testing.T) {
|
||||
saveCmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: 1,
|
||||
IsFolder: false,
|
||||
FolderID: dash.ID,
|
||||
FolderID: dash.ID, // nolint:staticcheck
|
||||
FolderUID: dash.UID,
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
"id": nil,
|
||||
|
||||
@@ -219,7 +219,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
"tags": []interface{}{},
|
||||
}),
|
||||
Overwrite: true,
|
||||
FolderID: 2,
|
||||
FolderID: 2, // nolint:staticcheck
|
||||
UserID: 100,
|
||||
}
|
||||
dash, err := dashboardStore.SaveDashboard(context.Background(), cmd)
|
||||
@@ -234,7 +234,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
"title": "folderId",
|
||||
"tags": []interface{}{},
|
||||
}),
|
||||
FolderID: 0,
|
||||
FolderID: 0, // nolint:staticcheck
|
||||
Overwrite: true,
|
||||
UserID: 100,
|
||||
}
|
||||
@@ -1151,7 +1151,7 @@ func insertTestDashboard(t *testing.T, dashboardStore dashboards.Store, title st
|
||||
t.Helper()
|
||||
cmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: orgId,
|
||||
FolderID: folderId,
|
||||
FolderID: folderId, // nolint:staticcheck
|
||||
FolderUID: folderUID,
|
||||
IsFolder: isFolder,
|
||||
Dashboard: simplejson.NewFromAny(map[string]interface{}{
|
||||
@@ -1173,7 +1173,7 @@ func insertTestDashboardForPlugin(t *testing.T, dashboardStore dashboards.Store,
|
||||
t.Helper()
|
||||
cmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: orgId,
|
||||
FolderID: folderId,
|
||||
FolderID: folderId, // nolint:staticcheck
|
||||
IsFolder: isFolder,
|
||||
Dashboard: simplejson.NewFromAny(map[string]interface{}{
|
||||
"id": nil,
|
||||
|
||||
Reference in New Issue
Block a user