* first pass
* return list
* types and cleanup
* add to plugin page and add styles
* update comment
* update comment
* fix component path
* simplify error component
* simplify error struct
* fix tests
* don't export and fix string()
* update naming
* remove frontend
* introduce phantom loader
* track single error
* remove error from base
* remove unused struct
* remove unnecessary filter
* add errors endpoint
* Update set log to use id field
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* skip adding BE plugins
* remove errs from plugin + ds list
* remove unnecessary fields
* add signature state to panels
* remove unused code
* apply PR feedback
* update comment
* merge dto with model
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 1bee9f4168)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
co-authored by
Will Browne
parent
d8ed14f5a5
commit
648a149813
@@ -256,6 +256,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
apiRoute.Get("/plugins/:pluginId/health", Wrap(hs.CheckHealth))
|
||||
apiRoute.Any("/plugins/:pluginId/resources", hs.CallResource)
|
||||
apiRoute.Any("/plugins/:pluginId/resources/*", hs.CallResource)
|
||||
apiRoute.Any("/plugins/errors", Wrap(hs.GetPluginErrorsList))
|
||||
|
||||
apiRoute.Group("/plugins", func(pluginRoute routing.RouteRegister) {
|
||||
pluginRoute.Get("/:pluginId/dashboards/", Wrap(GetPluginDashboards))
|
||||
|
||||
@@ -173,6 +173,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
"sort": getPanelSort(panel.Id),
|
||||
"skipDataQuery": panel.SkipDataQuery,
|
||||
"state": panel.State,
|
||||
"signature": panel.Signature,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -121,7 +121,7 @@ func (hs *HTTPServer) GetPluginList(c *models.ReqContext) Response {
|
||||
listItem.DefaultNavUrl = setting.AppSubUrl + "/plugins/" + listItem.Id + "/"
|
||||
}
|
||||
|
||||
// filter out disabled
|
||||
// filter out disabled plugins
|
||||
if enabledFilter == "1" && !listItem.Enabled {
|
||||
continue
|
||||
}
|
||||
@@ -364,6 +364,10 @@ func (hs *HTTPServer) getCachedPluginSettings(pluginID string, user *models.Sign
|
||||
return query.Result, nil
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) GetPluginErrorsList(c *models.ReqContext) Response {
|
||||
return JSON(200, plugins.ScanningErrors())
|
||||
}
|
||||
|
||||
func translatePluginRequestErrorToAPIError(err error) Response {
|
||||
if errors.Is(err, backendplugin.ErrPluginNotRegistered) {
|
||||
return Error(404, "Plugin not found", err)
|
||||
|
||||
Reference in New Issue
Block a user