Skip to content

Commit

Permalink
Merge pull request #2478 from spadgett/blank-secret
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Bug 1510346 - Don't let users copy empty secret value

Instead of using copy-to-clipboard with an empty value, show "No value" when a
secret value is null.

Follow on fix for https://bugzilla.redhat.com/show_bug.cgi?id=1510346

/kind bug
/assign @jwforres
  • Loading branch information
openshift-merge-robot authored Nov 8, 2017
2 parents fc6fd5d + 599890b commit 501c413
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/views/browse/secret.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ <h2 class="mar-top-none">
</div>
<div ng-switch-default>
<dt ng-attr-title="{{secretDataName}}">{{secretDataName}}</dt>
<dd ng-if="view.showSecret">
<dd ng-if="view.showSecret && !secretData"><em>No value</em></dd>
<dd ng-if="view.showSecret && secretData">
<copy-to-clipboard
clipboard-text="secretData"
multiline="secretData | isMultiline : true"
Expand Down
3 changes: 2 additions & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3620,7 +3620,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<div ng-switch-default>\n" +
"<dt ng-attr-title=\"{{secretDataName}}\">{{secretDataName}}</dt>\n" +
"<dd ng-if=\"view.showSecret\">\n" +
"<dd ng-if=\"view.showSecret && !secretData\"><em>No value</em></dd>\n" +
"<dd ng-if=\"view.showSecret && secretData\">\n" +
"<copy-to-clipboard clipboard-text=\"secretData\" multiline=\"secretData | isMultiline : true\" display-wide=\"true\">\n" +
"</copy-to-clipboard>\n" +
"<div ng-if=\"decodedSecretData.$$nonprintable[secretDataName]\" class=\"help-block\">\n" +
Expand Down

0 comments on commit 501c413

Please sign in to comment.