Experiment Overview
-
Phase {` ${phaseIndex + 1}`}
+
+ {isFinished ? (
+ Experiment finished
+ ) : (
+ <>
+ Phase {phaseIndex + 1}: {phaseNames[phaseIndex]}
+ >
+ )}
+
- {phaseIds.map((id, index) => (
-
- {index + 1}
-
- ))}
+ {phaseIds.map((id, index) => {
+ // Determine the status of the phase indicator
+ let phaseStatusClass = "";
+
+ if (isFinished) {
+ // If the whole experiment is done, all squares are green (completed)
+ phaseStatusClass = styles.completed;
+ } else if (index < phaseIndex) {
+ // Past phases
+ phaseStatusClass = styles.completed;
+ } else if (index === phaseIndex) {
+ // The current phase being worked on
+ phaseStatusClass = styles.current;
+ }
+
+ return (
+
+ {index + 1}
+
+ );
+ })}
@@ -314,7 +349,7 @@ const MonitoringPage: React.FC = () => {
) : (
<>
-