Skip to content

Commit

Permalink
(aws, azure) wait for app ready to initialize load balancer details (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry authored Oct 4, 2016
1 parent 31577c3 commit ce22d78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ module.exports = angular.module('spinnaker.loadBalancer.aws.details.controller',
$state.go('^', null, {location: 'replace'});
}

app.loadBalancers.ready().then(extractLoadBalancer).then(() => {
app.ready().then(extractLoadBalancer).then(() => {
// If the user navigates away from the view before the initial extractLoadBalancer call completes,
// do not bother subscribing to the refresh
if (!$scope.$$destroyed) {
app.loadBalancers.onRefresh($scope, extractLoadBalancer);
app.onRefresh($scope, extractLoadBalancer);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ module.exports = angular.module('spinnaker.azure.loadBalancer.details.controller
return $q.when(null);
}

app.loadBalancers.ready().then(extractLoadBalancer).then(() => {
app.ready().then(extractLoadBalancer).then(() => {
// If the user navigates away from the view before the initial extractLoadBalancer call completes,
// do not bother subscribing to the refresh
if (!$scope.$$destroyed) {
app.loadBalancers.onRefresh($scope, extractLoadBalancer);
app.onRefresh($scope, extractLoadBalancer);
}
});

Expand Down

0 comments on commit ce22d78

Please sign in to comment.