Chore: Remove bus (#47511) (#47677)

* Chore: Remove bus

* remove unused const

(cherry picked from commit 18e93c7077)
This commit is contained in:
Serge Zaitsev
2022-04-13 11:51:21 +02:00
committed by GitHub
parent 691e94ebe4
commit 7729b14da3
53 changed files with 19 additions and 701 deletions
-13
View File
@@ -6,7 +6,6 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/sqlstore/permissions"
@@ -26,18 +25,6 @@ func init() {
prometheus.MustRegister(shadowSearchCounter)
}
func (ss *SQLStore) addDashboardQueryAndCommandHandlers() {
bus.AddHandler("sql", ss.GetDashboard)
bus.AddHandler("sql", ss.GetDashboardUIDById)
bus.AddHandler("sql", ss.GetDashboardTags)
bus.AddHandler("sql", ss.SearchDashboards)
bus.AddHandler("sql", ss.GetDashboards)
bus.AddHandler("sql", ss.HasEditPermissionInFolders)
bus.AddHandler("sql", ss.GetDashboardPermissionsForUser)
bus.AddHandler("sql", ss.GetDashboardSlugById)
bus.AddHandler("sql", ss.HasAdminPermissionInFolders)
}
var generateNewUid func() string = util.GenerateShortUID
func (ss *SQLStore) GetDashboard(ctx context.Context, query *models.GetDashboardQuery) error {