Add activity logging for registrations, logins, and predictions with admin page#6
Draft
Add activity logging for registrations, logins, and predictions with admin page#6
Conversation
…admin page Co-authored-by: jefferyepayne <50836441+jefferyepayne@users.noreply.github.com>
Co-authored-by: jefferyepayne <50836441+jefferyepayne@users.noreply.github.com>
…admin page Co-authored-by: jefferyepayne <50836441+jefferyepayne@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add logging for registrations, logins, and predictions
Add activity logging for registrations, logins, and predictions with admin page
Dec 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds activity logging to track user registrations, logins, and wine predictions, with an admin page to view the log.
Changes
activity_logtable with timestamp, activity_type, username, and details columnslog_activity()helper called on:/adminroute and template displaying activity log (requires login)Usage
Screenshot
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4003 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.PupC7I --subproc-heap-profiling --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14147795062571986356,13029113596044864938,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)/opt/google/chrome/chrome /bin/google-chrome --allow-file-access-from-files --allow-insecure-localhost --allow-pre-commit-input --allow-running-insecure-content --ash-no-nudges --deny-permission-prompts --disable-3d-apis --disable-autofill-keyboard-accessory-view[8] --disable-REDACTED-networking --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-domain-reliability --disable-features=IgnoreDuplicateNavs,Prewarm,OptimizationHints,OptimizationHintsFetching,Translate,OptimizationTargetPrediction,OptimizationGuideModelDownloading,DownloadBubble,DownloadBubbleV2,InsecureDownloadWarnings,InterestFeedContentSuggestions,Pri(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4168 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.8Co9HK --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,4923708407940963738,15930798876223241602,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)cdn.jsdelivr.net/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4003 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.PupC7I --subproc-heap-profiling --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14147795062571986356,13029113596044864938,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)/opt/google/chrome/chrome /bin/google-chrome --allow-file-access-from-files --allow-insecure-localhost --allow-pre-commit-input --allow-running-insecure-content --ash-no-nudges --deny-permission-prompts --disable-3d-apis --disable-autofill-keyboard-accessory-view[8] --disable-REDACTED-networking --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-domain-reliability --disable-features=IgnoreDuplicateNavs,Prewarm,OptimizationHints,OptimizationHintsFetching,Translate,OptimizationTargetPrediction,OptimizationGuideModelDownloading,DownloadBubble,DownloadBubbleV2,InsecureDownloadWarnings,InterestFeedContentSuggestions,Pri(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4168 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.8Co9HK --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,4923708407940963738,15930798876223241602,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)clients2.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4003 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.PupC7I --subproc-heap-profiling --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14147795062571986356,13029113596044864938,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)/opt/google/chrome/chrome /bin/google-chrome --allow-file-access-from-files --allow-insecure-localhost --allow-pre-commit-input --allow-running-insecure-content --ash-no-nudges --deny-permission-prompts --disable-3d-apis --disable-autofill-keyboard-accessory-view[8] --disable-REDACTED-networking --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-domain-reliability --disable-features=IgnoreDuplicateNavs,Prewarm,OptimizationHints,OptimizationHintsFetching,Translate,OptimizationTargetPrediction,OptimizationGuideModelDownloading,DownloadBubble,DownloadBubbleV2,InsecureDownloadWarnings,InterestFeedContentSuggestions,Pri(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4168 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.8Co9HK --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,4923708407940963738,15930798876223241602,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)content-autofill.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4003 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.PupC7I --subproc-heap-profiling --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14147795062571986356,13029113596044864938,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)/opt/google/chrome/chrome /bin/google-chrome --allow-file-access-from-files --allow-insecure-localhost --allow-pre-commit-input --allow-running-insecure-content --ash-no-nudges --deny-permission-prompts --disable-3d-apis --disable-autofill-keyboard-accessory-view[8] --disable-REDACTED-networking --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-domain-reliability --disable-features=IgnoreDuplicateNavs,Prewarm,OptimizationHints,OptimizationHintsFetching,Translate,OptimizationTargetPrediction,OptimizationGuideModelDownloading,DownloadBubble,DownloadBubbleV2,InsecureDownloadWarnings,InterestFeedContentSuggestions,Pri(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4168 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.8Co9HK --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,4923708407940963738,15930798876223241602,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)googlechromelabs.github.io/home/REDACTED/.local/bin/pytest pytest tests/test_admin.py -v --headless(dns block)/home/REDACTED/.local/bin/pytest pytest tests/test_login.py tests/test_register.py -v --headless(dns block)www.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4003 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.PupC7I --subproc-heap-profiling --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14147795062571986356,13029113596044864938,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)/opt/google/chrome/chrome /bin/google-chrome --allow-file-access-from-files --allow-insecure-localhost --allow-pre-commit-input --allow-running-insecure-content --ash-no-nudges --deny-permission-prompts --disable-3d-apis --disable-autofill-keyboard-accessory-view[8] --disable-REDACTED-networking --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-domain-reliability --disable-features=IgnoreDuplicateNavs,Prewarm,OptimizationHints,OptimizationHintsFetching,Translate,OptimizationTargetPrediction,OptimizationGuideModelDownloading,DownloadBubble,DownloadBubbleV2,InsecureDownloadWarnings,InterestFeedContentSuggestions,Pri(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --ignore-certificate-errors --crashpad-handler-pid=4168 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/.org.chromium.Chromium.scoped_dir.8Co9HK --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,4923708407940963738,15930798876223241602,262144 --disable-features=DisableLoadExtensionCommandLineSwitch,DownloadBubble,DownloadBubbleV2,IgnoreDuplicateNavs,InsecureDownloadWarnings,InterestFeedContentSuggestions,OptimizationGuideModelDownloading,OptimizationHints,OptimizationHintsFetching,Optimization(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.