-
Notifications
You must be signed in to change notification settings - Fork 906
(aws) Allow selection of VPC load balancers on Classic ASGs #2265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
anotherchrisberry
merged 1 commit into
spinnaker:master
from
anotherchrisberry:vpc-classic-elbs
May 13, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 58 additions & 37 deletions
95
...les/amazon/serverGroup/configure/wizard/loadBalancers/loadBalancerSelector.directive.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,65 @@ | ||
<div class="row"> | ||
<div class="col-md-12" ng-if="vm.command.viewState.dirty.loadBalancers"> | ||
<div class="alert alert-warning"> | ||
<p><span class="glyphicon glyphicon-warning-sign"></span> | ||
The following load balancers could not be found in the selected account/region/VPC and were removed: | ||
</p> | ||
<ul> | ||
<li ng-repeat="loadBalancer in vm.command.viewState.dirty.loadBalancers">{{loadBalancer}}</li> | ||
</ul> | ||
<p class="text-right"> | ||
<a class="btn btn-sm btn-default dirty-flag-dismiss" href ng-click="vm.command.viewState.dirty.loadBalancers = null">Okay</a> | ||
</p> | ||
<div class="col-md-12" ng-if="vm.command.viewState.dirty.loadBalancers"> | ||
<div class="alert alert-warning"> | ||
<p><span class="glyphicon glyphicon-warning-sign"></span> | ||
The following load balancers could not be found in the selected account/region/VPC and were removed: | ||
</p> | ||
<ul> | ||
<li ng-repeat="loadBalancer in vm.command.viewState.dirty.loadBalancers">{{loadBalancer}}</li> | ||
</ul> | ||
<p class="text-right"> | ||
<a class="btn btn-sm btn-default dirty-flag-dismiss" href ng-click="vm.command.viewState.dirty.loadBalancers = null">Okay</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div class="col-md-3 sm-label-right"><b>Load Balancers</b></div> | ||
<div class="col-md-9"> | ||
<ui-select ng-if="vm.command.backingData.filtered.loadBalancers.length" | ||
multiple | ||
ng-model="vm.command.loadBalancers" | ||
class="form-control input-sm"> | ||
<ui-select-match>{{$item}}</ui-select-match> | ||
<ui-select-choices repeat="loadBalancer in vm.command.backingData.filtered.loadBalancers | filter: $select.search"> | ||
<span ng-bind-html="loadBalancer | highlight: $select.search"></span> | ||
</ui-select-choices> | ||
</ui-select> | ||
<div class="form-group"> | ||
<div class="col-md-3 sm-label-right"><b>Load Balancers</b></div> | ||
<div class="col-md-9"> | ||
<ui-select ng-if="vm.command.backingData.filtered.loadBalancers.length" | ||
multiple | ||
ng-model="vm.command.loadBalancers" | ||
class="form-control input-sm"> | ||
<ui-select-match>{{$item}}</ui-select-match> | ||
<ui-select-choices repeat="loadBalancer in vm.command.backingData.filtered.loadBalancers | filter: $select.search"> | ||
<span ng-bind-html="loadBalancer | highlight: $select.search"></span> | ||
</ui-select-choices> | ||
</ui-select> | ||
</div> | ||
</div> | ||
<div class="form-group" ng-if="!vm.command.vpcId"> | ||
<div ng-if="!vm.command.vpcLoadBalancers.length && !vm.showVpcLoadBalancers"> | ||
<div class="col-md-9 col-md-offset-3"> | ||
<a href ng-click="vm.showVpcLoadBalancers = true">Add VPC Load Balancers</a> | ||
</div> | ||
</div> | ||
<div ng-if="vm.command.vpcLoadBalancers.length || vm.showVpcLoadBalancers"> | ||
<div class="col-md-3 sm-label-right"><b>VPC Load Balancers</b></div> | ||
<div class="col-md-9"> | ||
<ui-select ng-if="vm.command.backingData.filtered.vpcLoadBalancers.length" | ||
multiple | ||
ng-model="vm.command.vpcLoadBalancers" | ||
class="form-control input-sm"> | ||
<ui-select-match>{{$item}}</ui-select-match> | ||
<ui-select-choices repeat="loadBalancer in vm.command.backingData.filtered.vpcLoadBalancers | filter: $select.search"> | ||
<span ng-bind-html="loadBalancer | highlight: $select.search"></span> | ||
</ui-select-choices> | ||
</ui-select> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group small" style="margin-top: 20px"> | ||
<div class="col-md-9 col-md-offset-3"> | ||
<p> | ||
<span ng-if="vm.refreshing"><span class="small glyphicon glyphicon-refresh glyphicon-spinning"></span></span> | ||
Load balancers | ||
<span ng-if="!vm.refreshing">last refreshed {{ vm.getLoadBalancerRefreshTime() | timestamp }}</span> | ||
<span ng-if="vm.refreshing"> refreshing...</span> | ||
</p> | ||
<p>If you're not finding a load balancer that was recently added, | ||
<a href ng-click="vm.refreshLoadBalancers()">click here</a> to refresh the list. | ||
</p> | ||
<div class="form-group small" style="margin-top: 20px"> | ||
<div class="col-md-9 col-md-offset-3"> | ||
<p> | ||
<span ng-if="vm.refreshing"><span class="small glyphicon glyphicon-refresh glyphicon-spinning"></span></span> | ||
Load balancers | ||
<span ng-if="!vm.refreshing">last refreshed {{ vm.getLoadBalancerRefreshTime() | timestamp }}</span> | ||
<span ng-if="vm.refreshing"> refreshing...</span> | ||
</p> | ||
<p>If you're not finding a load balancer that was recently added, | ||
<a href ng-click="vm.refreshLoadBalancers()">click here</a> to refresh the list. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does wrapping a variable name in square brackets do? Is it to coerce the outputs of the filter into an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, exactly - it's using ES6 array destructuring. Since
filter
returns an array, this setsappLoadBalancer
to the first item in the array (or undefined if the filter returns an empty collection).