Skip to content

Commit

Permalink
Merge pull request #8785 from spinnaker/mergify/bp/release-1.24.x/pr-…
Browse files Browse the repository at this point in the history
…8784

fix(ecs): rename capacityProviderStrategies to capacityProviderStrategy (bp #8784)
  • Loading branch information
fieldju committed Dec 11, 2020
2 parents aa201bb + f5475c9 commit 0196255
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/scripts/modules/ecs/src/ecs.help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const helpContents: { [key: string]: string } = {
'<p>The container name value, already specified in the task definition, to be used for your service discovery service.</p>',
'ecs.computeOptions':
'<p>Specify either a <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html" target="_blank">launch type</a> (default) or <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html" target="_blank">capacity providers</a> for running your ECS service.</p>',
'ecs.capacityProviderStrategies':
'ecs.capacityProviderStrategy':
'<p>A capacity provider strategy gives you control over how your tasks use one or more capacity providers. See <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html#capacity-providers-concepts" target="_blank">AWS documentation</a> for more details. </p>',
'ecs.capacityProviderName': '<p>The short name of the capacity provider.</p>',
'ecs.capacityProviderBase':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ module(ECS_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_ECS_CONTROLLER, [
// TODO: Migrate horizontalScaling component to react and move this logic there
$scope.capacityProviderState = {
useCapacityProviders:
$scope.command.capacityProviderStrategies && $scope.command.capacityProviderStrategies.length > 0,
$scope.command.capacityProviderStrategy && $scope.command.capacityProviderStrategy.length > 0,
updateComputeOption: function (chosenOption) {
if (chosenOption == 'launchType') {
$scope.command.capacityProviderStrategies = [];
$scope.command.capacityProviderStrategy = [];
} else if (chosenOption == 'capacityProviders') {
$scope.command.launchType = '';
$scope.command.capacityProviderStrategies = $scope.command.capacityProviderStrategies || [];
$scope.command.capacityProviderStrategy = $scope.command.capacityProviderStrategy || [];
}
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

<div class="form-group" ng-if="$ctrl.capacityProviderState.useCapacityProviders">
<div class="sm-label-left">
<b>Capacity Provider Strategies</b>
<help-field key="ecs.capacityProviderStrategies"></help-field>
<b>Capacity Provider Strategy</b>
<help-field key="ecs.capacityProviderStrategy"></help-field>
</div>
<div>
<table class="table table-condensed packed tags">
Expand All @@ -45,7 +45,7 @@
<th style="width: 25%">Weight <help-field key="ecs.capacityProviderWeight"></help-field></th>
</thead>
<tbody>
<tr ng-repeat="cp in $ctrl.command.capacityProviderStrategies">
<tr ng-repeat="cp in $ctrl.command.capacityProviderStrategy">
<td>
<input
type="text"
Expand All @@ -72,7 +72,7 @@
</td>
<td>
<div class="form-control-static">
<a class="btn-link sm-label" ng-click="$ctrl.command.capacityProviderStrategies.splice($index, 1)">
<a class="btn-link sm-label" ng-click="$ctrl.command.capacityProviderStrategy.splice($index, 1)">
<span class="glyphicon glyphicon-trash"></span>
<span class="sr-only">Remove</span>
</a>
Expand All @@ -85,7 +85,7 @@
<td colspan="3">
<button
class="btn btn-block btn-sm add-new"
ng-click="$ctrl.command.capacityProviderStrategies.push({})"
ng-click="$ctrl.command.capacityProviderStrategy.push({})"
data-test-id="ServerGroup.addCapacityProvider"
>
<span class="glyphicon glyphicon-plus-sign"></span>
Expand Down

0 comments on commit 0196255

Please sign in to comment.