diff --git a/.claude/JOURNAL.md b/.claude/JOURNAL.md index 1347e1c..fc12df7 100644 --- a/.claude/JOURNAL.md +++ b/.claude/JOURNAL.md @@ -198,3 +198,6 @@ This journal tracks substantive work on documents, diagrams, and documentation c 65. **Task - Activity table sorting and display improvements**: Added column sorting and improved Last Active display
**Result**: Added clickable column sorting for User, CPU, Memory, Time Left, Last Active columns. Sorting cycles through descending → ascending → none (default). Sort icons (▲/▼) show current direction. Default sort is activity score descending. Null values sorted to end. Changed Last Active display to match admin page format with full words ("8 minutes ago", "14 days ago", "4 months ago") with proper singular/plural handling + +66. **Task - Activity Monitor resource refresh separation**: Separated resource updates from activity sampling with 10-second refresh interval
+ **Result**: **Major architectural change** - The Activity Monitor now has a clear separation between two distinct operations: (1) **Resource Updates** - Status (active/inactive/offline), CPU usage, memory usage, and idle culler timers are refreshed automatically every 10 seconds via frontend auto-refresh. This provides real-time monitoring without recording activity history. (2) **Activity Sampling** - Recording of user activity state for historical scoring is completely separate and will be controlled by a background process (not implemented yet). **UI Changes**: Removed "Measured X ago" timer display as it added no value and was confusing when data refreshed automatically. Removed lastMeasuredTimestamp tracking, measureTimeUpdateInterval timer, and formatTimeAgo function. Changed auto-refresh interval from 30 seconds to 10 seconds. **New Environment Variable**: Added `JUPYTERHUB_ACTIVITYMON_RESOURCES_UPDATE_INTERVAL` (default 10 seconds) to Dockerfile and settings_dictionary.yml for configuring resource refresh rate. **Key Clarification**: Viewing the Activity page or auto-refresh does NOT record activity samples - it only reads current state. Activity samples must be recorded by a separate mechanism (to be implemented) that runs independently of page views diff --git a/services/jupyterhub/Dockerfile.jupyterhub b/services/jupyterhub/Dockerfile.jupyterhub index 3366a72..a5d5427 100644 --- a/services/jupyterhub/Dockerfile.jupyterhub +++ b/services/jupyterhub/Dockerfile.jupyterhub @@ -90,6 +90,7 @@ ENV JUPYTERHUB_IDLE_CULLER_MAX_EXTENSION=24 ENV JUPYTERHUB_ACTIVITYMON_RETENTION_DAYS=7 ENV JUPYTERHUB_ACTIVITYMON_HALF_LIFE=24 ENV JUPYTERHUB_ACTIVITYMON_INACTIVE_AFTER=60 +ENV JUPYTERHUB_ACTIVITYMON_RESOURCES_UPDATE_INTERVAL=10 # Misc ENV TF_CPP_MIN_LOG_LEVEL=3 ENV STELLARS_JUPYTERHUB_VERSION=${VERSION} diff --git a/services/jupyterhub/conf/settings_dictionary.yml b/services/jupyterhub/conf/settings_dictionary.yml index 99b6018..6243425 100644 --- a/services/jupyterhub/conf/settings_dictionary.yml +++ b/services/jupyterhub/conf/settings_dictionary.yml @@ -93,6 +93,10 @@ Activity Monitor: description: Minutes until user considered inactive (1-1440) default: "60" + - name: JUPYTERHUB_ACTIVITYMON_RESOURCES_UPDATE_INTERVAL + description: Resource refresh interval in seconds (status, CPU, memory) + default: "10" + Branding: - name: JUPYTERHUB_LOGO_URI description: Custom logo URI diff --git a/services/jupyterhub/html_templates_enhanced/activity.html b/services/jupyterhub/html_templates_enhanced/activity.html index c74f8ce..6859170 100644 --- a/services/jupyterhub/html_templates_enhanced/activity.html +++ b/services/jupyterhub/html_templates_enhanced/activity.html @@ -26,7 +26,6 @@
0 active servers -