Plugins: Refactor plugin resource call with and without data source (#48754)

* refactor plugin resource call with/without ds

* check err

* fix imports

* only validate req on ds path

* Update warn log

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
Will Browne
2022-05-06 10:58:02 +02:00
committed by GitHub
co-authored by Marcus Efraimsson
parent c4edab884e
commit f135a5c8a4
6 changed files with 336 additions and 286 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ func (hs *HTTPServer) CallDatasourceResource(c *models.ReqContext) {
return
}
hs.callPluginResource(c, plugin.ID, ds.Uid)
hs.callPluginResourceWithDataSource(c, plugin.ID, ds)
}
func (hs *HTTPServer) convertModelToDtos(ctx context.Context, ds *models.DataSource) dtos.DataSource {