Patch/api v1.20.0 (#2610)
* fix(chalice): remove null referrer from table of referrers * fix(chalice): fixed add MSTeams integration with wrong URL * fix(chalice): session's search ignore injected durations
This commit is contained in:
parent
9d0f3b34ae
commit
62ef3ca2dd
4 changed files with 25 additions and 12 deletions
|
|
@ -26,6 +26,7 @@ class MSTeams(BaseCollaboration):
|
|||
|
||||
@classmethod
|
||||
def say_hello(cls, url):
|
||||
try:
|
||||
r = requests.post(
|
||||
url=url,
|
||||
json={
|
||||
|
|
@ -33,11 +34,16 @@ class MSTeams(BaseCollaboration):
|
|||
"@context": "https://schema.org/extensions",
|
||||
"summary": "Welcome to OpenReplay",
|
||||
"title": "Welcome to OpenReplay"
|
||||
})
|
||||
},
|
||||
timeout=3)
|
||||
if r.status_code != 200:
|
||||
logger.warning("MSTeams integration failed")
|
||||
logger.warning(r.text)
|
||||
return False
|
||||
except Exception as e:
|
||||
logger.warning("!!! MSTeams integration failed")
|
||||
logger.exception(e)
|
||||
return False
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -336,10 +336,13 @@ def search2_table(data: schemas.SessionsSearchPayloadSchema, project_id: int, de
|
|||
if v not in extra_conditions[e.operator].value:
|
||||
extra_conditions[e.operator].value.append(v)
|
||||
extra_conditions = list(extra_conditions.values())
|
||||
|
||||
elif metric_of == schemas.MetricOfTable.ISSUES and len(metric_value) > 0:
|
||||
data.filters.append(schemas.SessionSearchFilterSchema(value=metric_value, type=schemas.FilterType.ISSUE,
|
||||
operator=schemas.SearchEventOperator.IS))
|
||||
elif metric_of == schemas.MetricOfTable.REFERRER:
|
||||
data.filters.append(schemas.SessionSearchFilterSchema(value=metric_value, type=schemas.FilterType.REFERRER,
|
||||
operator=schemas.SearchEventOperator.IS_ANY))
|
||||
|
||||
full_args, query_part = search_query_parts(data=data, error_status=None, errors_only=False,
|
||||
favorite_only=False, issue=None, project_id=project_id,
|
||||
user_id=None, extra_event=extra_event, extra_conditions=extra_conditions)
|
||||
|
|
|
|||
|
|
@ -777,6 +777,9 @@ class SessionsSearchPayloadSchema(_TimedSchema, _PaginatedSchema):
|
|||
for f in values.get("filters", []):
|
||||
vals = []
|
||||
for v in f.get("value", []):
|
||||
if f.get("type", "") == FilterType.DURATION.value \
|
||||
and not v.isnumeric():
|
||||
continue
|
||||
if v is not None:
|
||||
vals.append(v)
|
||||
f["value"] = vals
|
||||
|
|
|
|||
|
|
@ -450,6 +450,7 @@ def search2_table(data: schemas.SessionsSearchPayloadSchema, project_id: int, de
|
|||
elif metric_of == schemas.MetricOfTable.REFERRER:
|
||||
main_col = "referrer"
|
||||
extra_col = ", referrer"
|
||||
extra_where = "WHERE isNotNull(referrer)"
|
||||
elif metric_of == schemas.MetricOfTable.FETCH:
|
||||
main_col = "url_path"
|
||||
extra_col = ", s.url_path"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue