From dff5724e748b12bc6732fcfbd28b5e651416d1bb Mon Sep 17 00:00:00 2001 From: Kartik Gupta Date: Tue, 25 Jul 2023 12:25:03 +0530 Subject: [PATCH] stats com2 --- src/components/Navbar/index.tsx | 20 +- src/constants/routes.ts | 1 + src/hooks/useGetLogStreamAlert.ts | 3 +- src/pages/Config/index.tsx | 17 ++ src/pages/Stats/Alerts.tsx | 78 +++---- src/pages/Stats/Status.tsx | 19 +- src/pages/Stats/index.tsx | 2 +- src/pages/Stats/styles.tsx | 332 ++---------------------------- src/routes/elements.tsx | 9 + src/routes/index.tsx | 5 +- 10 files changed, 109 insertions(+), 377 deletions(-) create mode 100644 src/pages/Config/index.tsx diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 4224f120..158eb8e2 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -10,6 +10,10 @@ import { IconHelpCircle, IconLogout, IconUser, + IconTransferIn, + IconBinaryTree2, + IconTableShortcut, + IconSettings, } from '@tabler/icons-react'; import { FC, useEffect, useState } from 'react'; import docImage from '@/assets/images/doc.webp'; @@ -27,9 +31,10 @@ import { useDisclosure, useLocalStorage } from '@mantine/hooks'; import { LOGIN_ROUTE } from '@/constants/routes'; const links = [ - { icon: IconColumns, label: 'Logs', pathname: '/logs' }, { icon: IconZoomCode, label: 'Query', pathname: '/query' }, + { icon: IconTableShortcut, label: 'Logs', pathname: '/logs' }, { icon: IconReportAnalytics, label: 'Stats', pathname: '/stats' }, + { icon: IconSettings, label: 'Config', pathname: '/config' }, ]; type NavbarProps = Omit; @@ -107,7 +112,7 @@ const Navbar: FC = (props) => { setCurrentPage(location.pathname); } } else if (streams && Boolean(streams.length)) { - navigate(`/${streams[0].name}/logs`); + navigate(`/${streams[0].name}/query`); } }, [streams, location]); @@ -156,16 +161,7 @@ const Navbar: FC = (props) => { - - - } + icon={} className={streamsBtn} />