mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: take datasources as external alertmanagers into consideration (#52534)
This commit is contained in:
committed by
GitHub
parent
5c4aa4a7ac
commit
50ae42130b
@@ -49,6 +49,9 @@ func (s *FakeDataSourceService) GetAllDataSources(ctx context.Context, query *da
|
||||
|
||||
func (s *FakeDataSourceService) GetDataSourcesByType(ctx context.Context, query *datasources.GetDataSourcesByTypeQuery) error {
|
||||
for _, datasource := range s.DataSources {
|
||||
if query.OrgId > 0 && datasource.OrgId != query.OrgId {
|
||||
continue
|
||||
}
|
||||
typeMatch := query.Type != "" && query.Type == datasource.Type
|
||||
if typeMatch {
|
||||
query.Result = append(query.Result, datasource)
|
||||
|
||||
Reference in New Issue
Block a user