We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c1a30c commit 8f77a66Copy full SHA for 8f77a66
apps/st2-actions/actions-details.component.js
@@ -274,7 +274,14 @@ export default class ActionsDetails extends React.Component {
274
sanitizePreview(code) {
275
return _.mapValues(code, (value, key) => {
276
if (value && this.props.action.parameters[key] && this.props.action.parameters[key].secret) {
277
- return '*'.repeat(value.length);
+ switch (this.props.action.parameters[key].type) {
278
+ case "object":
279
+ return `{${'*'.repeat(Math.max(0, JSON.stringify(value).length -2))}}`;
280
+ case "array":
281
+ return `[${'*'.repeat(Math.max(0, JSON.stringify(value).length -2))}]`;
282
+ default:
283
+ return '*'.repeat(value.length);
284
+ }
285
}
286
287
return value;
0 commit comments