fix: activity bar colors 1=red, 2-3=yellow, 4-5=green

This commit is contained in:
stellarshenson
2026-01-21 16:50:36 +01:00
parent e94680178c
commit a2b7a0249a
2 changed files with 5 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ PROJECT_NAME="stellars-jupyterhub-ds"
PROJECT_DESCRIPTION="Multi-user JupyterHub 4 deployment platform with data science stack, GPU auto-detection, NativeAuthenticator, and isolated per-user environments spawned via DockerSpawner"
# Version
VERSION="3.7.14_cuda-13.0.2_jh-5.4.2"
VERSION="3.7.13_cuda-13.0.2_jh-5.4.2"
VERSION_COMMENT="Activity Monitor: admin page with 3-state status, activity scoring, reset functionality"
RELEASE_TAG="RELEASE_3.2.11"
RELEASE_DATE="2025-11-09"

View File

@@ -358,14 +358,14 @@ require(["jquery"], function($) {
var litSegments = Math.ceil(score / 20); // 0-20=1, 21-40=2, 41-60=3, 61-80=4, 81-100=5
if (score === 0) litSegments = 0;
// Color based on score
// Color based on lit segments: 1=red, 2-3=yellow, 4-5=green
var segmentColor;
if (litSegments >= 4) {
segmentColor = '#28a745'; // Green - high activity
segmentColor = '#28a745'; // Green - high activity (4-5)
} else if (litSegments >= 2) {
segmentColor = '#ffc107'; // Yellow - medium activity
segmentColor = '#ffc107'; // Yellow - medium activity (2-3)
} else {
segmentColor = '#dc3545'; // Red - low activity
segmentColor = '#dc3545'; // Red - low activity (1)
}
// Thin continuous bar with dividers