Skip to content

Commit

Permalink
fix(google): prevent parent server group from overwriting null clone …
Browse files Browse the repository at this point in the history
…autohealing policies
  • Loading branch information
maggieneterval committed Jan 9, 2019
1 parent 4eef691 commit d4127fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<div class="col-md-6 checkbox">
<label>
<input type="checkbox" ng-model="command.enableAutoHealing"/>
<input type="checkbox" ng-model="command.enableAutoHealing" ng-change="ctrl.onEnableAutoHealingChange()"/>
</label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ module.exports = angular
gceServerGroupConfigurationService.refreshHealthChecks($scope.command);
};

this.onEnableAutoHealingChange = function() {
// Prevent empty auto-healing policies from being overwritten by those of their ancestors
$scope.command.overwriteAncestorAutoHealingPolicy =
$scope.command.stack === 'clone' &&
$scope.command.autoHealingPolicy != null &&
$scope.command.enableAutoHealing === false;
};

this.setAutoHealingPolicy = function(autoHealingPolicy) {
$scope.command.autoHealingPolicy = autoHealingPolicy;
};
Expand Down

0 comments on commit d4127fa

Please sign in to comment.