Skip to content

Commit

Permalink
[frontend] Adding some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimfacion committed Sep 3, 2024
1 parent 6bc5055 commit 44e6cfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openbas-front/src/components/ChainedTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const ChainedTimelineFlow: FunctionComponent<Props> = ({ injects, exerciseOrScen

let startDate: string | undefined;

// If we have a scenario, we find the startdate using the cron info
if (scenario !== undefined) {
const parsedCron = scenario.scenario_recurrence ? parseCron(scenario.scenario_recurrence) : null;
startDate = scenario?.scenario_recurrence_start ? scenario?.scenario_recurrence_start : exercise?.exercise_start_date;
Expand All @@ -113,6 +114,7 @@ const ChainedTimelineFlow: FunctionComponent<Props> = ({ injects, exerciseOrScen
: moment(startDate).utc().format();
}
} else if (exercise !== undefined) {
// Otherwise, we're in a simulation and we use the start_date
startDate = exercise.exercise_start_date != null ? exercise.exercise_start_date : undefined;
}

Expand Down

0 comments on commit 44e6cfe

Please sign in to comment.