Skip to content
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

Added user agent, remote_ip, action_source to action_logs #14036

Merged
merged 11 commits into from
Dec 15, 2023
Merged

Conversation

snipe
Copy link
Owner

@snipe snipe commented Dec 14, 2023

This PR logs the user agent, remote IP, and the action source of logged actions. This should help us better track down what's happening if data isn't being handled the way we expect, and can be useful for tracking down problematic updates.

Screenshot 2023-12-14 at 2 46 31 PM Screenshot 2023-12-14 at 2 54 51 PM

snipe added 10 commits December 14, 2023 14:32
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Copy link

This pull request has been linked to Shortcut Story #24355: Include IP and action_source in action_logs.

Copy link

what-the-diff bot commented Dec 14, 2023

PR Summary

  • Introduction of New Query Conditions
    A few more query conditions are now being added in the ReportsController for the index method. These include action_source and remote_ip.

  • Enhancements in the Actionlog model
    Three new columns have been added to the Actionlog model - remote_ip, user_agent, and action_source. Apart from this, adjustments have been made to the fillable and searchable attributes accordingly.

  • Database update: Newly added columns
    A new migration file ensures we include remote_ip and action_source columns to the action_logs table in the database.

  • Language update concerning action_source
    The language file general.php now has a new translation key for action_source.

  • Visualization of Additions in Views
    Our display tables in hardware/view.blade.php, reports/activity.blade.php, and users/view.blade.php views have been updated to show the newly added columns - remote_ip, user_agent, and action_source.

Note: The inclusion of the same migration file is mentioned twice, and seems redundant, as the action is only executed once. Thus, in essence, a new migration file has been added to include the remote_ip and action_source columns to the action_logs table.

@snipe snipe requested a review from uberbrady December 14, 2023 14:55
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, and is an awesome feature! You had mentioned (verbally) something about wanting to index these by default to make it easier to search and sort - is that something you're still interested in? Regardless, this looks good to go to me! Thank you!

Signed-off-by: snipe <snipe@snipe.net>
@snipe snipe merged commit 56f9c7f into develop Dec 15, 2023
7 checks passed
@snipe snipe deleted the feature/sc-24355 branch December 15, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants