Skip to content

Commit

Permalink
titus - clean up account and region changed subjects for load balance…
Browse files Browse the repository at this point in the history
…r selector
  • Loading branch information
Justin Reynolds authored and tomaslin committed Mar 16, 2018
1 parent f59bd2f commit cab49f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions loadBalancers/loadBalancerSelector.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class LoadBalancerSelectorController implements IController {
});
this.$q.all([credentialLoader, loadBalancerLoader]).then(() => this.configureLoadBalancerOptions());
this.subscriptions = [
this.accountChanged.subscribe(() => this.configureLoadBalancerOptions()),
this.regionChanged.subscribe(() => this.configureLoadBalancerOptions())
this.command.viewState.accountChangedStream.subscribe(() => this.configureLoadBalancerOptions()),
this.command.viewState.regionChangedStream.subscribe(() => this.configureLoadBalancerOptions())
];
}

Expand Down
6 changes: 3 additions & 3 deletions serverGroup/configure/serverGroupConfiguration.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = angular.module('spinnaker.serverGroup.configure.titus.configura


function configureCommand(command) {
command.viewState.accountChangedStream = new Subject();
command.viewState.regionChangedStream = new Subject();
command.viewState.groupsRemovedStream = new Subject();
command.onStrategyChange = function (strategy) {
// Any strategy other than None or Custom should force traffic to be enabled
if (strategy.key !== '' && strategy.key !== 'custom') {
Expand Down Expand Up @@ -39,9 +42,6 @@ module.exports = angular.module('spinnaker.serverGroup.configure.titus.configura
}

function attachEventHandlers(command) {
command.viewState.accountChangedStream = new Subject();
command.viewState.regionChangedStream = new Subject();
command.viewState.groupsRemovedStream = new Subject();
command.viewState.removedGroups = [];
command.credentialsChanged = function credentialsChanged() {
var result = { dirty: {} };
Expand Down
4 changes: 1 addition & 3 deletions serverGroup/configure/wizard/loadBalancers.html
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<titus-load-balancer-selector command="command"
account-changed="command.viewState.accountChangedStream"
region-changed="command.viewState.regionChangedStream"></titus-load-balancer-selector>
<titus-load-balancer-selector command="command"></titus-load-balancer-selector>

0 comments on commit cab49f7

Please sign in to comment.