Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 1c52fa6

Browse files
authored
chore: hide live tail option (#421)
1 parent 6591381 commit 1c52fa6

File tree

3 files changed

+38
-31
lines changed

3 files changed

+38
-31
lines changed

src/constants/routes.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const HOME_ROUTE = '/';
33
export const LOGIN_ROUTE = '/login';
44
// -----
55
export const MANAGE_ROUTE = '/:streamName/manage';
6-
export const LIVE_TAIL_ROUTE = '/:streamName/live-tail';
6+
// export const LIVE_TAIL_ROUTE = '/:streamName/live-tail';
77
export const EXPLORE_ROUTE = '/:streamName/explore';
88
// -----
99
export const USERS_MANAGEMENT_ROUTE = '/users';
@@ -13,14 +13,18 @@ export const STREAM_ROUTE = '/:streamName/:view?';
1313
export const DASHBOARDS_ROUTE = '/dashboards';
1414
export const CORRELATION_ROUTE = '/correlation';
1515

16-
export const STREAM_VIEWS = ['explore', 'manage', 'live-tail'];
16+
export const STREAM_VIEWS = [
17+
'explore',
18+
'manage',
19+
// 'live-tail'
20+
];
1721

1822
export const PATHS = {
1923
all: '/*',
2024
home: '/',
2125
explore: '/:streamName/:view?',
2226
login: '/login',
23-
liveTail: '/:streamName/:view?',
27+
// liveTail: '/:streamName/:view?',
2428
stats: '/:streamName/stats',
2529
config: '/:streamName/config',
2630
users: '/users',

src/pages/Stream/components/Sidebar.tsx

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { Stack, Tooltip } from '@mantine/core';
22
import classes from '../styles/SideBar.module.css';
3-
import { IconBolt, IconChevronsRight, IconFilterSearch, IconSettings2 } from '@tabler/icons-react';
3+
import {
4+
// IconBolt,
5+
IconChevronsRight,
6+
IconFilterSearch,
7+
IconSettings2,
8+
} from '@tabler/icons-react';
49
import { useCallback } from 'react';
510
import { useNavigate, useParams } from 'react-router-dom';
611
import { useAppStore } from '@/layouts/MainLayout/providers/AppProvider';
@@ -80,32 +85,32 @@ const ExpandCollapseButton = () => {
8085
);
8186
};
8287

83-
const LiveTailMenu = (props: MenuItemProps) => {
84-
const viewName = 'live-tail';
85-
const isActive = props.currentView === viewName;
86-
const additionalClassNames = `${isActive ? classes.activeMenuItem : ''}`;
87-
return (
88-
<Stack
89-
onClick={() => props.setCurrentView(viewName)}
90-
className={classes.menuItemContainer}
91-
style={{ padding: '4px 0', alignItems: 'center' }}>
92-
<Tooltip label="Live Tail" position="right">
93-
<Stack className={additionalClassNames} style={{ padding: '4px 4px' }}>
94-
<IconBolt
95-
stroke={isActive ? 1.4 : 1.2}
96-
size="1.2rem"
97-
className={classes.icon}
98-
{...(isActive && { color: 'black' })}
99-
/>
100-
</Stack>
101-
</Tooltip>
102-
</Stack>
103-
);
104-
};
88+
// const LiveTailMenu = (props: MenuItemProps) => {
89+
// const viewName = 'live-tail';
90+
// const isActive = props.currentView === viewName;
91+
// const additionalClassNames = `${isActive ? classes.activeMenuItem : ''}`;
92+
// return (
93+
// <Stack
94+
// onClick={() => props.setCurrentView(viewName)}
95+
// className={classes.menuItemContainer}
96+
// style={{ padding: '4px 0', alignItems: 'center' }}>
97+
// <Tooltip label="Live Tail" position="right">
98+
// <Stack className={additionalClassNames} style={{ padding: '4px 4px' }}>
99+
// <IconBolt
100+
// stroke={isActive ? 1.4 : 1.2}
101+
// size="1.2rem"
102+
// className={classes.icon}
103+
// {...(isActive && { color: 'black' })}
104+
// />
105+
// </Stack>
106+
// </Tooltip>
107+
// </Stack>
108+
// );
109+
// };
105110

106111
const SideBar = () => {
107112
const [currentStream] = useAppStore((store) => store.currentStream);
108-
const [isStandAloneMode] = useAppStore((store) => store.isStandAloneMode);
113+
// const [isStandAloneMode] = useAppStore((store) => store.isStandAloneMode);
109114
const { view } = useParams();
110115
const navigate = useNavigate();
111116

@@ -122,7 +127,7 @@ const SideBar = () => {
122127
<Stack className={classes.container} style={{ gap: 0 }}>
123128
<Stack gap={0}>
124129
<AllLogsButton setCurrentView={setCurrentView} currentView={view || ''} />
125-
{isStandAloneMode && <LiveTailMenu setCurrentView={setCurrentView} currentView={view || ''} />}
130+
{/* {isStandAloneMode && <LiveTailMenu setCurrentView={setCurrentView} currentView={view || ''} />} */}
126131
<ConfigButton setCurrentView={setCurrentView} currentView={view || ''} />
127132
</Stack>
128133
<Stack style={{ marginTop: 'auto' }}>

src/pages/Stream/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, Stack } from '@mantine/core';
22
import { useDocumentTitle, useHotkeys } from '@mantine/hooks';
33
import { FC, useCallback, useEffect } from 'react';
4-
import LiveLogTable from './Views/LiveTail/LiveLogTable';
4+
55
import ViewLog from './components/ViewLog';
66
import { useAppStore } from '@/layouts/MainLayout/providers/AppProvider';
77
import SideBar from './components/Sidebar';
@@ -116,8 +116,6 @@ const Stream: FC = () => {
116116
) : (
117117
<LogsView schemaLoading={isSchemaFetching} infoLoading={isInfoLoading} />
118118
)
119-
) : view === 'live-tail' ? (
120-
<LiveLogTable />
121119
) : (
122120
<Management schemaLoading={isSchemaFetching} />
123121
)}

0 commit comments

Comments
 (0)