feat(chalice): CH fixed slowest_images widget

This commit is contained in:
Taha Yassine Kraiem 2022-08-25 15:35:25 +01:00
parent 0734a3e468
commit c64a2bed0b
2 changed files with 2 additions and 2 deletions

View file

@ -464,7 +464,7 @@ def get_slowest_images(project_id, startTimestamp=TimeUTC.now(delta_days=-1),
FROM resources {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""}
WHERE {" AND ".join(ch_sub_query)} AND resources.duration>0
GROUP BY resources.url ORDER BY avg DESC LIMIT 10;"""
params = {"project_id": project_id, "startTimestamp": startTimestamp,
params = {"step_size": step_size, "project_id": project_id, "startTimestamp": startTimestamp,
"endTimestamp": endTimestamp, **__get_constraint_values(args)}
rows = ch.execute(query=ch_query, params=params)

View file

@ -474,7 +474,7 @@ def get_slowest_images(project_id, startTimestamp=TimeUTC.now(delta_days=-1),
FROM {sessions_helper.get_main_resources_table(startTimestamp)} AS resources
WHERE {" AND ".join(ch_sub_query)} AND resources.duration>0
GROUP BY resources.url ORDER BY avg DESC LIMIT 10;"""
params = {"project_id": project_id, "startTimestamp": startTimestamp,
params = {"step_size": step_size, "project_id": project_id, "startTimestamp": startTimestamp,
"endTimestamp": endTimestamp, **__get_constraint_values(args)}
rows = ch.execute(query=ch_query, params=params)