new endpoint to post/get trimmed dashboard json (#33465)

* new endpoint to post/get trimed dashboard json

* add isdisabled check in dashboard.go
This commit is contained in:
ying-jeanne
2021-04-28 19:38:33 +08:00
committed by GitHub
parent 076e2ce06a
commit 748778fff0
19 changed files with 572 additions and 14 deletions

View File

@@ -324,6 +324,7 @@ func (hs *HTTPServer) registerRoutes() {
dashboardRoute.Delete("/db/:slug", routing.Wrap(hs.DeleteDashboardBySlug))
dashboardRoute.Post("/calculate-diff", bind(dtos.CalculateDiffOptions{}), routing.Wrap(CalculateDashboardDiff))
dashboardRoute.Post("/trim", bind(models.TrimDashboardCommand{}), routing.Wrap(hs.TrimDashboard))
dashboardRoute.Post("/db", bind(models.SaveDashboardCommand{}), routing.Wrap(hs.PostDashboard))
dashboardRoute.Get("/home", routing.Wrap(hs.GetHomeDashboard))