-
Notifications
You must be signed in to change notification settings - Fork 881
chore: Add Audit Log components and service to load from the API #3782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I like the color-coded pills for status codes, but wonder if it will be unclear to some users what they represent. Maybe they could say |
I denied some of the Chromatic changes - it's all to do with indentations making values not line up with their headers. Not sure what caused it. |
Does this handle pagination? |
Nops, but I can do it tomorrow - it would be a diff PR tho. What do you think? Or the port thing should be a priority? |
I think HTTP status is very well known 🤔 . For this layout specifically, adding the Status on every row can be too much visually because it increases the "accent color" area. I would wait for users to complain about that. But, if you think we should, I would be happy to add. Here is a comparison: |
Sure, let's leave the status code as just the number and see if people ask about it. |
I denied a few more Chromatic changes, this time it's just that a color change you made affected the Schedule switch, I don't think it looks "on" enough in the dark blue-grey color. |
Co-authored-by: Presley Pizzo <1290996+presleyp@users.noreply.github.com>
I made some minor updates:
|
9f99fde
to
acaa45a
Compare
const readableActionMessage = (auditLog: AuditLog) => { | ||
return `${actionLabelByAction[auditLog.action]} ${ | ||
resourceLabelByResourceType[auditLog.resource_type] | ||
}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how to do interpolation with react-i18n https://www.i18next.com/translation-function/interpolation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are planning to move this "message builder" to the BE so the CLI and FE can use the same language so I'm going just let this as it is but thanks for sharing the docs. Do you know how they could support interpolation with components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the closest I've found https://www.i18next.com/translation-function/formatting
Preview:

Demo:
Screen.Recording.2022-09-07.at.15.31.43.mov
Closes #3607 #3429 #3428 #3608