Footer: Display Grafana edition (#21717)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Emil Tullstedt
2020-01-27 09:24:44 +01:00
committed by GitHub
co-authored by Torkel Ödegaard
parent 84ef0ebb17
commit 3fabbbff4d
9 changed files with 60 additions and 27 deletions
+4 -3
View File
@@ -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)
}
}