Procházet zdrojové kódy

Add new regions to handleGetRegions function (#12082)

As public/app/plugins/datasource/cloudwatch/partials/config.html and this file differ between the AWS regions available, I've updated the latest so they share the same data.
In that way, the regions() method in dashboards returns the same list as the frontend does.
Christophe Le Guern před 7 roky
rodič
revize
3ba3fd9a59
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      pkg/tsdb/cloudwatch/metric_find_query.go

+ 2 - 2
pkg/tsdb/cloudwatch/metric_find_query.go

@@ -230,8 +230,8 @@ func parseMultiSelectValue(input string) []string {
 // Please update the region list in public/app/plugins/datasource/cloudwatch/partials/config.html
 func (e *CloudWatchExecutor) handleGetRegions(ctx context.Context, parameters *simplejson.Json, queryContext *tsdb.TsdbQuery) ([]suggestData, error) {
 	regions := []string{
-		"ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "ca-central-1", "cn-north-1",
-		"eu-central-1", "eu-west-1", "eu-west-2", "sa-east-1", "us-east-1", "us-east-2", "us-gov-west-1", "us-west-1", "us-west-2",
+		"ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "ca-central-1", "cn-north-1", "cn-northwest-1",
+		"eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-gov-west-1", "us-west-1", "us-west-2",
 	}
 
 	result := make([]suggestData, 0)