Skip to content

Commit

Permalink
feat(amazon/serverGroup): warn that scaling policies will not work wh…
Browse files Browse the repository at this point in the history
…en capacity is pinned (#4668)
  • Loading branch information
erikmunson authored Jan 16, 2018
1 parent 1aee32d commit 3155b2f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
min="{{$ctrl.command.min}}"
max="{{$ctrl.command.max}}"/></div>
</div>

</div>
<div ng-if="!$ctrl.command.advancedMode">
<div class="form-group">
Expand Down Expand Up @@ -86,3 +85,19 @@
</div>
</div>
</div>
<div class="row" ng-if="$ctrl.command.min == $ctrl.command.max && $ctrl.serverGroup.scalingPolicies.length > 0">
<div class="col-md-7 col-md-offset-3">
<div class="well-compact alert alert-warning">
<b>Warning</b>: this server group has
<span ng-if="$ctrl.serverGroup.scalingPolicies.length == 1">a scaling policy.</span>
<span ng-if="$ctrl.serverGroup.scalingPolicies.length > 1">scaling policies.</span>
<span ng-if="!$ctrl.command.advancedMode">
Scaling policies will not take effect in Simple Mode.
Switch to <a href ng-click="$ctrl.command.advancedMode = true">Advanced Mode</a>.
</span>
<span ng-if="$ctrl.command.advancedMode">
Scaling policies will not take effect when <b>Min</b> is the same as <b>Max</b>.
</span>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { IComponentOptions, module } from 'angular';
const resizeCapacityComponent: IComponentOptions = {
bindings: {
command: '=',
currentSize: '='
currentSize: '=',
serverGroup: '='
},
templateUrl: require('./resizeCapacity.component.html'),
controller: () => {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ <h3>Resize {{serverGroup.name}}</h3>
</div>
<div class="modal-body confirmation-modal">
<div class="form-horizontal">
<aws-resize-capacity command="command" current-size="currentSize"></aws-resize-capacity>
<aws-resize-capacity command="command" current-size="currentSize" server-group="serverGroup"></aws-resize-capacity>

</div>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
Expand Down

0 comments on commit 3155b2f

Please sign in to comment.