Commit 5d8a51c3 by Torkel Ödegaard

Merge pull request #3129 from utkarshcmu/validity

Default AWS Region selection from dropdown
parents ecb1552c 6325635f
...@@ -65,6 +65,8 @@ func init() { ...@@ -65,6 +65,8 @@ func init() {
} }
} }
// Whenever this list is updated, frontend list should also be updated.
// Please update the region list in public/app/plugins/datasource/cloudwatch/partials/config.html
func handleGetRegions(req *cwRequest, c *middleware.Context) { func handleGetRegions(req *cwRequest, c *middleware.Context) {
regions := []string{ regions := []string{
"us-east-1", "us-west-2", "us-west-1", "eu-west-1", "eu-central-1", "ap-southeast-1", "us-east-1", "us-west-2", "us-west-1", "eu-west-1", "eu-central-1", "ap-southeast-1",
......
...@@ -19,8 +19,13 @@ ...@@ -19,8 +19,13 @@
<li class="tight-form-item" style="width: 200px"> <li class="tight-form-item" style="width: 200px">
Default Region<tip>Specify the region, such as for US West (Oregon) use ` us-west-2 ` as the region.</tip> Default Region<tip>Specify the region, such as for US West (Oregon) use ` us-west-2 ` as the region.</tip>
</li> </li>
<li> <!--
<input type="text" class="tight-form-input input-large last" ng-model='current.jsonData.defaultRegion' placeholder=""></input> Whenever this list is updated, backend list should also be updated.
Please update the region list in pkg/api/cloudwatch/metric.go
-->
<li>
<select class="tight-form-input input-large last" ng-model="current.jsonData.defaultRegion" ng-options="region for region in ['us-east-1', 'us-west-2', 'us-west-1', 'eu-west-1',
'eu-central-1', 'ap-southeast-1' ,'ap-southeast-2' ,'ap-northeast-1' ,'sa-east-1' ,'cn-north-1']"></select>
</li> </li>
</ul> </ul>
<div class="clearfix"></div> <div class="clearfix"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment