-
Notifications
You must be signed in to change notification settings - Fork 150
Record client ips #141
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
base: next
Are you sure you want to change the base?
Record client ips #141
Conversation
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Added db schema migration Rewrite to a more generic ORM column handling Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
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.
Pull request overview
This PR implements client IP address recording functionality (#121) by adding a lastRequestIP column to the SQLite database schema. The implementation includes database schema migration from version 0 to version 1, template updates to display the IP addresses, and code changes to capture and store client IPs during KMS activation requests.
Key Changes
- Added
lastRequestIPTEXT column to the SQLite database schema with automatic migration for existing databases - Updated the HTML template to display client IP addresses in a new "Last Address" column
- Refactored database code to use column name mappings for better maintainability and consistent field naming (
appId→applicationId,requestTime→lastRequestTime)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| py-kms/pykms_Sql.py | Added database schema versioning with metadata table, implemented migration to add lastRequestIP column, refactored SQL operations to use column name mappings, and improved error handling |
| py-kms/templates/clients.html | Added "Last Address" column header and displays IP address with "N/A" fallback for null values |
| py-kms/pykms_Server.py | Updated SQL module initialization to check availability flag and improved error handling with traceback logging |
| py-kms/pykms_Base.py | Updated infoDict to capture client IP from srv_config['raddr'][0] and renamed keys for consistency |
| py-kms/pykms_Client.py | Modernized datetime usage and improved regex pattern with raw string literal |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a4ab407 to
894caf5
Compare
894caf5 to
161eb48
Compare
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.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
Signed-off-by: simonmicro <[email protected]>
161eb48 to
1c28865
Compare
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.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
After #140
Resolves #121