Skip to content

Conversation

@simonmicro
Copy link

@simonmicro simonmicro commented Dec 6, 2025

After #140
Resolves #121

Signed-off-by: simonmicro <[email protected]>
Added db schema migration
Rewrite to a more generic ORM column handling

Signed-off-by: simonmicro <[email protected]>
@simonmicro simonmicro requested a review from Copilot December 6, 2025 19:38
@simonmicro simonmicro self-assigned this Dec 6, 2025
@simonmicro simonmicro added the enhancement New feature or request label Dec 6, 2025
Copy link

Copilot AI left a 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 lastRequestIP TEXT 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 (appIdapplicationId, requestTimelastRequestTime)

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.

Copy link

Copilot AI left a 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.

@simonmicro simonmicro force-pushed the feature/record_client_ips branch from a4ab407 to 894caf5 Compare December 6, 2025 20:03
@simonmicro simonmicro requested a review from Copilot December 6, 2025 20:03
@simonmicro simonmicro force-pushed the feature/record_client_ips branch from 894caf5 to 161eb48 Compare December 6, 2025 20:04
@simonmicro simonmicro changed the base branch from master to next December 6, 2025 20:08
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show client IPvX in WebUI

2 participants