Commit Graph

81 Commits

Author SHA1 Message Date
stellarshenson
2d3e1e7949 chore: bump version to 3.7.20
Reflects JUPYTERHUB_FAVICON_URI feature and branding defaults cleanup.
2026-02-06 17:43:49 +01:00
stellarshenson
2a533f9140 docs: update journal with admin volume button feature
- Document final implementation using tr.user-row selector
- Username extracted from span[data-testid="user-name-div-{username}"]
- Button matches Edit User button styling (btn btn-light btn-xs)
- Positioned before Edit User button in actions cell
2026-01-26 13:35:26 +01:00
stellarshenson
4d1f4d1407 upraded latest version 2026-01-25 23:23:38 +01:00
stellarshenson
8980e552cf refactor: simplify Activity column header
Removed "(7 days)" suffix from Activity column header in activity.html.
The retention period is a configuration detail, not needed in the UI.
2026-01-25 11:48:49 +01:00
stellarshenson
ea5e8b730a feat: add volume size tooltip with per-volume breakdown
Activity Monitor now shows hover tooltip on volume sizes displaying
individual volume sizes (home, workspace, cache) instead of just total.

Backend changes:
- _fetch_volume_sizes() returns {total, volumes: {suffix: size}}
- ActivityDataHandler passes volume_breakdown to frontend

Frontend changes:
- formatVolumeSize() displays tooltip with sorted volume list
- Dotted underline indicates tooltip availability

Also: removed clean dependency from build targets in Makefile
2026-01-22 22:39:54 +01:00
stellarshenson
017c42ac68 feat: BUILD_OPTS for skipping version increment in Makefile
- Add BUILD_OPTS variable with --no-version-increment support
- Add maybe_increment_version conditional target
- Filter out custom opts before passing to docker
- Usage: make build BUILD_OPTS='--no-version-increment'
- Update journal with activity sampler fixes and color changes
2026-01-22 01:03:46 +01:00
stellarshenson
a2b7a0249a fix: activity bar colors 1=red, 2-3=yellow, 4-5=green 2026-01-21 16:50:36 +01:00
stellarshenson
e94680178c updated version 2026-01-21 15:53:20 +01:00
stellarshenson
887a3569fb fix: pass db and find_user to activity sampler instead of app
The sampler was expecting an app object with db and users attributes,
but handler settings don't provide that. Changed to pass handler's
self.db and self.find_user directly to the sampler.

Also added flush=True to print statements for immediate log output.
2026-01-21 15:01:13 +01:00
stellarshenson
24c51a959c feat: background activity sampler with Tornado PeriodicCallback
Add ActivitySampler singleton class that automatically samples activity
for ALL users (active, idle, offline) at configurable interval using
Tornado's PeriodicCallback for non-blocking execution.

- Uses JUPYTERHUB_ACTIVITYMON_ACTIVITY_UPDATE_INTERVAL (default 600s)
- Starts via post_init_hook after JupyterHub initialization
- Runs first sample immediately on startup
- Logs tick statistics after each sample cycle
- Fixes: missing parenthesis and stray code from previous edit
2026-01-21 14:38:17 +01:00
stellarshenson
7f9fb3f871 feat: activity sampling for all users including offline
- Added record_samples_for_all_users() to sample ALL users
- Offline users marked inactive (activity bars decay over time)
- New API: POST /hub/api/activity/sample (admin, for cron jobs)
- Returns counts: total, active, inactive, offline
2026-01-21 13:40:23 +01:00
stellarshenson
2c561490b3 perf: background caching for volume sizes
- Volume sizes now cached and refreshed hourly in background
- Activity page loads instantly (no longer waits for docker df)
- Added JUPYTERHUB_ACTIVITYMON_VOLUMES_UPDATE_INTERVAL (default 3600s)
- First load shows empty volumes until background refresh completes
2026-01-21 08:56:36 +01:00
stellarshenson
48da028968 feat: add Volumes column to activity monitor
- Backend: get_all_user_volumes_sizes() fetches Docker volume sizes
- Frontend: sortable Volumes column with human-friendly display (GB/MB)
- Badge now shows "N users (x active, y idle, z offline)"
- CSS: .col-volumes class (8em width)
2026-01-21 08:45:27 +01:00
stellarshenson
a118bb6d7f fix: remove CPU/Memory color coding in activity monitor
Threshold-based coloring (green/yellow/red) doesn't work for
multi-core systems where CPU usage can exceed 100% (e.g., 6400%
on 64-core machines). Now displays plain text values.
2026-01-21 08:37:29 +01:00
stellarshenson
b80f10a36c updated with new version 2026-01-20 21:41:30 +01:00
stellarshenson
3ab2106c37 style: adjust activity table column widths for better proportions
- CPU: 7.5em, Memory: 9em, Time Left: 12em
- Last Active: 13.5em, Activity: 20em
- User column takes remaining space
- table-layout: fixed with 100% width
2026-01-20 21:35:24 +01:00
stellarshenson
d691390549 feat: show all users in activity monitor and refactor table styles
- Activity Monitor now shows all users with historical activity, not just active servers
- Badge changed from "X active servers" to "X users (Y active)" format
- Status column now sortable (green > amber > red priority)
- Default sort changed to status descending with secondary sort by username
- Moved inline table styles to CSS classes using em units
- Added .activity-table, .settings-table, .notifications-table classes
- Simplified Activity page subtitle
2026-01-20 21:26:24 +01:00
stellarshenson
094be29d6d feat: add column sorting and improved last active display
- Add clickable column sorting for User, CPU, Memory, Time Left, Last Active
- Sorting cycles: descending -> ascending -> none (default)
- Sort icons show current direction
- Last Active now shows full words ("8 minutes ago", "4 months ago")
- Proper singular/plural handling for time units
2026-01-20 20:33:23 +01:00
stellarshenson
c1cabde01c fix: hide 'Measured' text when time empty, simplify settings text
- Only show "Measured X ago" when timeAgo has value
- Remove compose.yml/compose_override.yml mention from Settings page
2026-01-20 19:34:08 +01:00
stellarshenson
04ef42ce41 refactor: remove sample interval, simplify activity sampling
- Remove JUPYTERHUB_ACTIVITYMON_SAMPLE_INTERVAL env var entirely
- Remove on-demand sampling from activity page view
- Simplify record_sample() to always insert (caller controls frequency)
- Fix formatTimeAgo to show nothing when time ≤0s
- Update Dockerfile, settings_dictionary.yml, custom_handlers.py
2026-01-20 19:29:26 +01:00
stellarshenson
4b2fc084bf fix: use separate SQLite database for activity monitor
- ActivityMonitor now uses /data/activity_samples.sqlite instead of
  JupyterHub's main database to avoid SQLite locking conflicts
- Fixes "database is locked" errors that prevented login when both
  JupyterHub and ActivityMonitor wrote simultaneously
- Added "Last Active" column to activity table showing relative time
2026-01-20 19:04:39 +01:00
stellarshenson
d793f5a68d updated 2026-01-20 17:49:45 +01:00
stellarshenson
aecd6821c7 fix: update last sample on refresh instead of inserting new one 2026-01-20 17:21:15 +01:00
stellarshenson
a0dee35bd6 fix: add spinner to refresh button and show relative time 2026-01-20 17:16:00 +01:00
stellarshenson
5e563af39b feat: add Activity Monitor admin page with 3-state status and reset functionality
- Add ActivitySample SQLAlchemy model for database persistence
- Add ActivityMonitor singleton with scoring, reset, lifecycle methods
- Add JUPYTERHUB_ACTIVITYMON_INACTIVE_AFTER env var (default 60 min)
- Update defaults: SAMPLE_INTERVAL=600s, RETENTION_DAYS=7
- Fix score calculation to use measured samples only (not theoretical max)
- Add 3-state status: green (active), yellow (inactive), red (offline)
- Add recently_active field in API response
- Add Reset button with confirmation dialog
- Fix green color (explicit #28a745 instead of text-success)
- Add ThreadPoolExecutor for non-blocking Docker stats
- Remove old background sampler code (on-demand sampling now)
- Bump version to 3.7.0
2026-01-20 17:08:23 +01:00
stellarshenson
30f3000ab7 chore: bump version to 3.6.24 2026-01-20 10:08:03 +01:00
stellarshenson
d2ff63b2e1 fix: use spawner.orm_spawner.last_activity (Server object has no last_activity) 2026-01-20 10:05:53 +01:00
stellarshenson
a5fd82b3ea updated version 2026-01-19 08:06:52 +01:00
stellarshenson
d492232802 updated version 2026-01-18 21:48:00 +01:00
stellarshenson
7c9d78d4a5 updated version 2026-01-18 21:24:32 +01:00
stellarshenson
3264c26d6b fix: keep extend button enabled when max reached (backend handles rejection) 2026-01-18 21:22:44 +01:00
stellarshenson
6762a5739a fix: truncate excess extension hours instead of rejecting request
- Truncate requested hours to max available instead of returning error
- Add 'truncated' flag in API response with detailed message
- UI shows warning alert (yellow) when truncated, success (green) otherwise
- Warning displays 4 seconds vs 2 seconds for normal success
- Fixed extend button re-enable after successful extension
2026-01-18 21:18:47 +01:00
stellarshenson
42180502e7 fix: extension now ADDS hours (cumulative), added detailed logging 2026-01-18 21:11:34 +01:00
stellarshenson
de3863ef5e fix: use offset-naive datetime for last_activity to match JupyterHub internal format 2026-01-18 21:01:28 +01:00
stellarshenson
1d5fb93c49 feat: improve session extension UI with numeric input and idle note 2026-01-18 20:56:58 +01:00
stellarshenson
e0ceed8004 feat: add idle culler session extension and harmonize env settings
Session Extension Feature:
- Add JUPYTERHUB_IDLE_CULLER_MAX_EXTENSION env var (default 24h)
- Add SessionInfoHandler and ExtendSessionHandler API endpoints
- Add Session Status card to home page with countdown timer
- Extension tracking in spawner state (resets on server restart)
- Color-coded warnings (yellow <1h, red <30min)

Environment Settings Harmonization:
- Add all ENV defaults to Dockerfile
- Add idle culler settings to compose.yml
- Standardize logo as JUPYTERHUB_LOGO_URI with file:// prefix
- Update NVIDIA_IMAGE to nvidia/cuda:13.0.2-base-ubuntu24.04
2026-01-18 20:28:33 +01:00
stellarshenson
7cd56fe2d6 fix: fixed issue with the gpustat not showing in the prompt 2026-01-16 11:38:58 +01:00
stellarshenson
35955c9671 fix: add server_version to global template_vars
HomeHandler doesn't pass server_version to templates (only AdminHandler does).
Added jupyterhub.__version__ to c.JupyterHub.template_vars for global access.
2026-01-14 17:35:18 +01:00
stellarshenson
940ac7e0d9 feat: add version footer to home page
Display Stellars JupyterHub DS and JupyterHub versions in footer.
Uses short version format (major.minor.patch) only.
2026-01-14 17:30:40 +01:00
stellarshenson
6a1ac93d1f updated project version 2026-01-14 17:13:04 +01:00
stellarshenson
f7770d5e3a updated project version 2026-01-14 16:53:42 +01:00
stellarshenson
022e970dbf feat: standardize env vars with JUPYTERHUB_ prefix, add admin settings page
- Rename 13 environment variables to use JUPYTERHUB_ prefix:
  - ENABLE_GPU_SUPPORT -> JUPYTERHUB_GPU_ENABLED
  - ENABLE_JUPYTERHUB_SSL -> JUPYTERHUB_SSL_ENABLED
  - ENABLE_SERVICE_* -> JUPYTERHUB_SERVICE_*
  - ENABLE_SIGNUP -> JUPYTERHUB_SIGNUP_ENABLED
  - DOCKER_NOTEBOOK_IMAGE -> JUPYTERHUB_NOTEBOOK_IMAGE
  - DOCKER_NETWORK_NAME -> JUPYTERHUB_NETWORK_NAME
  - NVIDIA_AUTODETECT_IMAGE -> JUPYTERHUB_NVIDIA_IMAGE
  - IDLE_CULLER_* -> JUPYTERHUB_IDLE_CULLER_*
- Add SettingsPageHandler with admin-only access at /settings
- Add Settings link to admin navbar
- Sync templates from templates_enhanced to templates
- Update README.md and CLAUDE.md documentation
- No backward compatibility for old variable names
2026-01-14 16:39:34 +01:00
stellarshenson
4b6ac08ab0 feat: idle server culler for automatic shutdown of inactive servers
- Add jupyterhub-idle-culler package to Dockerfile
- Configure as managed JupyterHub service with role-based scopes
- Environment variables: IDLE_CULLER_ENABLED, IDLE_CULLER_TIMEOUT,
  IDLE_CULLER_CULL_EVERY, IDLE_CULLER_MAX_AGE
- Default: disabled, 24h timeout, 10min check interval
- Bump version to 3.6.0
2026-01-14 16:15:21 +01:00
stellarshenson
cd9c6bf7fa feat: selective notification recipients
Add ability to send notifications to selected servers instead of all.
- New ActiveServersHandler at GET /api/notifications/active-servers
- BroadcastNotificationHandler accepts optional recipients array
- UI with "Send to all" checkbox and server selection list
- Select All/Deselect All buttons, dynamic button text
- Backward compatible - sends to all if recipients not specified
2026-01-14 12:46:49 +01:00
stellarshenson
f5874b1e94 docs: add new user credentials screenshot and improve branding section 2026-01-08 14:37:37 +01:00
stellarshenson
ad789d7632 fix: lowercase hex encoding for docker volume names 2026-01-08 14:24:06 +01:00
stellarshenson
36933afe2b chore: further enhanced display of logo 2026-01-07 03:05:16 +01:00
stellarshenson
a6686ab4a2 feat: custom logo support and authorization handler fix
- Add JUPYTERHUB_LOGO_FILE config for custom logo (served at /hub/logo)
- Fix CustomAuthorizationAreaHandler with @needs_scope decorator
- Import orm inside get() method to fix NameError
- Simplify page.html logo block (always use base_url/logo)
2026-01-07 01:44:54 +01:00
stellarshenson
8be73942da feat: server-side authorization discard button protection
- Add StellarsNativeAuthenticator subclass with CustomAuthorizationAreaHandler
- Pass hub_usernames set to template for Jinja2 conditional logic
- Remove JavaScript API call approach (was clunky with XSRF token handling)
- Fix Bootstrap 5 table hover color override (target td/th explicitly)
2026-01-07 01:16:52 +01:00
stellarshenson
8a420cbb63 feat: document mnemonic passwords and fix table hover styling 2026-01-07 00:44:00 +01:00