Skip to content

Commit

Permalink
feat(targetShape): remove the ALPHA conditional on the targetShape (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
plumpy committed Dec 11, 2020
1 parent 06aca3a commit 1446fac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ angular

function configureDistributionPolicyTargetShape(command) {
const accountDetails = command.backingData.credentialsKeyedByAccount[command.credentials];
if (accountDetails.computeVersion === 'ALPHA' && !command.distributionPolicy.targetShape) {
if (!command.distributionPolicy.targetShape) {
command.distributionPolicy.targetShape = 'EVEN';
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<div
class="form-group"
ng-if="vm.command.regional && vm.command.backingData.credentialsKeyedByAccount[vm.command.credentials].computeVersion === 'ALPHA'"
>
<div class="form-group">
<div class="col-md-3 sm-label-right"><b>Target Shape</b></div>
<div class="col-md-3">
<ui-select ng-model="vm.command.distributionPolicy.targetShape" class="form-control input-sm" required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ angular
augmentTagsWithHelp();
configureEntityTagTargets();
processLabels();
retrieveComputeVersion(details.account);
} else {
autoClose();
}
Expand Down Expand Up @@ -275,12 +274,6 @@ angular
}
};

const retrieveComputeVersion = (accountId) => {
AccountService.getAccountDetails(accountId).then((accountDetails) => {
this.serverGroup.computeVersion = accountDetails.computeVersion;
});
};

const processLabels = () => {
if (!_.size(this.serverGroup.instanceTemplateLabels)) {
delete this.serverGroup.instanceTemplateLabels;
Expand Down Expand Up @@ -511,10 +504,6 @@ angular
return null;
};

this.isAlphaListed = () => {
return this.serverGroup.computeVersion === 'ALPHA';
};

const configureEntityTagTargets = () => {
this.entityTagTargets = ClusterTargetBuilder.buildClusterTargets(this.serverGroup);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ <h4 class="text-center" ng-if="ctrl.serverGroup.isDisabled">[SERVER GROUP IS DIS
<li ng-repeat="zone in ctrl.serverGroup.zones">{{zone}}</li>
</ul>
</dd>
<dt ng-if="ctrl.serverGroup.regional && ctrl.isAlphaListed()">Target Shape</dt>
<dd ng-if="ctrl.serverGroup.regional && ctrl.isAlphaListed()">
<dt ng-if="ctrl.serverGroup.regional">Target Shape</dt>
<dd ng-if="ctrl.serverGroup.regional">
{{ctrl.serverGroup.distributionPolicy.targetShape}}
</dd>
</dl>
Expand Down

0 comments on commit 1446fac

Please sign in to comment.