Footer: Display Grafana edition (#21717)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
co-authored by
Torkel Ödegaard
parent
84ef0ebb17
commit
3fabbbff4d
@@ -2,10 +2,11 @@ package hooks
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/pkg/api/dtos"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/registry"
|
||||
)
|
||||
|
||||
type IndexDataHook func(indexData *dtos.IndexViewData)
|
||||
type IndexDataHook func(indexData *dtos.IndexViewData, req *models.ReqContext)
|
||||
|
||||
type HooksService struct {
|
||||
indexDataHooks []IndexDataHook
|
||||
@@ -23,8 +24,8 @@ func (srv *HooksService) AddIndexDataHook(hook IndexDataHook) {
|
||||
srv.indexDataHooks = append(srv.indexDataHooks, hook)
|
||||
}
|
||||
|
||||
func (srv *HooksService) RunIndexDataHooks(indexData *dtos.IndexViewData) {
|
||||
func (srv *HooksService) RunIndexDataHooks(indexData *dtos.IndexViewData, req *models.ReqContext) {
|
||||
for _, hook := range srv.indexDataHooks {
|
||||
hook(indexData)
|
||||
hook(indexData, req)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user