[v9.3.x] Plugins: Fix plugin query help markdown (#60907)

Plugins: Fix plugin query help markdown  (#60485)

* refactor(pluginhelp): rewrite as functional component with useAsync

* mimic old behaviour

* feat(pluginhelp): display message if backend returned an empty string

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 9aed364898)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2023-01-03 09:11:50 -05:00
committed by GitHub
co-authored by Will Browne
parent 0404d07666
commit db83d5f398
3 changed files with 19 additions and 70 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ func (hs *HTTPServer) GetPluginMarkdown(c *models.ReqContext) response.Response
// fallback try readme
if len(content) == 0 {
content, err = hs.pluginMarkdown(c.Req.Context(), pluginID, "help")
content, err = hs.pluginMarkdown(c.Req.Context(), pluginID, "readme")
if err != nil {
return response.Error(501, "Could not get markdown file", err)
}