dashboard folder search fix

This commit is contained in:
Torkel Ödegaard
2017-06-23 16:00:26 -04:00
parent 456225365f
commit fc69d59cae
19 changed files with 146 additions and 254 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ type Dashboard struct {
UpdatedBy int64
CreatedBy int64
ParentId int64
FolderId int64
IsFolder bool
HasAcl bool
@@ -116,7 +116,7 @@ func (cmd *SaveDashboardCommand) GetDashboardModel() *Dashboard {
dash.OrgId = cmd.OrgId
dash.PluginId = cmd.PluginId
dash.IsFolder = cmd.IsFolder
dash.ParentId = cmd.ParentId
dash.FolderId = cmd.FolderId
dash.UpdateSlug()
return dash
}
@@ -144,7 +144,7 @@ type SaveDashboardCommand struct {
OrgId int64 `json:"-"`
RestoredFrom int `json:"-"`
PluginId string `json:"-"`
ParentId int64 `json:"parentId"`
FolderId int64 `json:"folderId"`
IsFolder bool `json:"isFolder"`
Result *Dashboard
+3 -3
View File
@@ -44,11 +44,11 @@ func TestDashboardModel(t *testing.T) {
json := simplejson.New()
json.Set("title", "test dash")
cmd := &SaveDashboardCommand{Dashboard: json, ParentId: 1}
cmd := &SaveDashboardCommand{Dashboard: json, FolderId: 1}
dash := cmd.GetDashboardModel()
Convey("Should set ParentId", func() {
So(dash.ParentId, ShouldEqual, 1)
Convey("Should set FolderId", func() {
So(dash.FolderId, ShouldEqual, 1)
})
})
}