provisioning: improve UX when saving provisioned dashboards
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user