Skip to content

Commit 036bca2

Browse files
author
OpenShift Bot
authored
Merge pull request #1157 from spadgett/build-hooks-required-fields
Merged by openshift-bot
2 parents 4d03d98 + c18ec4c commit 036bca2

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

app/views/edit/build-config.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ <h3 class="with-divider">
547547
</div>
548548
</div>
549549

550-
<div ng-show="view.hasHooks">
550+
<div ng-if="view.hasHooks">
551551
<div class="form-group">
552552
<h4>Hook Types</h4>
553553
<ui-select
@@ -561,7 +561,7 @@ <h4>Hook Types</h4>
561561
</div>
562562

563563
<fieldset>
564-
<div ng-show="buildHookSelection.type.id === 'script' || buildHookSelection.type.id === 'scriptArgs'">
564+
<div ng-if="buildHookSelection.type.id === 'script' || buildHookSelection.type.id === 'scriptArgs'">
565565
<h4>Script</h4>
566566
<div
567567
ui-ace="{
@@ -573,22 +573,25 @@ <h4>Script</h4>
573573
}
574574
}"
575575
ng-model="updatedBuildConfig.spec.postCommit.script"
576+
required
576577
class="ace-bordered ace-inline mar-top-md">
577578
</div>
578579
</div>
579580

580-
<div ng-show="buildHookSelection.type.id === 'command' || buildHookSelection.type.id === 'commandArgs'">
581+
<div ng-if="buildHookSelection.type.id === 'command' || buildHookSelection.type.id === 'commandArgs'">
581582
<h4>Command</h4>
582583
<edit-command
583-
args="updatedBuildConfig.spec.postCommit.command">
584+
args="updatedBuildConfig.spec.postCommit.command"
585+
is-required="true">
584586
</edit-command>
585587
</div>
586588

587-
<div ng-show="buildHookSelection.type.id === 'args' || buildHookSelection.type.id === 'commandArgs' || buildHookSelection.type.id === 'scriptArgs' ">
589+
<div ng-if="buildHookSelection.type.id === 'args' || buildHookSelection.type.id === 'commandArgs' || buildHookSelection.type.id === 'scriptArgs' ">
588590
<h4>Arguments</h4>
589591
<edit-command
590592
args="updatedBuildConfig.spec.postCommit.args"
591-
type="argument">
593+
type="argument"
594+
is-required="true">
592595
</edit-command>
593596
</div>
594597
</fieldset>

dist/scripts/templates.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9235,7 +9235,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
92359235
"Build hooks allow you to run commands at the end of the build to verify the image.\n" +
92369236
"</div>\n" +
92379237
"</div>\n" +
9238-
"<div ng-show=\"view.hasHooks\">\n" +
9238+
"<div ng-if=\"view.hasHooks\">\n" +
92399239
"<div class=\"form-group\">\n" +
92409240
"<h4>Hook Types</h4>\n" +
92419241
"<ui-select ng-model=\"buildHookSelection.type\" title=\"Choose a type of build hook\">\n" +
@@ -9246,7 +9246,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
92469246
"</ui-select>\n" +
92479247
"</div>\n" +
92489248
"<fieldset>\n" +
9249-
"<div ng-show=\"buildHookSelection.type.id === 'script' || buildHookSelection.type.id === 'scriptArgs'\">\n" +
9249+
"<div ng-if=\"buildHookSelection.type.id === 'script' || buildHookSelection.type.id === 'scriptArgs'\">\n" +
92509250
"<h4>Script</h4>\n" +
92519251
"<div ui-ace=\"{\n" +
92529252
" mode: 'sh',\n" +
@@ -9255,17 +9255,17 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
92559255
" fadeFoldWidgets: true,\n" +
92569256
" showPrintMargin: false\n" +
92579257
" }\n" +
9258-
" }\" ng-model=\"updatedBuildConfig.spec.postCommit.script\" class=\"ace-bordered ace-inline mar-top-md\">\n" +
9258+
" }\" ng-model=\"updatedBuildConfig.spec.postCommit.script\" required class=\"ace-bordered ace-inline mar-top-md\">\n" +
92599259
"</div>\n" +
92609260
"</div>\n" +
9261-
"<div ng-show=\"buildHookSelection.type.id === 'command' || buildHookSelection.type.id === 'commandArgs'\">\n" +
9261+
"<div ng-if=\"buildHookSelection.type.id === 'command' || buildHookSelection.type.id === 'commandArgs'\">\n" +
92629262
"<h4>Command</h4>\n" +
9263-
"<edit-command args=\"updatedBuildConfig.spec.postCommit.command\">\n" +
9263+
"<edit-command args=\"updatedBuildConfig.spec.postCommit.command\" is-required=\"true\">\n" +
92649264
"</edit-command>\n" +
92659265
"</div>\n" +
9266-
"<div ng-show=\"buildHookSelection.type.id === 'args' || buildHookSelection.type.id === 'commandArgs' || buildHookSelection.type.id === 'scriptArgs' \">\n" +
9266+
"<div ng-if=\"buildHookSelection.type.id === 'args' || buildHookSelection.type.id === 'commandArgs' || buildHookSelection.type.id === 'scriptArgs' \">\n" +
92679267
"<h4>Arguments</h4>\n" +
9268-
"<edit-command args=\"updatedBuildConfig.spec.postCommit.args\" type=\"argument\">\n" +
9268+
"<edit-command args=\"updatedBuildConfig.spec.postCommit.args\" type=\"argument\" is-required=\"true\">\n" +
92699269
"</edit-command>\n" +
92709270
"</div>\n" +
92719271
"</fieldset>\n" +

0 commit comments

Comments
 (0)