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:
Ryan McKinley
2025-11-06 15:31:02 +01:00
committed by GitHub
parent ca5d898120
commit 95ffd1a55a
9 changed files with 62 additions and 51 deletions
-7
View File
@@ -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",