From b89f382e65e3e83be1289bd36250307640d35c0a Mon Sep 17 00:00:00 2001 From: Anup Cowkur Date: Wed, 11 Sep 2024 19:33:53 +0530 Subject: [PATCH] chore(frontend): fix table column widths and move paginator to top right closes #1167 --- .../dashboard/app/[teamId]/sessions/page.tsx | 12 +++---- .../app/components/exceptions_overview.tsx | 34 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/frontend/dashboard/app/[teamId]/sessions/page.tsx b/frontend/dashboard/app/[teamId]/sessions/page.tsx index d214c3b93..790e30fb6 100644 --- a/frontend/dashboard/app/[teamId]/sessions/page.tsx +++ b/frontend/dashboard/app/[teamId]/sessions/page.tsx @@ -140,29 +140,29 @@ export default function SessionsOverview({ params }: { params: { teamId: string }} />
-
+
Session Id
-
Start Time
-
Duration
+
Start Time
+
Duration
{sessionsOverview.results.map(({ session_id, app_id, first_event_time, duration, matched_free_text, attribute }) => ( -
+

{session_id}

{"v" + attribute.app_version + "(" + attribute.app_build + "), " + attribute.os_name + " " + attribute.os_version + ", " + attribute.device_manufacturer + " " + attribute.device_model}

{matched_free_text !== "" &&

{"Matched " + matched_free_text}

}
-
+

{formatDateToHumanReadableDate(first_event_time)}

{formatDateToHumanReadableTime(first_event_time)}

-
{(duration as unknown as number) === 0 ? 'N/A' : formatMillisToHumanReadable(duration as unknown as number)}
+
{(duration as unknown as number) === 0 ? 'N/A' : formatMillisToHumanReadable(duration as unknown as number)}
))}
diff --git a/frontend/dashboard/app/components/exceptions_overview.tsx b/frontend/dashboard/app/components/exceptions_overview.tsx index 70744211f..e8aea98a2 100644 --- a/frontend/dashboard/app/components/exceptions_overview.tsx +++ b/frontend/dashboard/app/components/exceptions_overview.tsx @@ -123,19 +123,31 @@ export const ExceptionsOverview: React.FC = ({ exceptio startDate={selectedFilters.selectedStartDate} endDate={selectedFilters.selectedEndDate} appVersions={selectedFilters.selectedVersions} /> -
-
+
+
+ { + setPaginationRange({ start: paginationRange.start + paginationOffset, end: paginationRange.end + paginationOffset }) + setPaginationDirection(PaginationDirection.Forward) + }} + onPrev={() => { + setPaginationRange({ start: paginationRange.start - paginationOffset, end: paginationRange.end - paginationOffset }) + setPaginationDirection(PaginationDirection.Backward) + }} /> +
+
+
-
{exceptionsType === ExceptionsType.Crash ? 'Crash' : 'ANR'} Name
-
Instances
-
Percentage contribution
+
{exceptionsType === ExceptionsType.Crash ? 'Crash' : 'ANR'} Name
+
Instances
+
Percentage contribution
{exceptionsOverview.results.map(({ id, type, message, method_name, file_name, line_number, count, percentage_contribution }) => ( -
+

{file_name + ": " + method_name + "()"}

{type + ":" + message}

@@ -146,16 +158,6 @@ export const ExceptionsOverview: React.FC = ({ exceptio ))}
-
- { - setPaginationRange({ start: paginationRange.start + paginationOffset, end: paginationRange.end + paginationOffset }) - setPaginationDirection(PaginationDirection.Forward) - }} - onPrev={() => { - setPaginationRange({ start: paginationRange.start - paginationOffset, end: paginationRange.end - paginationOffset }) - setPaginationDirection(PaginationDirection.Backward) - }} />
}
)