provisioning: improve UX when saving provisioned dashboards

This commit is contained in:
bergquist
2018-03-26 15:08:46 +02:00
parent a20f3d196c
commit d6faa3d06f
11 changed files with 152 additions and 4 deletions
+7
View File
@@ -102,6 +102,13 @@ func GetDashboard(c *m.ReqContext) Response {
meta.FolderUrl = query.Result.GetUrl()
}
dpQuery := &m.GetProvisionedDashboardByDashboardId{DashboardId: dash.Id}
err = bus.Dispatch(dpQuery)
if dpQuery.Result != nil {
meta.CanEdit = true
meta.Provisioned = true
}
// make sure db version is in sync with json model version
dash.Data.Set("version", dash.Version)
+1
View File
@@ -28,6 +28,7 @@ type DashboardMeta struct {
FolderId int64 `json:"folderId"`
FolderTitle string `json:"folderTitle"`
FolderUrl string `json:"folderUrl"`
Provisioned bool `json:"provisioned"`
}
type DashboardFullWithMeta struct {