Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboard): filter by date test panels #1359

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/evidently/ui/storage/local/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,14 @@ async def load_test_results(
) -> TestResultPoints:
points: Dict[datetime.datetime, Dict[Test, TestInfo]] = defaultdict(dict)
for report in (s.as_test_suite() for s in self.state.snapshot_data[project_id].values() if not s.is_report):
if not filter.filter(report):
continue
if not isinstance(report, TestSuite):
if not (
filter.filter(report)
and isinstance(report, TestSuite)
and (timestamp_start is None or report.timestamp >= timestamp_start)
and (timestamp_end is None or report.timestamp < timestamp_end)
):
continue

ts = to_period(time_agg, report.timestamp)
if test_filters:
for test_filter in test_filters:
Expand Down
Loading