mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboards: add support for retrieving a dashboard by uid
Introduces new url in api /dashboards/<uid> for fetching dashboard by unique id Leave the old dashboard by slug url /dashboards/db/<slug> for backward compatibility and for supporting fallback WIP for #7883
This commit is contained in:
@@ -165,7 +165,7 @@ func setHasAcl(sess *DBSession, dash *m.Dashboard) error {
|
||||
}
|
||||
|
||||
func GetDashboard(query *m.GetDashboardQuery) error {
|
||||
dashboard := m.Dashboard{Slug: query.Slug, OrgId: query.OrgId, Id: query.Id}
|
||||
dashboard := m.Dashboard{Slug: query.Slug, OrgId: query.OrgId, Id: query.Id, Uid: query.Uid}
|
||||
has, err := x.Get(&dashboard)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user