LibraryPanel: Cleanup service calls (#113277)
* cleanup * library panel via search * test cleanup * merge main * add FindDashboards mock * no matching dashbaords should return empty * do not alllow name and libraryPanel query
This commit is contained in:
@@ -438,7 +438,6 @@ func (hs *HTTPServer) postDashboard(c *contextmodel.ReqContext, cmd dashboards.S
|
||||
}
|
||||
|
||||
ctx = c.Req.Context()
|
||||
var err error
|
||||
|
||||
var userID int64
|
||||
if id, err := identity.UserIdentifier(c.GetID()); err == nil {
|
||||
@@ -518,12 +517,6 @@ func (hs *HTTPServer) postDashboard(c *contextmodel.ReqContext, cmd dashboards.S
|
||||
return apierrors.ToDashboardErrorResponse(ctx, hs.pluginStore, saveErr)
|
||||
}
|
||||
|
||||
// connect library panels for this dashboard after the dashboard is stored and has an ID
|
||||
err = hs.LibraryPanelService.ConnectLibraryPanelsForDashboard(ctx, c.SignedInUser, dashboard)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Error while connecting library panels", err)
|
||||
}
|
||||
|
||||
c.TimeRequest(metrics.MApiDashboardSave)
|
||||
return response.JSON(http.StatusOK, util.DynMap{
|
||||
"status": "success",
|
||||
|
||||
Reference in New Issue
Block a user