Skip to content

Commit

Permalink
fix(google): safe healthcheck lookups when cloning server group
Browse files Browse the repository at this point in the history
  • Loading branch information
maggieneterval committed Jan 17, 2019
1 parent b920442 commit 9f90ebd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ module.exports = angular
return $uibModalInstance.close($scope.command);
}

const healthCheckUrl = $scope.command.autoHealingPolicy.healthCheck;
const healthCheckUrl = _.get($scope.command, 'autoHealingPolicy.healthCheck');
if (healthCheckUrl) {
const { healthCheckName, healthCheckKind } = parseHealthCheckUrl(healthCheckUrl);
$scope.command.autoHealingPolicy.healthCheck = healthCheckName;
Expand All @@ -389,7 +389,10 @@ module.exports = angular
$scope.command.tags = origTags;
$scope.command.loadBalancers = origLoadBalancers;
$scope.command.securityGroups = gceTagManager.inferSecurityGroupIdsFromTags($scope.command.tags);
$scope.command.autoHealingPolicy.healthCheck = healthCheckUrl;

if (healthCheckUrl) {
$scope.command.autoHealingPolicy.healthCheck = healthCheckUrl;
}

return promise;
});
Expand Down

0 comments on commit 9f90ebd

Please sign in to comment.