Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug displaying read-only build config env vars #1107

Merged
merged 1 commit into from
Jan 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions app/views/browse/build-config.html
Original file line number Diff line number Diff line change
@@ -458,16 +458,6 @@ <h3>Environment Variables</h3>
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 Environment Variable"
show-header></key-value-editor>
<key-value-editor
ng-if="!('buildconfigs' | canI : 'update')"
entries="envVars"
key-placeholder="Name"
value-placeholder="Value"
is-readonly
cannot-add
cannot-sort
cannot-delete
show-header></key-value-editor>
<button
class="btn btn-default"
ng-click="saveEnvVars()"
@@ -479,6 +469,16 @@ <h3>Environment Variables</h3>
class="mar-left-sm"
style="vertical-align: -2px;">Clear Changes</a>
</div>
<key-value-editor
ng-if="!('buildconfigs' | canI : 'update')"
entries="envVars"
key-placeholder="Name"
value-placeholder="Value"
is-readonly
cannot-add
cannot-sort
cannot-delete
show-header></key-value-editor>
</ng-form>
</uib-tab>
</uib-tabset>
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
@@ -2157,10 +2157,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<ng-form name=\"forms.bcEnvVars\">\n" +
"<div ng-if=\"'buildconfigs' | canI : 'update'\">\n" +
"<key-value-editor entries=\"envVars\" key-placeholder=\"Name\" value-placeholder=\"Value\" 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 Environment Variable\" show-header></key-value-editor>\n" +
"<key-value-editor ng-if=\"!('buildconfigs' | canI : 'update')\" entries=\"envVars\" key-placeholder=\"Name\" value-placeholder=\"Value\" is-readonly cannot-add cannot-sort cannot-delete show-header></key-value-editor>\n" +
"<button class=\"btn btn-default\" ng-click=\"saveEnvVars()\" ng-disabled=\"forms.bcEnvVars.$pristine || forms.bcEnvVars.$invalid\">Save</button>\n" +
"<a ng-if=\"!forms.bcEnvVars.$pristine\" href=\"\" ng-click=\"clearEnvVarUpdates()\" class=\"mar-left-sm\" style=\"vertical-align: -2px\">Clear Changes</a>\n" +
"</div>\n" +
"<key-value-editor ng-if=\"!('buildconfigs' | canI : 'update')\" entries=\"envVars\" key-placeholder=\"Name\" value-placeholder=\"Value\" is-readonly cannot-add cannot-sort cannot-delete show-header></key-value-editor>\n" +
"</ng-form>\n" +
"</uib-tab>\n" +
"</uib-tabset>\n" +