sadpandajoe commented on code in PR #45337:
URL: https://github.com/apache/superset/pull/45337#discussion_r4302541411
##########
superset-frontend/src/pages/ActionLog/index.tsx:
##########
@@ -215,24 +226,42 @@ function ActionLogList() {
row: {
original: { json },
},
- }: any) => (
- <Typography.Text
- css={css`
- .ant-typography-copy {
- visibility: hidden;
- }
- &:hover .ant-typography-copy {
- visibility: visible;
- }
- `}
- copyable={!!json}
- ellipsis={{
- tooltip: { styles: { root: { maxWidth: '900px' } }, title: json
},
- }}
- >
- {json}
- </Typography.Text>
- ),
+ }: any) => {
+ const jsonObject = safeJsonObjectParse(json);
+ if (jsonObject) {
+ return (
+ <JsonCellTrigger>
+ <JsonModal
Review Comment:
JsonModal's tree strips the quotes from any string that looks like an
integer, not only from big numbers the parser stored as strings. A logged
payload like `{"dashboard_id":"123","count":123}` would show both values as
bare `123`, so the tree no longer tells you which was a string and which a
number, and the Copy output (the raw value) wouldn't match what was displayed.
Is that acceptable for audit-log payloads, where URL and form params are often
logged as strings?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]