Added regions in use, accounts in use

This commit is contained in:
Jesús Ángel 2018-12-04 12:44:36 +01:00
parent 39729af005
commit 6955fb8c5b
2 changed files with 23 additions and 1 deletions

View File

@ -190,6 +190,16 @@ export class OverviewController {
}
if (result.length) {
this.wodlesConfiguration = result[0];
if(tab === 'aws') {
this.awsRegions = [];
for(const bucket of this.wodlesConfiguration['aws-s3'].buckets){
if(bucket.regions){
const regions = bucket.regions.split(',');
this.awsRegions.push(...regions);
}
}
this.awsRegions = [...new Set(this.awsRegions)];
}
} else {
this.wodlesConfiguration = false;
}

View File

@ -16,7 +16,19 @@
<div layout="row" ng-if="octrl.wodlesConfiguration && octrl.wodlesConfiguration['aws-s3'] && octrl.wodlesConfiguration['aws-s3'].buckets">
<md-card flex class="wz-metric-color wz-md-card">
<md-card-content layout="row" class="wz-padding-metric">
<div class="wz-text-truncatable" flex>Buckets: <span ng-repeat="bucket in octrl.wodlesConfiguration['aws-s3'].buckets" class="wz-text-bold">{{bucket.name}}&nbsp;&nbsp;&nbsp;</span></div>
<div flex>Buckets: <span ng-repeat="bucket in octrl.wodlesConfiguration['aws-s3'].buckets" class="wz-text-bold">{{bucket.name}}&nbsp;&nbsp;&nbsp;</span></div>
</md-card-content>
</md-card>
<md-card flex class="wz-metric-color wz-md-card">
<md-card-content layout="row" class="wz-padding-metric">
<div flex>Accounts in use: <span ng-repeat="bucket in octrl.wodlesConfiguration['aws-s3'].buckets" class="wz-text-bold">{{bucket.aws_account_alias}}&nbsp;&nbsp;&nbsp;</span></div>
</md-card-content>
</md-card>
</div>
<div layout="row" ng-if="octrl.wodlesConfiguration && octrl.wodlesConfiguration['aws-s3'] && octrl.wodlesConfiguration['aws-s3'].buckets">
<md-card flex class="wz-metric-color wz-md-card">
<md-card-content layout="row" class="wz-padding-metric">
<div flex>Regions in use: <span ng-repeat="region in octrl.awsRegions" class="wz-text-bold">{{region}}&nbsp;&nbsp;&nbsp;</span></div>
</md-card-content>
</md-card>
</div>