Dashboards: Evaluate provisioned dashboard titles in a backwards compatible way (#65184)
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/slugify"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/dashboards"
|
||||
"github.com/grafana/grafana/pkg/services/provisioning/utils"
|
||||
@@ -299,7 +298,11 @@ func (fr *FileReader) getOrCreateFolderID(ctx context.Context, cfg *config, serv
|
||||
return 0, ErrFolderNameMissing
|
||||
}
|
||||
|
||||
cmd := &dashboards.GetDashboardQuery{Slug: slugify.Slugify(folderName), OrgID: cfg.OrgID}
|
||||
cmd := &dashboards.GetDashboardQuery{
|
||||
Title: &folderName,
|
||||
FolderID: util.Pointer(int64(0)),
|
||||
OrgID: cfg.OrgID,
|
||||
}
|
||||
result, err := fr.dashboardStore.GetDashboard(ctx, cmd)
|
||||
|
||||
if err != nil && !errors.Is(err, dashboards.ErrDashboardNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user