mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-03 13:20:39 +08:00

* feat: v5 is in progress * feat: antdv5 is updated * fix: build is fixed * fix: default config is over written by custom one * chore: onchange handler is updated * chore: overflow is hidden in the layout * Update index.tsx * fix: import is fixed * chore: un used import is fixed * fix: dark mode is updated in service map * fix: config dropdown is updated * fix: logs types is updated * fix: copy clipboard notification is updated * chore: layout changes are updated * chore: colors is updated * chore: action width is updated Co-authored-by: Pranay Prateek <pranay@signoz.io> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
import { Drawer, Tabs } from 'antd';
|
|
import React from 'react';
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
import { Dispatch } from 'redux';
|
|
import { AppState } from 'store/reducers';
|
|
import AppActions from 'types/actions';
|
|
import { SET_DETAILED_LOG_DATA } from 'types/actions/logs';
|
|
import { ILogsReducer } from 'types/reducer/logs';
|
|
|
|
import JSONView from './JsonView';
|
|
import TableView from './TableView';
|
|
|
|
function LogDetailedView(): JSX.Element {
|
|
const { detailedLog } = useSelector<AppState, ILogsReducer>(
|
|
(state) => state.logs,
|
|
);
|
|
|
|
const dispatch = useDispatch<Dispatch<AppActions>>();
|
|
|
|
const onDrawerClose = (): void => {
|
|
dispatch({
|
|
type: SET_DETAILED_LOG_DATA,
|
|
payload: null,
|
|
});
|
|
};
|
|
|
|
return (
|
|
<Drawer
|
|
width="60%"
|
|
title="Log Details"
|
|
placement="right"
|
|
closable
|
|
onClose={onDrawerClose}
|
|
open={detailedLog !== null}
|
|
style={{ overscrollBehavior: 'contain' }}
|
|
destroyOnClose
|
|
>
|
|
<Tabs defaultActiveKey="1">
|
|
<Tabs.TabPane tab="Table" key="1">
|
|
{detailedLog && <TableView logData={detailedLog} />}
|
|
</Tabs.TabPane>
|
|
<Tabs.TabPane tab="JSON" key="2">
|
|
{detailedLog && <JSONView logData={detailedLog} />}
|
|
</Tabs.TabPane>
|
|
</Tabs>
|
|
</Drawer>
|
|
);
|
|
}
|
|
|
|
export default LogDetailedView;
|