mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Deprecate FolderIds in Query (#77624)
Chore: Deprecate FolderID in Query
This commit is contained in:
parent
a7d08997f7
commit
a5044fe6db
@ -112,7 +112,7 @@ func (hs *HTTPServer) GetAlerts(c *contextmodel.ReqContext) response.Response {
|
|||||||
OrgId: c.SignedInUser.GetOrgID(),
|
OrgId: c.SignedInUser.GetOrgID(),
|
||||||
DashboardIds: dashboardIDs,
|
DashboardIds: dashboardIDs,
|
||||||
Type: string(model.DashHitDB),
|
Type: string(model.DashHitDB),
|
||||||
FolderIds: folderIDs,
|
FolderIds: folderIDs, // nolint:staticcheck
|
||||||
Permission: dashboards.PERMISSION_VIEW,
|
Permission: dashboards.PERMISSION_VIEW,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ func (hs *HTTPServer) searchFolders(c *contextmodel.ReqContext) ([]*folder.Folde
|
|||||||
searchQuery := search.Query{
|
searchQuery := search.Query{
|
||||||
SignedInUser: c.SignedInUser,
|
SignedInUser: c.SignedInUser,
|
||||||
DashboardIds: make([]int64, 0),
|
DashboardIds: make([]int64, 0),
|
||||||
FolderIds: make([]int64, 0),
|
FolderIds: make([]int64, 0), // nolint:staticcheck
|
||||||
Limit: c.QueryInt64("limit"),
|
Limit: c.QueryInt64("limit"),
|
||||||
OrgId: c.SignedInUser.GetOrgID(),
|
OrgId: c.SignedInUser.GetOrgID(),
|
||||||
Type: "dash-folder",
|
Type: "dash-folder",
|
||||||
|
@ -80,7 +80,7 @@ func (hs *HTTPServer) Search(c *contextmodel.ReqContext) response.Response {
|
|||||||
DashboardIds: dbIDs,
|
DashboardIds: dbIDs,
|
||||||
DashboardUIDs: dbUIDs,
|
DashboardUIDs: dbUIDs,
|
||||||
Type: dashboardType,
|
Type: dashboardType,
|
||||||
FolderIds: folderIDs,
|
FolderIds: folderIDs, // nolint:staticcheck
|
||||||
FolderUIDs: folderUIDs,
|
FolderUIDs: folderUIDs,
|
||||||
Permission: permission,
|
Permission: permission,
|
||||||
Sort: sort,
|
Sort: sort,
|
||||||
|
@ -37,10 +37,11 @@ type Query struct {
|
|||||||
Type string
|
Type string
|
||||||
DashboardUIDs []string
|
DashboardUIDs []string
|
||||||
DashboardIds []int64
|
DashboardIds []int64
|
||||||
FolderIds []int64
|
// Deprecated: use FolderUID instead
|
||||||
FolderUIDs []string
|
FolderIds []int64
|
||||||
Permission dashboards.PermissionType
|
FolderUIDs []string
|
||||||
Sort string
|
Permission dashboards.PermissionType
|
||||||
|
Sort string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Service interface {
|
type Service interface {
|
||||||
@ -83,7 +84,7 @@ func (s *SearchService) SearchHandler(ctx context.Context, query *Query) (model.
|
|||||||
DashboardUIDs: query.DashboardUIDs,
|
DashboardUIDs: query.DashboardUIDs,
|
||||||
DashboardIds: query.DashboardIds,
|
DashboardIds: query.DashboardIds,
|
||||||
Type: query.Type,
|
Type: query.Type,
|
||||||
FolderIds: query.FolderIds,
|
FolderIds: query.FolderIds, // nolint:staticcheck
|
||||||
FolderUIDs: query.FolderUIDs,
|
FolderUIDs: query.FolderUIDs,
|
||||||
Tags: query.Tags,
|
Tags: query.Tags,
|
||||||
Limit: query.Limit,
|
Limit: query.Limit,
|
||||||
|
Loading…
Reference in New Issue
Block a user