Commit Graph

58 Commits

Author SHA1 Message Date
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
stellarshenson
3607c5cb4c fix: use Bootstrap CSS variable for table hover opacity 2026-01-07 00:21:44 +01:00
stellarshenson
6378b68821 fix: admin panel styling and replace eye emoji with icons 2026-01-06 23:55:02 +01:00
stellarshenson
4094e04a67 fix: further admin panel styling refinements
- Reduce user row hover to nearly invisible (0.003 alpha)
- Fix Add Users button: stock colors in light mode, explicit in dark mode
- Make collapse buttons more compact (0.2rem 0.3rem)
- Add username label left padding
- Update journal
2026-01-06 22:54:24 +01:00
stellarshenson
ddc9cb8382 fix: refine admin panel styling - buttons, hover, spacing
- Fix Add Users button to use stock btn-light colors (size only)
- Disable hover on expanded card tables via box-shadow override
- Add padding:0 to expanded user detail td cells
- Make collapse buttons more compact (0.2rem 0.3rem)
- Add left padding to username labels
- Add groups page styling (list items, card footer)
2026-01-06 22:47:22 +01:00
stellarshenson
c1ae9938c1 feat: comprehensive UI styling for notifications, admin panel, tokens
- Add notifications page styling (form, textarea, results table)
- Unify button font sizes to 0.8rem across all pages
- Set collapsed user card padding to 0
- Add subtle hover effect on admin user rows (0.015 alpha)
- Style Add Users form panel with dark mode support
- Style authorization and token pages consistently
2026-01-06 22:26:19 +01:00
stellarshenson
693ca06405 docs: update journal with recent changes, update version comment 2026-01-06 21:36:17 +01:00
stellarshenson
139fe144fa feat: admin user creation with auto-generated credentials modal
- Add after_insert event listener to auto-create NativeAuth UserInfo
- Generate memorable 3-word passwords for admin-created users
- Auto-approve users created by admin (is_authorized=1)
- Add after_delete listener to clean up UserInfo on user deletion
- Add GetUserCredentialsHandler API for credential retrieval
- Add password cache (5min expiry) for secure credential handoff
- Enhanced admin.html with credentials modal (copy/download)
- Add templates_enhanced directory with customized templates
- Add NativeAuth nav items (Change Password, Authorize Users)
- Bump version to 3.5.8 (manual)
2026-01-06 20:20:05 +01:00
stellarshenson
e001169663 feat: add user rename API and ENABLE_SIGNUP env variable
- RenameUserHandler: PATCH /hub/api/users/{username}/rename
  preserves NativeAuthenticator authorization on rename
- ENABLE_SIGNUP env var controls self-registration (default: 1)
- Updated README, compose.yml, Dockerfile with new config
2026-01-06 16:43:06 +01:00
stellarshenson
30e21709ec updated 2025-12-19 02:21:28 +01:00
stellarshenson
14734c0961 fix: use extra_host_config for privileged container mode
DockerSpawner requires extra_host_config['privileged'] = True instead of
spawner.privileged. Bumped version to 3.4.1.
2025-12-12 16:10:02 +01:00
stellarshenson
d46e0c1c28 chore: bump version to 3.3.4 2025-12-08 17:08:48 +01:00
stellarshenson
65e0f96abd chore: update version comment to reflect 3.3.x features 2025-12-08 17:07:34 +01:00
stellarshenson
6328ffbc65 chore: bump version to 3.3.3 with watchtower fix 2025-12-08 17:06:56 +01:00
stellarshenson
25efd91bb6 docs: clarify GPU detection uses separate container in journal
Updated journal entry #16 to specify nvidia/cuda container spawning.
Version bump: 3.3.2 -> 3.3.3
2025-12-04 19:10:37 +01:00
stellarshenson
dea9e75fbb chore: cleanup startup scripts and bump version to 3.3.2
Removed obsolete 01_nvidia-smi.sh (GPU detection handled in jupyterhub_config.py).
Renamed 02_ensure_groups.py to 01_ensure_groups.py for sequential ordering.
2025-12-04 19:01:11 +01:00
stellarshenson
9357d8bdd6 chore: update watchtower to maintained fork (nickfedor/watchtower)
Changed from containrrr/watchtower:latest to nickfedor/watchtower:latest.
New image is actively maintained and compatible with latest Docker versions.

Version bump: 3.2.11 -> 3.3.1
2025-11-27 00:00:36 +01:00
stellarshenson
1f0adb7308 release 2025-11-09 23:09:42 +01:00
stellarshenson
bd1b676a2f chore: update project.env for RELEASE_3.2.11
Updated version metadata:
- VERSION_COMMENT reflects key features of v3.2.11
- Added RELEASE_TAG: RELEASE_3.2.11
- Added RELEASE_DATE: 2025-11-09

This marks the official release of version 3.2.11 with configuration-agnostic
volume management, notification broadcast, and privileged access control.
2025-11-09 23:04:20 +01:00
stellarshenson
0e39fac7ac feat: add admin notification broadcast system for active JupyterLab servers
Implemented comprehensive notification broadcast functionality allowing
administrators to send notifications to all active user JupyterLab servers
simultaneously through a dedicated admin panel.

Core Features:
- Admin-only notification panel accessible at /hub/notifications
- Concurrent delivery to all active servers using asyncio with 5s timeout
- Temporary API token generation (5-minute expiry) for authentication
- Support for 6 notification types: default, info, success, warning, error, in-progress
- 140-character message limit with live character counter
- Auto-close toggle and dismiss button in notifications
- Dynamic endpoint URL construction using spawner.server.base_url
- Comprehensive error handling with user-friendly messages
- One-line logging per server with message preview and outcome

Technical Implementation:
- Created BroadcastNotificationHandler in custom_handlers.py
- Created NotificationsPageHandler for admin UI rendering
- Added notifications.html template with Bootstrap 5 form
- Registered handlers in jupyterhub_config.py extra_handlers
- Sends to /jupyterlab-notifications-extension/ingest endpoint
- Payload includes type, message, autoClose, and actions array
- Navigation link added to home.html for admin access

Integration:
- Requires jupyterlab_notifications_extension installed on JupyterLab servers
- Uses correct payload format (type field, not variant)
- Includes Dismiss action button for manual notification closure

Documentation:
- Updated .claude/CLAUDE.md with complete feature documentation
- Updated README.md Features section with notification broadcast details
- Updated .claude/JOURNAL.md with implementation summary
- Removed obsolete FEATURE_PLAN.md

Version: 3.2.0 (bumped from 3.1.2)
2025-11-09 22:05:06 +01:00
stellarshenson
067b613397 feat: add group-based docker.sock access control for privileged users
Implemented built-in protected group system enabling admins to grant trusted users read-write Docker socket access within their JupyterLab containers. Groups are managed through admin panel and cannot be permanently deleted.
2025-11-05 20:15:30 +01:00
stellarshenson
f126571fb2 docs: update journal with production readiness work
- Document visual enhancements with Font Awesome icons
- Note GitHub Actions CI/CD implementation
- Record architecture diagram addition to README
- Document critical custom_handlers import fix
- Note built-in config feature
- Record git history cleanup (removed co-authoring)
- Version progression 3.0.20 -> 3.0.23
2025-11-04 23:33:49 +01:00
stellarshenson
09e69e9467 fix: prevent Docker Compose from pulling image after build
- Add pull_policy: build to jupyterhub service
- Forces Docker Compose to use locally built image
- Prevents unnecessary pulls from Docker Hub after building

Now 'docker compose up' will use the local image built with 'make build'
2025-11-04 23:30:22 +01:00
stellarshenson
db483de36d feat: build jupyterhub_config.py into Docker image by default
- Change Docker build context from services/jupyterhub to project root
- Copy config/jupyterhub_config.py into image at /srv/jupyterhub/jupyterhub_config.py
- Users can still override with volume mount if needed
- Update all COPY paths in Dockerfile to reflect new build context
- Enables container to work out-of-the-box without external config file

Benefits:
- Image is self-contained and ready to run without dependencies
- Volume mount remains optional for custom configurations
- Default config includes GPU auto-detection and self-service features
2025-11-04 23:25:17 +01:00