diff --git a/pkg/services/dashboards/dashboards.go b/pkg/services/dashboards/dashboards.go index 24e9f240fd8..4bdba59b18e 100644 --- a/pkg/services/dashboards/dashboards.go +++ b/pkg/services/dashboards/dashboards.go @@ -23,14 +23,12 @@ func SetRepository(rep Repository) { } type SaveDashboardItem struct { - TitleLower string - OrgId int64 - Folder string - UpdatedAt time.Time - UserId int64 - Message string - Overwrite bool - Dashboard *models.Dashboard + OrgId int64 + UpdatedAt time.Time + UserId int64 + Message string + Overwrite bool + Dashboard *models.Dashboard } type DashboardRepository struct{} @@ -57,6 +55,8 @@ func (dr *DashboardRepository) SaveDashboard(json *SaveDashboardItem) (*models.D OrgId: json.OrgId, Overwrite: json.Overwrite, UserId: json.UserId, + FolderId: dashboard.FolderId, + IsFolder: dashboard.IsFolder, } if !json.UpdatedAt.IsZero() { diff --git a/pkg/services/provisioning/dashboards/types.go b/pkg/services/provisioning/dashboards/types.go index 002a56b5f3c..c4c4a67a755 100644 --- a/pkg/services/provisioning/dashboards/types.go +++ b/pkg/services/provisioning/dashboards/types.go @@ -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 == "" { diff --git a/public/app/core/components/search/search_results.ts b/public/app/core/components/search/search_results.ts index 02b6c9f355b..0c74600d1c3 100644 --- a/public/app/core/components/search/search_results.ts +++ b/public/app/core/components/search/search_results.ts @@ -9,7 +9,6 @@ export class SearchResultsCtrl { /** @ngInject */ constructor(private $location) { - } toggleFolderExpand(section) {