From 38e1216eb74be5f93db309f27b2615434e2f8878 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Wed, 11 Oct 2023 10:44:00 -0300 Subject: [PATCH] chore: `AnalyticsReports` visual adequacy (#30617) --- .../views/admin/viewLogs/AnalyticsReports.tsx | 27 +++++++++---------- .../views/admin/viewLogs/ServerLogs.tsx | 2 +- .../views/admin/viewLogs/ViewLogsPage.tsx | 13 +++++---- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/apps/meteor/client/views/admin/viewLogs/AnalyticsReports.tsx b/apps/meteor/client/views/admin/viewLogs/AnalyticsReports.tsx index cd300c14a481..9307a2596a71 100644 --- a/apps/meteor/client/views/admin/viewLogs/AnalyticsReports.tsx +++ b/apps/meteor/client/views/admin/viewLogs/AnalyticsReports.tsx @@ -1,4 +1,4 @@ -import { Box, Icon, Skeleton } from '@rocket.chat/fuselage'; +import { Box, Icon, Skeleton, Scrollable } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; @@ -10,8 +10,8 @@ const AnalyticsReports = () => { const { data, isLoading, isSuccess, isError } = useAnalyticsObject(); return ( - <> - + + @@ -23,18 +23,15 @@ const AnalyticsReports = () => { {t('Analytics_page_briefing_second_paragraph')} - - {isSuccess &&
{JSON.stringify(data, null, '\t')}
} - {isError && t('Something_went_wrong_try_again_later')} - {isLoading && ( - <> - - - - - )} -
- + + + {isSuccess &&
{JSON.stringify(data, null, '\t')}
} + {isError && t('Something_went_wrong_try_again_later')} + {isLoading && Array.from({ length: 10 }).map((_, index) => )} + <> +
+
+
); }; diff --git a/apps/meteor/client/views/admin/viewLogs/ServerLogs.tsx b/apps/meteor/client/views/admin/viewLogs/ServerLogs.tsx index 4787dfb12a6d..aa496de024fa 100644 --- a/apps/meteor/client/views/admin/viewLogs/ServerLogs.tsx +++ b/apps/meteor/client/views/admin/viewLogs/ServerLogs.tsx @@ -166,7 +166,7 @@ const ServerLogs = (): ReactElement => { }, [sendToBottomIfNecessary]); return ( - + { const t = useTranslation(); - const [tab, setTab] = useState('Logs'); return ( - + - - + + setTab('Logs')} selected={tab === 'Logs'}> {t('Logs')} @@ -24,8 +23,8 @@ const ViewLogsPage = (): ReactElement => { {t('Analytic_reports')} - {tab === 'Logs' ? : } - + + {tab === 'Logs' ? : } ); };