Skip to content

Commit

Permalink
fix(bake): show advanced options (#8427)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
karlomendozaarmory and mergify[bot] committed Jul 27, 2020
1 parent adc49ff commit 7202e6f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Expand Up @@ -97,6 +97,7 @@ module(AZURE_PIPELINE_STAGES_BAKE_AZUREBAKESTAGE, [AZURE_PIPELINE_STAGES_BAKE_BA
$scope.viewState.roscoMode =
SETTINGS.feature.roscoMode ||
(typeof SETTINGS.feature.roscoSelector === 'function' && SETTINGS.feature.roscoSelector($scope.stage));
$scope.showAdvancedOptions = showAdvanced();
$scope.viewState.loading = false;
});
}
Expand All @@ -114,6 +115,15 @@ module(AZURE_PIPELINE_STAGES_BAKE_AZUREBAKESTAGE, [AZURE_PIPELINE_STAGES_BAKE_BA
}
}

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

function deleteEmptyProperties() {
_.forOwn($scope.stage, function(val, key) {
if (val === '') {
Expand Down
10 changes: 10 additions & 0 deletions app/scripts/modules/azure/src/pipeline/stages/bake/bakeStage.html
Expand Up @@ -30,6 +30,16 @@
<stage-config-field label="Base Name">
<input type="text" class="form-control input-sm" ng-model="stage.baseName" />
</stage-config-field>
<div class="form-group">
<div class="col-md-9 col-md-offset-1">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="showAdvancedOptions" />
<strong>Show Advanced Options</strong>
</label>
</div>
</div>
</div>
<div ng-class="{collapse: showAdvancedOptions !== true, 'collapse.in': showAdvancedOptions === true}">
<stage-config-field
label="Template File Name"
Expand Down

0 comments on commit 7202e6f

Please sign in to comment.