Dev (#2329)
* refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * refactor(chalice): return dashboard's owner email
This commit is contained in:
parent
a2a721673d
commit
f7e72c0f83
3 changed files with 10 additions and 3 deletions
|
|
@ -524,7 +524,8 @@ def search_all(project_id, user_id, data: schemas.SearchCardsSchema, include_ser
|
|||
|
||||
def get_all(project_id, user_id):
|
||||
default_search = schemas.SearchCardsSchema()
|
||||
result = rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
|
||||
result = []
|
||||
rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
|
||||
while len(rows) == default_search.limit:
|
||||
default_search.page += 1
|
||||
rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
|
||||
|
|
|
|||
|
|
@ -34,8 +34,13 @@ def create_dashboard(project_id, user_id, data: schemas.CreateDashboardSchema):
|
|||
|
||||
def get_dashboards(project_id, user_id):
|
||||
with pg_client.PostgresClient() as cur:
|
||||
pg_query = f"""SELECT *
|
||||
pg_query = f"""SELECT *, owner_email
|
||||
FROM dashboards
|
||||
LEFT JOIN LATERAL (SELECT email AS owner_email
|
||||
FROM users
|
||||
WHERE deleted_at ISNULL
|
||||
AND users.user_id = dashboards.user_id
|
||||
) AS owner ON (TRUE)
|
||||
WHERE deleted_at ISNULL
|
||||
AND project_id = %(projectId)s
|
||||
AND (user_id = %(userId)s OR is_public);"""
|
||||
|
|
|
|||
|
|
@ -556,7 +556,8 @@ def search_all(project_id, user_id, data: schemas.SearchCardsSchema, include_ser
|
|||
|
||||
def get_all(project_id, user_id):
|
||||
default_search = schemas.SearchCardsSchema()
|
||||
result = rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
|
||||
result = []
|
||||
rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
|
||||
while len(rows) == default_search.limit:
|
||||
default_search.page += 1
|
||||
rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue