Skip to content

Commit

Permalink
Bug 1509142 - Should not display the 'Reveal Secret' link when secret…
Browse files Browse the repository at this point in the history
…s without 'data' field
  • Loading branch information
jhadvig committed Nov 3, 2017
1 parent 424cf01 commit b99829d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/views/browse/secret.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h1 class="contains-actions">
<div class="resource-details">
<h2 class="mar-top-none">
{{secret.type}}
<small class="mar-left-sm"><a href="" ng-click="view.showSecret = !view.showSecret">{{view.showSecret ? "Hide" : "Reveal"}} Secret</a></small>
<small class="mar-left-sm"><a href="" ng-if="secret.data" ng-click="view.showSecret = !view.showSecret">{{view.showSecret ? "Hide" : "Reveal"}} Secret</a></small>
</h2>
<dl class="secret-data left">
<div ng-repeat="(secretDataName, secretData) in decodedSecretData" class="image-source-item">
Expand Down Expand Up @@ -90,6 +90,9 @@ <h2 class="mar-top-none">
</div>
</div>
</dl>
<p ng-if="!secret.data" class="mar-bottom-xl">
There are no data in this secret.
</p>
<annotations annotations="secret.metadata.annotations"></annotations>
</div>
</div><!-- /col-* -->
Expand Down
5 changes: 4 additions & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3611,7 +3611,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div class=\"resource-details\">\n" +
"<h2 class=\"mar-top-none\">\n" +
"{{secret.type}}\n" +
"<small class=\"mar-left-sm\"><a href=\"\" ng-click=\"view.showSecret = !view.showSecret\">{{view.showSecret ? \"Hide\" : \"Reveal\"}} Secret</a></small>\n" +
"<small class=\"mar-left-sm\"><a href=\"\" ng-if=\"secret.data\" ng-click=\"view.showSecret = !view.showSecret\">{{view.showSecret ? \"Hide\" : \"Reveal\"}} Secret</a></small>\n" +
"</h2>\n" +
"<dl class=\"secret-data left\">\n" +
"<div ng-repeat=\"(secretDataName, secretData) in decodedSecretData\" class=\"image-source-item\">\n" +
Expand All @@ -3636,6 +3636,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"</div>\n" +
"</dl>\n" +
"<p ng-if=\"!secret.data\" class=\"mar-bottom-xl\">\n" +
"There are no data in this secret.\n" +
"</p>\n" +
"<annotations annotations=\"secret.metadata.annotations\"></annotations>\n" +
"</div>\n" +
"</div>\n" +
Expand Down

0 comments on commit b99829d

Please sign in to comment.