Skip to content

Commit

Permalink
Merge pull request #2211 from cdcabrera/issue-envfrom-copy
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Oct 5, 2017
2 parents 5017f92 + a0b1615 commit 8af5164
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 4 additions & 5 deletions app/views/directives/edit-environment-variables.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<div ng-repeat="container in $ctrl.containers">
<h3>Container {{container.name}}</h3>

<h4 class="section-label">Variables</h4>
<div ng-if="!$ctrl.canIUpdate || $ctrl.ngReadonly">
<span ng-if="!container.env.length">
No environment variables set in the {{$ctrl.apiObject.kind | humanizeKind}}
Expand All @@ -30,8 +29,8 @@ <h4 class="section-label">Variables</h4>
key-validator="[A-Za-z_][A-Za-z0-9_]*"
key-validator-error="Please enter a valid key."
key-validator-error-tooltip="A valid environment variable name is an alphanumeric (a-z and 0-9) string beginning with a letter that may contain underscores."
add-row-link="Add Variable"
add-row-with-selectors-link="Add Variable from Config Map or Secret"
add-row-link="Add Value"
add-row-with-selectors-link="Add Value from Config Map or Secret"
show-header>
</key-value-editor>

Expand All @@ -44,9 +43,9 @@ <h4 class="section-label">
</h4>
<edit-environment-from
entries="container.envFrom"
selector-placeholder="Secret/Config Map"
selector-placeholder="Config Map/Secret"
env-from-selector-options="$ctrl.valueFromObjects"
add-row-link="Add ALL Values from Secret or Config Map"
add-row-link="Add ALL Values from Config Map or Secret"
show-header>
</edit-environment-from>
</div>
Expand Down
5 changes: 2 additions & 3 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6655,21 +6655,20 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<confirm-on-exit ng-if=\"$ctrl.canIUpdate && !$ctrl.ngReadonly\" dirty=\"$ctrl.form.$dirty\"></confirm-on-exit>\n" +
"<div ng-repeat=\"container in $ctrl.containers\">\n" +
"<h3>Container {{container.name}}</h3>\n" +
"<h4 class=\"section-label\">Variables</h4>\n" +
"<div ng-if=\"!$ctrl.canIUpdate || $ctrl.ngReadonly\">\n" +
"<span ng-if=\"!container.env.length\">\n" +
"No environment variables set in the {{$ctrl.apiObject.kind | humanizeKind}} template for container {{container.name}}.\n" +
"</span>\n" +
"<key-value-editor ng-if=\"container.env.length\" entries=\"container.env\" key-placeholder=\"Name\" value-placeholder=\"Value\" cannot-add cannot-sort cannot-delete is-readonly show-header>\n" +
"</key-value-editor>\n" +
"</div>\n" +
"<key-value-editor ng-if=\"$ctrl.canIUpdate && !$ctrl.ngReadonly\" entries=\"container.env\" key-placeholder=\"Name\" value-placeholder=\"Value\" value-from-selector-options=\"$ctrl.valueFromObjects\" key-validator=\"[A-Za-z_][A-Za-z0-9_]*\" key-validator-error=\"Please enter a valid key.\" key-validator-error-tooltip=\"A valid environment variable name is an alphanumeric (a-z and 0-9) string beginning with a letter that may contain underscores.\" add-row-link=\"Add Variable\" add-row-with-selectors-link=\"Add Variable from Config Map or Secret\" show-header>\n" +
"<key-value-editor ng-if=\"$ctrl.canIUpdate && !$ctrl.ngReadonly\" entries=\"container.env\" key-placeholder=\"Name\" value-placeholder=\"Value\" value-from-selector-options=\"$ctrl.valueFromObjects\" key-validator=\"[A-Za-z_][A-Za-z0-9_]*\" key-validator-error=\"Please enter a valid key.\" key-validator-error-tooltip=\"A valid environment variable name is an alphanumeric (a-z and 0-9) string beginning with a letter that may contain underscores.\" add-row-link=\"Add Value\" add-row-with-selectors-link=\"Add Value from Config Map or Secret\" show-header>\n" +
"</key-value-editor>\n" +
"<h4 class=\"section-label\">\n" +
"Environment From\n" +
"<span class=\"pficon pficon-help\" aria-hidden=\"true\" data-toggle=\"tooltip\" data-original-title=\"Environment From lets you add all key-value pairs from a config map or secret as environment variables.\"></span>\n" +
"</h4>\n" +
"<edit-environment-from entries=\"container.envFrom\" selector-placeholder=\"Secret/Config Map\" env-from-selector-options=\"$ctrl.valueFromObjects\" add-row-link=\"Add ALL Values from Secret or Config Map\" show-header>\n" +
"<edit-environment-from entries=\"container.envFrom\" selector-placeholder=\"Config Map/Secret\" env-from-selector-options=\"$ctrl.valueFromObjects\" add-row-link=\"Add ALL Values from Config Map or Secret\" show-header>\n" +
"</edit-environment-from>\n" +
"</div>\n" +
"<button class=\"btn btn-default\" ng-if=\"$ctrl.canIUpdate && !$ctrl.ngReadonly\" ng-click=\"$ctrl.save()\" ng-disabled=\"$ctrl.form.$pristine || $ctrl.form.$invalid\">Save</button>\n" +
Expand Down

0 comments on commit 8af5164

Please sign in to comment.