mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PublicDashboards: Refresh ds plugin supported list (#74947)
This commit is contained in:
@@ -12,6 +12,11 @@ import (
|
||||
|
||||
var grafanaDatasources = []string{expr.DatasourceType, "datasource"}
|
||||
|
||||
// there are some datasources that have backend flag as true but don't call /ds/query endpoint
|
||||
var unsupportedDataSourcesMap = map[string]bool{
|
||||
"cloudwatch": true,
|
||||
}
|
||||
|
||||
type listPluginResponse struct {
|
||||
Items []struct {
|
||||
Slug string `json:"slug"`
|
||||
@@ -40,7 +45,7 @@ func GetCompatibleDatasources(baseUrl string) ([]string, error) {
|
||||
// we only consider a datasource to be supported when alerting and backend are both true
|
||||
var supported []string
|
||||
for _, datasource := range datasources {
|
||||
if datasource.Alerting && datasource.Backend {
|
||||
if datasource.Alerting && datasource.Backend && !unsupportedDataSourcesMap[datasource.Slug] {
|
||||
supported = append(supported, datasource.Slug)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user