mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove Result field from datasources (#63048)
* Remove Result field from AddDataSourceCommand * Remove DatasourcesPermissionFilterQuery Result * Remove GetDataSourceQuery Result * Remove GetDataSourcesByTypeQuery Result * Remove GetDataSourcesQuery Result * Remove GetDefaultDataSourceQuery Result * Remove UpdateDataSourceCommand Result
This commit is contained in:
@@ -121,11 +121,11 @@ func (srv ConfigSrv) externalAlertmanagers(ctx context.Context, orgID int64) ([]
|
||||
OrgID: orgID,
|
||||
Type: datasources.DS_ALERTMANAGER,
|
||||
}
|
||||
err := srv.datasourceService.GetDataSourcesByType(ctx, query)
|
||||
dataSources, err := srv.datasourceService.GetDataSourcesByType(ctx, query)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to fetch datasources for org: %w", err)
|
||||
}
|
||||
for _, ds := range query.Result {
|
||||
for _, ds := range dataSources {
|
||||
if ds.JsonData.Get(apimodels.HandleGrafanaManagedAlerts).MustBool(false) {
|
||||
// we don't need to build the exact URL as we only need
|
||||
// to know if any is set
|
||||
|
||||
Reference in New Issue
Block a user