From fa4b59ef946e5fc1fc52c17e46808f19f06abb30 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Thu, 9 Nov 2023 19:08:13 +0100 Subject: [PATCH] Api v1.15.0 (#1638) * fix(chalice): fixed path-analysis's density support * fix(chalice): fixed path-analysis's sessions drill-down * fix(chalice): path-analysis allow issues when no-path is selected --------- Co-authored-by: Alexander Co-authored-by: Shekar Siri Co-authored-by: nick-delirium --- api/chalicelib/core/custom_metrics.py | 5 ++--- ee/api/chalicelib/core/custom_metrics.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/api/chalicelib/core/custom_metrics.py b/api/chalicelib/core/custom_metrics.py index c1704f7a9..ed513d739 100644 --- a/api/chalicelib/core/custom_metrics.py +++ b/api/chalicelib/core/custom_metrics.py @@ -255,6 +255,8 @@ def get_sessions(project_id, user_id, data: schemas.CardSessionsSchema): for s in data.series: if len(data.filters) > 0: s.filter.filters += data.filters + s.filter = schemas.SessionsSearchPayloadSchema(**s.filter.model_dump(by_alias=True)) + results.append({"seriesId": None, "seriesName": s.name, **sessions.search_sessions(data=s.filter, project_id=project_id, user_id=user_id)}) @@ -285,9 +287,6 @@ def __get_path_analysis_issues(project_id: int, user_id: int, data: schemas.Card filters=filters ) - if len(search_data.events) == 0: - return {"data": {}} - for s in data.excludes: search_data.filters.append(schemas.SessionSearchEventSchema2(type=s.type, operator=schemas.SearchEventOperator._not_on, diff --git a/ee/api/chalicelib/core/custom_metrics.py b/ee/api/chalicelib/core/custom_metrics.py index 946a525f3..c1dc52ad7 100644 --- a/ee/api/chalicelib/core/custom_metrics.py +++ b/ee/api/chalicelib/core/custom_metrics.py @@ -275,6 +275,8 @@ def get_sessions(project_id, user_id, data: schemas.CardSessionsSchema): for s in data.series: if len(data.filters) > 0: s.filter.filters += data.filters + s.filter = schemas.SessionsSearchPayloadSchema(**s.filter.model_dump(by_alias=True)) + results.append({"seriesId": None, "seriesName": s.name, **sessions.search_sessions(data=s.filter, project_id=project_id, user_id=user_id)}) @@ -305,9 +307,6 @@ def __get_path_analysis_issues(project_id: int, user_id: int, data: schemas.Card filters=filters ) - if len(search_data.events) == 0: - return {"data": {}} - for s in data.excludes: search_data.filters.append(schemas.SessionSearchEventSchema2(type=s.type, operator=schemas.SearchEventOperator._not_on,