Chore: Advisor stats (#103711)

This commit is contained in:
Andres Martinez Gotor
2025-04-10 10:51:00 +02:00
committed by GitHub
parent 3f3a4c1e8a
commit 89c70fcdcf
7 changed files with 314 additions and 9 deletions
@@ -18,6 +18,12 @@ import (
"github.com/grafana/grafana/pkg/services/pluginsintegration/provisionedplugins"
)
const (
CheckID = "plugin"
DeprecationStepID = "deprecation"
UpdateStepID = "update"
)
func New(
pluginStore pluginstore.Store,
pluginRepo repo.Service,
@@ -43,7 +49,7 @@ type check struct {
}
func (c *check) ID() string {
return "plugin"
return CheckID
}
func (c *check) Items(ctx context.Context) ([]any, error) {
@@ -88,7 +94,7 @@ func (s *deprecationStep) Resolution() string {
}
func (s *deprecationStep) ID() string {
return "deprecation"
return DeprecationStepID
}
func (s *deprecationStep) Run(ctx context.Context, _ *advisor.CheckSpec, it any) (*advisor.CheckReportFailure, error) {
@@ -146,7 +152,7 @@ func (s *updateStep) Resolution() string {
}
func (s *updateStep) ID() string {
return "update"
return UpdateStepID
}
func (s *updateStep) Run(ctx context.Context, _ *advisor.CheckSpec, i any) (*advisor.CheckReportFailure, error) {