mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Deprecate FolderIds from FindPersistedDashboardsQuery (#77651)
* Chore: Deprecate FolderIds from FindPersistedDashboardsQuery * Update pkg/services/dashboards/models.go Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com> --------- Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
This commit is contained in:
parent
1c758ab5f2
commit
c94410fdee
@ -1004,6 +1004,7 @@ func (d *dashboardStore) FindDashboards(ctx context.Context, query *dashboards.F
|
||||
filters = append(filters, searchstore.TypeFilter{Dialect: d.store.GetDialect(), Type: query.Type})
|
||||
}
|
||||
|
||||
// nolint:staticcheck
|
||||
if len(query.FolderIds) > 0 {
|
||||
filters = append(filters, searchstore.FolderFilter{IDs: query.FolderIds})
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ func TestIntegrationDashboardFolderDataAccess(t *testing.T) {
|
||||
FolderIds: []int64{
|
||||
rootFolderId,
|
||||
folder1.ID,
|
||||
},
|
||||
}, // nolint:staticcheck
|
||||
SignedInUser: currentUser,
|
||||
OrgId: 1,
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
|
||||
query := dashboards.FindPersistedDashboardsQuery{
|
||||
OrgId: 1,
|
||||
FolderIds: []int64{savedFolder.ID},
|
||||
FolderIds: []int64{savedFolder.ID}, // nolint:staticcheck
|
||||
SignedInUser: &user.SignedInUser{},
|
||||
}
|
||||
|
||||
@ -435,7 +435,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
setup()
|
||||
query := dashboards.FindPersistedDashboardsQuery{
|
||||
OrgId: 1,
|
||||
FolderIds: []int64{savedFolder.ID},
|
||||
FolderIds: []int64{savedFolder.ID}, // nolint:staticcheck
|
||||
SignedInUser: &user.SignedInUser{
|
||||
OrgID: 1,
|
||||
OrgRole: org.RoleEditor,
|
||||
|
@ -486,13 +486,14 @@ type FindPersistedDashboardsQuery struct {
|
||||
DashboardIds []int64
|
||||
DashboardUIDs []string
|
||||
Type string
|
||||
FolderIds []int64
|
||||
FolderUIDs []string
|
||||
Tags []string
|
||||
Limit int64
|
||||
Page int64
|
||||
Permission PermissionType
|
||||
Sort model.SortOption
|
||||
// Deprecated: use FolderUIDs instead
|
||||
FolderIds []int64
|
||||
FolderUIDs []string
|
||||
Tags []string
|
||||
Limit int64
|
||||
Page int64
|
||||
Permission PermissionType
|
||||
Sort model.SortOption
|
||||
|
||||
Filters []any
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user