Skip to content

Commit

Permalink
DEV Copy & Truncate Updates
Browse files Browse the repository at this point in the history
Copy and truncate updates, along with a minor correction to hide the
secret when the modal is closed
  • Loading branch information
cdcabrera committed Oct 27, 2017
1 parent 121ec41 commit d7048b9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/scripts/directives/editEnvironmentFrom.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
};

ctrl.closeOverlayPanel = function() {
ctrl.showSecret = false;
ctrl.overlayPanelVisible = false;
};

Expand Down
13 changes: 11 additions & 2 deletions app/views/directives/edit-environment-from.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ <h3>{{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}} Details</h3>
</div>
<div class="modal-body">
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}
<small ng-if="$ctrl.overlayPaneEntryDetails.kind === 'Secret'" class="mar-left-sm"><a href="" ng-click="$ctrl.showSecret = !$ctrl.showSecret">{{$ctrl.showSecret ? "Hide" : "Reveal"}} Values</a></small>
<small ng-if="$ctrl.overlayPaneEntryDetails.kind === 'Secret'" class="mar-left-sm">
<a href=""
role="button"
ng-click="$ctrl.showSecret = !$ctrl.showSecret">{{$ctrl.showSecret ? "Hide" : "Reveal"}} Secret</a>
</small>
</h4>

<div ng-if="!($ctrl.overlayPaneEntryDetails.data | size)" class="empty-state-message text-center">
Expand All @@ -112,7 +116,12 @@ <h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}

<span ng-if="!$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'">&#42;&#42;&#42;&#42;&#42;</span>
<div ng-if="$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'">
{{value}}
<truncate-long-text
content="value"
limit="50"
newline-limit="2"
expandable="true">
</truncate-long-text>
<div ng-if="decodedData.$$nonprintable[prop]" class="help-block">
This secret value contains non-printable characters and is displayed as a Base64-encoded string.
</div>
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -9217,7 +9217,7 @@ var r = this, o = t("canI"), i = t("humanizeKind"), s = _.uniqueId();
r.setFocusClass = "edit-environment-from-set-focus-" + s, r.viewOverlayPanel = function(e) {
r.decodedData = e.data, r.overlayPaneEntryDetails = e, "Secret" === e.kind && (r.decodedData = a.decodeSecretData(e.data)), r.overlayPanelVisible = !0;
}, r.closeOverlayPanel = function() {
r.overlayPanelVisible = !1;
r.showSecret = !1, r.overlayPanelVisible = !1;
};
var c = function(e, t) {
e && e.push(t || {});
Expand Down
7 changes: 5 additions & 2 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6749,7 +6749,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<div class=\"modal-body\">\n" +
"<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}\n" +
"<small ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'Secret'\" class=\"mar-left-sm\"><a href=\"\" ng-click=\"$ctrl.showSecret = !$ctrl.showSecret\">{{$ctrl.showSecret ? \"Hide\" : \"Reveal\"}} Values</a></small>\n" +
"<small ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'Secret'\" class=\"mar-left-sm\">\n" +
"<a href=\"\" role=\"button\" ng-click=\"$ctrl.showSecret = !$ctrl.showSecret\">{{$ctrl.showSecret ? \"Hide\" : \"Reveal\"}} Secret</a>\n" +
"</small>\n" +
"</h4>\n" +
"<div ng-if=\"!($ctrl.overlayPaneEntryDetails.data | size)\" class=\"empty-state-message text-center\">\n" +
"The {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind}} has no properties.\n" +
Expand All @@ -6764,7 +6766,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</truncate-long-text>\n" +
"<span ng-if=\"!$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'\">&#42;&#42;&#42;&#42;&#42;</span>\n" +
"<div ng-if=\"$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'\">\n" +
"{{value}}\n" +
"<truncate-long-text content=\"value\" limit=\"50\" newline-limit=\"2\" expandable=\"true\">\n" +
"</truncate-long-text>\n" +
"<div ng-if=\"decodedData.$$nonprintable[prop]\" class=\"help-block\">\n" +
"This secret value contains non-printable characters and is displayed as a Base64-encoded string.\n" +
"</div>\n" +
Expand Down

0 comments on commit d7048b9

Please sign in to comment.