From de22d6769126152c3179df37bbec6a62c32fdf8a Mon Sep 17 00:00:00 2001 From: jean-baptiste-perez-bib Date: Thu, 5 Dec 2024 15:51:30 +0100 Subject: [PATCH] WIP Allow showing processing timeline events For now, there is no setting to switch with previous behaviour. --- timesketch/api/v1/resources/aggregation.py | 2 +- timesketch/lib/utils.py | 2 +- timesketch/models/sketch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/timesketch/api/v1/resources/aggregation.py b/timesketch/api/v1/resources/aggregation.py index 1b25827e34..de3d13064a 100644 --- a/timesketch/api/v1/resources/aggregation.py +++ b/timesketch/api/v1/resources/aggregation.py @@ -468,7 +468,7 @@ def post(self, sketch_id): sketch_indices = { t.searchindex.index_name for t in sketch.timelines - if t.get_status.status.lower() == "ready" + if t.get_status.status.lower() in ["ready", "processing"] } aggregation_dsl = form.aggregation_dsl.data diff --git a/timesketch/lib/utils.py b/timesketch/lib/utils.py index eb7d00453b..5f937304c9 100644 --- a/timesketch/lib/utils.py +++ b/timesketch/lib/utils.py @@ -540,7 +540,7 @@ def get_validated_indices(indices, sketch): """ sketch_structure = {} for timeline in sketch.timelines: - if timeline.get_status.status.lower() != "ready": + if timeline.get_status.status.lower() not in ["ready", "processing"]: continue index_ = timeline.searchindex.index_name sketch_structure.setdefault(index_, []) diff --git a/timesketch/models/sketch.py b/timesketch/models/sketch.py index cda99d7bf0..4f1632308f 100644 --- a/timesketch/models/sketch.py +++ b/timesketch/models/sketch.py @@ -144,7 +144,7 @@ def active_timelines(self): for timeline in self.timelines: timeline_status = timeline.get_status.status index_status = timeline.searchindex.get_status.status - if (timeline_status or index_status) in ("processing", "fail", "archived"): + if (timeline_status or index_status) in ("fail", "archived"): continue _timelines.append(timeline) return _timelines