Skip to content

Commit d7048b9

Browse files
committed
DEV Copy & Truncate Updates
Copy and truncate updates, along with a minor correction to hide the secret when the modal is closed
1 parent 121ec41 commit d7048b9

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

app/scripts/directives/editEnvironmentFrom.js

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
};
4242

4343
ctrl.closeOverlayPanel = function() {
44+
ctrl.showSecret = false;
4445
ctrl.overlayPanelVisible = false;
4546
};
4647

app/views/directives/edit-environment-from.html

+11-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ <h3>{{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}} Details</h3>
8989
</div>
9090
<div class="modal-body">
9191
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}
92-
<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>
92+
<small ng-if="$ctrl.overlayPaneEntryDetails.kind === 'Secret'" class="mar-left-sm">
93+
<a href=""
94+
role="button"
95+
ng-click="$ctrl.showSecret = !$ctrl.showSecret">{{$ctrl.showSecret ? "Hide" : "Reveal"}} Secret</a>
96+
</small>
9397
</h4>
9498

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

113117
<span ng-if="!$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'">&#42;&#42;&#42;&#42;&#42;</span>
114118
<div ng-if="$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'">
115-
{{value}}
119+
<truncate-long-text
120+
content="value"
121+
limit="50"
122+
newline-limit="2"
123+
expandable="true">
124+
</truncate-long-text>
116125
<div ng-if="decodedData.$$nonprintable[prop]" class="help-block">
117126
This secret value contains non-printable characters and is displayed as a Base64-encoded string.
118127
</div>

dist/scripts/scripts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9217,7 +9217,7 @@ var r = this, o = t("canI"), i = t("humanizeKind"), s = _.uniqueId();
92179217
r.setFocusClass = "edit-environment-from-set-focus-" + s, r.viewOverlayPanel = function(e) {
92189218
r.decodedData = e.data, r.overlayPaneEntryDetails = e, "Secret" === e.kind && (r.decodedData = a.decodeSecretData(e.data)), r.overlayPanelVisible = !0;
92199219
}, r.closeOverlayPanel = function() {
9220-
r.overlayPanelVisible = !1;
9220+
r.showSecret = !1, r.overlayPanelVisible = !1;
92219221
};
92229222
var c = function(e, t) {
92239223
e && e.push(t || {});

dist/scripts/templates.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -6749,7 +6749,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
67496749
"</div>\n" +
67506750
"<div class=\"modal-body\">\n" +
67516751
"<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}\n" +
6752-
"<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" +
6752+
"<small ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'Secret'\" class=\"mar-left-sm\">\n" +
6753+
"<a href=\"\" role=\"button\" ng-click=\"$ctrl.showSecret = !$ctrl.showSecret\">{{$ctrl.showSecret ? \"Hide\" : \"Reveal\"}} Secret</a>\n" +
6754+
"</small>\n" +
67536755
"</h4>\n" +
67546756
"<div ng-if=\"!($ctrl.overlayPaneEntryDetails.data | size)\" class=\"empty-state-message text-center\">\n" +
67556757
"The {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind}} has no properties.\n" +
@@ -6764,7 +6766,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
67646766
"</truncate-long-text>\n" +
67656767
"<span ng-if=\"!$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'\">&#42;&#42;&#42;&#42;&#42;</span>\n" +
67666768
"<div ng-if=\"$ctrl.showSecret && $ctrl.overlayPaneEntryDetails.kind === 'Secret'\">\n" +
6767-
"{{value}}\n" +
6769+
"<truncate-long-text content=\"value\" limit=\"50\" newline-limit=\"2\" expandable=\"true\">\n" +
6770+
"</truncate-long-text>\n" +
67686771
"<div ng-if=\"decodedData.$$nonprintable[prop]\" class=\"help-block\">\n" +
67696772
"This secret value contains non-printable characters and is displayed as a Base64-encoded string.\n" +
67706773
"</div>\n" +

0 commit comments

Comments
 (0)