* feat(api): usability testing (#1686) * feat(api): usability testing - wip * feat(db): usabiity testing * feat(api): usability testing - api * feat(api): usability testing - api * feat(api): usability testing - db change * feat(api): usability testing - db change * feat(api): usability testing - unit tests update * feat(api): usability testing - test and tasks stats * feat(api): usability testing - sessions list fix, return zeros if test id is not having signals * Api v1.16.0 (#1698) * feat: canvas support [assist] (#1641) * feat(tracker/ui): start canvas support * feat(tracker): slpeer -> peerjs for canvas streams * fix(ui): fix agent canvas peer id * fix(ui): fix agent canvas peer id * fix(ui): fix peer removal * feat(tracker): canvas recorder * feat(tracker): canvas recorder * feat(tracker): canvas recorder * feat(tracker): canvas recorder * feat(ui): canvas support for ui * fix(tracker): fix falling tests * feat(ui): replay canvas in video * feat(ui): refactor video streaming to draw on canvas * feat(ui): 10hz check for canvas replay * feat(ui): fix for tests * feat(ui): fix for tests * feat(ui): fix for tests * feat(ui): fix for tests cov * feat(ui): mroe test coverage * fix(ui): styling * fix(tracker): support backend settings for canvas * feat(ui): allow devtools to be resizeable (#1605) * fix(ui): console redux tab null check * Api v1.15.0 (#1689) * fix(chalice): fix create alert with MS Teams notification channel closes openreplay/openreplay#1677 * fix(chalice): fix MS Teams notifications * refactor(chalice): enhanced MS Teams notifications closes openreplay/openreplay#1681 (cherry picked from commit265897f509) * fix(ui): filter keys conflcit with metadata, path analysis 4 col * fix(ui): clear the filers and series on card type change * fix(player): fix msg reader bug * fix(DB): fix CH wrong version (#1692) (cherry picked from commit48dbbb55db) * fix(ui): filter keys conflcit with metadata * fix(tracker): unique broadcast channel name * fix(chalice): fixed delete cards (#1697) (cherry picked from commit92fedd310c) * fix(tracker): add trycatch to ignore iframe errors * feat(backend): added ARM arch support to backend services [Dockerfile] * feat(backend): removed userAgent from sessions and unstarted-sessions tables * fix(DB): change path-analysis card size --------- Co-authored-by: Delirium <nikita@openreplay.com> Co-authored-by: Shekar Siri <sshekarsiri@gmail.com> Co-authored-by: Alexander <zavorotynskiy@pm.me> * refactor(chalice): cleaned code (#1699) * feat(api): usability testing - added start_path to the resposne, remove count from the list * feat(api): usability testing - test to have response count and live count * feat(api): usability testing - test to have additional data * Revert "refactor(chalice): cleaned code (#1699)" (#1702) This reverts commit83f2b0c12c. * feat(api): usability testing - responses with total and other improvements * change(api): vulnerability whitelist udpate * feat(api): usability testing - create added missing columns, and sessions with user_id search * feat(api): usability testing - update test with responseCount * feat(api): usability testing - timestamps in unix * feat(api): usability testing - request with proper case change * feat(api): usability testing - task.description nullable * feat(api): usability testing - check deleted status * Api v1.16.0 (#1707) * fix(chalice): fixed search sessions * fix(chalice): fixed search sessions * refactor(chalice): upgraded dependencies * refactor(crons): upgraded dependencies * refactor(alerts): upgraded dependencies * Api v1.16.0 (#1712) * feat(DB): user-testing support * feat(chalice): user testing support * feat(chalice): support utxVideo (#1726) * feat(chalice): changed bucket name for ux testing webcamera videos --------- Co-authored-by: Shekar Siri <sshekarsiri@gmail.com> Co-authored-by: Kraiem Taha Yassine <tahayk2@gmail.com> Co-authored-by: Delirium <nikita@openreplay.com> Co-authored-by: Alexander <zavorotynskiy@pm.me>
42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
from chalicelib.utils import pg_client, helper
|
|
from chalicelib.utils.storage import StorageClient
|
|
from decouple import config
|
|
|
|
|
|
def get_test_signals(session_id, project_id):
|
|
with pg_client.PostgresClient() as cur:
|
|
cur.execute(cur.mogrify("""\
|
|
SELECT *
|
|
FROM public.ut_tests_signals
|
|
LEFT JOIN public.ut_tests_tasks USING (task_id)
|
|
WHERE session_id = %(session_id)s
|
|
ORDER BY timestamp;""",
|
|
{"project_id": project_id, "session_id": session_id})
|
|
)
|
|
rows = cur.fetchall()
|
|
return helper.dict_to_camel_case(rows)
|
|
|
|
|
|
def has_test_signals(session_id, project_id):
|
|
with pg_client.PostgresClient() as cur:
|
|
cur.execute(cur.mogrify("""\
|
|
SELECT EXISTS(SELECT 1 FROM public.ut_tests_signals
|
|
WHERE session_id = %(session_id)s) AS has;""",
|
|
{"project_id": project_id, "session_id": session_id})
|
|
)
|
|
row = cur.fetchone()
|
|
return row.get("has")
|
|
|
|
|
|
def get_ux_webcam_signed_url(session_id, project_id, check_existence: bool = True):
|
|
results = []
|
|
bucket_name = "uxtesting-records" # config("sessions_bucket")
|
|
k = f'{session_id}/ux_webcam_record.webm'
|
|
if check_existence and not StorageClient.exists(bucket=bucket_name, key=k):
|
|
return []
|
|
results.append(StorageClient.get_presigned_url_for_sharing(
|
|
bucket=bucket_name,
|
|
expires_in=100000,
|
|
key=k
|
|
))
|
|
return results
|