Skip to content

Commit

Permalink
fix(gce): show bake stage advanced options if any options have been s…
Browse files Browse the repository at this point in the history
…elected (#3418)
  • Loading branch information
danielpeach authored Mar 23, 2017
1 parent 67af835 commit b90a45e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,17 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.gce.bakeStage', [
$scope.stage.baseLabel = $scope.baseLabelOptions[0];
}
$scope.viewState.roscoMode = settings.feature.roscoMode;
$scope.showAdvancedOptions = showAdvanced();
$scope.viewState.loading = false;
});
}

function showAdvanced() {
let stage = $scope.stage;
return !!(stage.templateFileName || (stage.extendedAttributes && _.size(stage.extendedAttributes) > 0) ||
stage.varFileName || stage.baseAmi || stage.accountName);
}

function deleteEmptyProperties() {
_.forOwn($scope.stage, function(val, key) {
if (val === '') {
Expand Down

0 comments on commit b90a45e

Please sign in to comment.