mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: FolderId and IsFolder when saving dashboard
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package dashboards
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
@@ -23,11 +22,9 @@ func createDashboardJson(data *simplejson.Json, lastModified time.Time, cfg *Das
|
||||
|
||||
dash := &dashboards.SaveDashboardItem{}
|
||||
dash.Dashboard = models.NewDashboardFromJson(data)
|
||||
dash.TitleLower = strings.ToLower(dash.Dashboard.Title)
|
||||
dash.UpdatedAt = lastModified
|
||||
dash.Overwrite = true
|
||||
dash.OrgId = cfg.OrgId
|
||||
dash.Folder = cfg.Folder
|
||||
dash.Dashboard.Data.Set("editable", cfg.Editable)
|
||||
|
||||
if dash.Dashboard.Title == "" {
|
||||
|
||||
Reference in New Issue
Block a user