Api v1.15.0 (#1629)
* fix(chalice): fixed add MSTeams fix(chalice): fixed update MSTeams fix(chalice): fixed add Slack fix(chalice): fixed update Slack * fix(chalice): removed mobs from ios replay
This commit is contained in:
parent
5146c4cfdc
commit
2bb0f3e74f
13 changed files with 11 additions and 29 deletions
|
|
@ -17,7 +17,7 @@ class MSTeams(BaseCollaboration):
|
|||
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"name already exists.")
|
||||
if cls.say_hello(data.url):
|
||||
return webhook.add(tenant_id=tenant_id,
|
||||
endpoint=data.url,
|
||||
endpoint=data.url.unicode_string(),
|
||||
webhook_type=schemas.WebhookType.msteams,
|
||||
name=data.name)
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class Slack(BaseCollaboration):
|
|||
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"name already exists.")
|
||||
if cls.say_hello(data.url):
|
||||
return webhook.add(tenant_id=tenant_id,
|
||||
endpoint=data.url,
|
||||
endpoint=data.url.unicode_string(),
|
||||
webhook_type=schemas.WebhookType.slack,
|
||||
name=data.name)
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -54,19 +54,6 @@ def get_urls_depercated(session_id, check_existence: bool = True):
|
|||
return results
|
||||
|
||||
|
||||
def get_ios(session_id, project_id, check_existence=False):
|
||||
results = []
|
||||
for k in __get_mob_keys(project_id=project_id, session_id=session_id):
|
||||
if check_existence and not StorageClient.exists(bucket=config("IOS_BUCKET"), key=k):
|
||||
continue
|
||||
results.append(StorageClient.get_presigned_url_for_sharing(
|
||||
bucket=config("IOS_BUCKET"),
|
||||
expires_in=config("PRESIGNED_URL_EXPIRATION", cast=int, default=900),
|
||||
key=k
|
||||
))
|
||||
return results
|
||||
|
||||
|
||||
def get_ios_videos(session_id, project_id, check_existence=False):
|
||||
results = []
|
||||
for k in __get_ios_video_keys(project_id=project_id, session_id=session_id):
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ def get_by_id2_pg(project_id, session_id, context: schemas.CurrentContext, full_
|
|||
data['crashes'] = events_ios.get_crashes_by_session_id(session_id=session_id)
|
||||
data['userEvents'] = events_ios.get_customs_by_session_id(project_id=project_id,
|
||||
session_id=session_id)
|
||||
data['mobsUrl'] = sessions_mobs.get_ios(session_id=session_id, project_id=project_id)
|
||||
data['mobsUrl'] = []
|
||||
else:
|
||||
data['events'] = events.get_by_session_id(project_id=project_id, session_id=session_id,
|
||||
group_clickrage=True)
|
||||
|
|
@ -122,8 +122,7 @@ def get_replay(project_id, session_id, context: schemas.CurrentContext, full_dat
|
|||
data = helper.dict_to_camel_case(data)
|
||||
if full_data:
|
||||
if data["platform"] == 'ios':
|
||||
data['domURL'] = sessions_mobs.get_ios(session_id=session_id, project_id=project_id,
|
||||
check_existence=False)
|
||||
data['domURL'] = []
|
||||
data['videoURL'] = sessions_mobs.get_ios_videos(session_id=session_id, project_id=project_id,
|
||||
check_existence=False)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -58,6 +58,5 @@ ASSIST_JWT_SECRET=
|
|||
PYTHONUNBUFFERED=1
|
||||
REDIS_STRING=redis://redis-master.db.svc.cluster.local:6379
|
||||
SCH_DELETE_DAYS=30
|
||||
IOS_BUCKET=mobs
|
||||
IOS_VIDEO_BUCKET=mobs
|
||||
TZ=UTC
|
||||
|
|
@ -62,6 +62,5 @@ TZ=UTC
|
|||
docs_url=/docs
|
||||
root_path=''
|
||||
docs_url=/docs
|
||||
IOS_BUCKET=mobs
|
||||
IOS_VIDEO_BUCKET=mobs
|
||||
SESSION_IOS_VIDEO_PATTERN=%(sessionId)s/replay.mp4
|
||||
|
|
@ -825,7 +825,7 @@ def edit_msteams_integration(webhookId: int, data: schemas.EditCollaborationSche
|
|||
"We couldn't send you a test message on your Microsoft Teams channel. Please verify your webhook url."]
|
||||
}
|
||||
return {"data": webhook.update(tenant_id=context.tenant_id, webhook_id=webhookId,
|
||||
changes={"name": data.name, "endpoint": data.url})}
|
||||
changes={"name": data.name, "endpoint": data.url.unicode_string()})}
|
||||
|
||||
|
||||
@app.delete('/integrations/msteams/{webhookId}', tags=["integrations"])
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ def edit_slack_integration(integrationId: int, data: schemas.EditCollaborationSc
|
|||
"We couldn't send you a test message on your Slack channel. Please verify your webhook url."]
|
||||
}
|
||||
return {"data": webhook.update(tenant_id=context.tenant_id, webhook_id=integrationId,
|
||||
changes={"name": data.name, "endpoint": data.url})}
|
||||
changes={"name": data.name, "endpoint": data.url.unicode_string()})}
|
||||
|
||||
|
||||
@app.post('/client/members', tags=["client"], dependencies=[OR_role("owner", "admin")])
|
||||
|
|
|
|||
|
|
@ -17,10 +17,11 @@ python-decouple = "==3.8"
|
|||
apscheduler = "==3.10.4"
|
||||
python-multipart = "==0.0.6"
|
||||
redis = "==5.0.1"
|
||||
azure-storage-blob = "==12.18.3"
|
||||
uvicorn = {extras = ["standard"], version = "==0.23.2"}
|
||||
pydantic = {extras = ["email"], version = "==2.3.0"}
|
||||
clickhouse-driver = {extras = ["lz4"], version = "==0.2.6"}
|
||||
python3-saml = "==1.16.0"
|
||||
azure-storage-blob = "==12.18.3"
|
||||
|
||||
[dev-packages]
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ def get_by_id2_pg(project_id, session_id, context: schemas.CurrentContext, full_
|
|||
data['crashes'] = events_ios.get_crashes_by_session_id(session_id=session_id)
|
||||
data['userEvents'] = events_ios.get_customs_by_sessionId(project_id=project_id,
|
||||
session_id=session_id)
|
||||
data['mobsUrl'] = sessions_mobs.get_ios(session_id=session_id)
|
||||
data['mobsUrl'] = []
|
||||
else:
|
||||
data['events'] = events.get_by_session_id(project_id=project_id, session_id=session_id,
|
||||
group_clickrage=True)
|
||||
|
|
@ -130,8 +130,7 @@ def get_replay(project_id, session_id, context: schemas.CurrentContext, full_dat
|
|||
data = helper.dict_to_camel_case(data)
|
||||
if full_data:
|
||||
if data["platform"] == 'ios':
|
||||
data['mobsUrl'] = sessions_mobs.get_ios(session_id=session_id, project_id=project_id,
|
||||
check_existence=False)
|
||||
data['mobsUrl'] = []
|
||||
data['videoURL'] = sessions_mobs.get_ios_videos(session_id=session_id, project_id=project_id,
|
||||
check_existence=False)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -78,5 +78,4 @@ KAFKA_USE_SSL=false
|
|||
SCH_DELETE_DAYS=30
|
||||
TZ=UTC
|
||||
CH_COMPRESSION=true
|
||||
IOS_BUCKET=mobs
|
||||
IOS_VIDEO_BUCKET=mobs
|
||||
|
|
@ -79,6 +79,5 @@ TZ=UTC
|
|||
docs_url=/docs
|
||||
root_path=''
|
||||
docs_url=/docs
|
||||
IOS_BUCKET=mobs
|
||||
IOS_VIDEO_BUCKET=mobs
|
||||
SESSION_IOS_VIDEO_PATTERN=%(sessionId)s/replay.mp4
|
||||
|
|
@ -153,7 +153,7 @@ def edit_slack_integration(integrationId: int, data: schemas.EditCollaborationSc
|
|||
"We couldn't send you a test message on your Slack channel. Please verify your webhook url."]
|
||||
}
|
||||
return {"data": webhook.update(tenant_id=context.tenant_id, webhook_id=integrationId,
|
||||
changes={"name": data.name, "endpoint": data.url})}
|
||||
changes={"name": data.name, "endpoint": data.url.unicode_string()})}
|
||||
|
||||
|
||||
@app.post('/client/members', tags=["client"], dependencies=[OR_role("owner", "admin")])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue