mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove bus.Dispatch from provisioning services (#44989)
* make getordbyname a method * remove one dispatch from plugins provisioner * remove bus from the plugins provisioner, skip test for now * remove bus from datasource provisioning * resolve tests in notifier provisioning * remove bus from the dashboards provisioning service * fix missing struct field * fix getorgbyid method calls * pass org store into dashboard provisioner * fix test function prototype * fix tests * attempt to fix tests after the rebase * fix integration test * avoid using transaction * remove comments
This commit is contained in:
@@ -26,6 +26,7 @@ type DashboardProvisioningService interface {
|
||||
GetProvisionedDashboardDataByDashboardID(dashboardID int64) (*models.DashboardProvisioning, error)
|
||||
UnprovisionDashboard(ctx context.Context, dashboardID int64) error
|
||||
DeleteProvisionedDashboard(ctx context.Context, dashboardID int64, orgID int64) error
|
||||
DeleteOrphanedProvisionedDashboards(ctx context.Context, cmd *models.DeleteOrphanedProvisionedDashboardsCommand) error
|
||||
}
|
||||
|
||||
//go:generate mockery --name Store --structname FakeDashboardStore --output database --outpkg database --filename database_mock.go
|
||||
@@ -41,6 +42,7 @@ type Store interface {
|
||||
SaveProvisionedDashboard(cmd models.SaveDashboardCommand, provisioning *models.DashboardProvisioning) (*models.Dashboard, error)
|
||||
SaveDashboard(cmd models.SaveDashboardCommand) (*models.Dashboard, error)
|
||||
UpdateDashboardACL(ctx context.Context, uid int64, items []*models.DashboardAcl) error
|
||||
DeleteOrphanedProvisionedDashboards(ctx context.Context, cmd *models.DeleteOrphanedProvisionedDashboardsCommand) error
|
||||
// SaveAlerts saves dashboard alerts.
|
||||
SaveAlerts(ctx context.Context, dashID int64, alerts []*models.Alert) error
|
||||
UnprovisionDashboard(ctx context.Context, id int64) error
|
||||
|
||||
Reference in New Issue
Block a user