-
Notifications
You must be signed in to change notification settings - Fork 936
feat: Add audit log filters #4078
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
Opening to receiving initial feedback on the API side. |
var params []string | ||
if req.SearchQuery != "" { | ||
params = append(params, req.SearchQuery) | ||
} | ||
q.Set("q", strings.Join(params, " ")) |
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.
I'm slightly confused with params
. It seems like it can only ever have 0 or 1 elements. Why do we need to strings.Join
it?
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.
Good catch, I copied and paste from the workspace logic.
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.
Thinking better, it could have resource_type:workspace action:create
right?
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.
Is this where we're defining the name of the param? Do we have control over calling it q
or something else?
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.
LGTM!
var params []string | ||
if req.SearchQuery != "" { | ||
params = append(params, req.SearchQuery) | ||
} | ||
q.Set("q", strings.Join(params, " ")) |
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.
Is this where we're defining the name of the param? Do we have control over calling it q
or something else?
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 change looks good! One of the most important actions will be viewing logs by resource ID, so I hope we're adding it.
@kylecarbs how would you expect to use the "Resource ID" in the filtering? Just a text input? 🤔 wondering if we could provide a better experience. |
I'd do it with a filter, similar to this PR.
|
The back-end part of #4077