mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
Dashboards: Add org_id in dashboards query (#61542)
* Add org_id in dashboards query * Update OrgID * Remove unused orgid
This commit is contained in:
parent
665f85cd7e
commit
0d70eb18ac
@ -974,6 +974,9 @@ func (d *DashboardStore) GetDashboards(ctx context.Context, query *dashboards.Ge
|
||||
} else {
|
||||
session = sess.In("uid", query.DashboardUIDs)
|
||||
}
|
||||
if query.OrgID > 0 {
|
||||
session = sess.Where("org_id = ?", query.OrgID)
|
||||
}
|
||||
|
||||
err := session.Find(&dashboards)
|
||||
query.Result = dashboards
|
||||
|
@ -256,6 +256,7 @@ type GetDashboardTagsQuery struct {
|
||||
type GetDashboardsQuery struct {
|
||||
DashboardIDs []int64
|
||||
DashboardUIDs []string
|
||||
OrgID int64
|
||||
Result []*Dashboard
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user