mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-20 01:41:07 +08:00

* feat: add support for changing the font size in logs * fix: build issues and logs context * chore: fix build issues * feat: scale all the spaces * chore: handle light mode designs * feat: set small as the default
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
import './LogContext.styles.scss';
|
|
|
|
import RawLogView from 'components/Logs/RawLogView';
|
|
import LogsContextList from 'container/LogsContextList';
|
|
import { FontSize } from 'container/OptionsMenu/types';
|
|
import { ORDERBY_FILTERS } from 'container/QueryBuilder/filters/OrderByFilter/config';
|
|
import { ILog } from 'types/api/logs/log';
|
|
import { Query, TagFilter } from 'types/api/queryBuilder/queryBuilderData';
|
|
|
|
interface LogContextProps {
|
|
log: ILog;
|
|
contextQuery: Query | undefined;
|
|
filters: TagFilter | null;
|
|
isEdit: boolean;
|
|
}
|
|
|
|
function LogContext({
|
|
log,
|
|
filters,
|
|
contextQuery,
|
|
isEdit,
|
|
}: LogContextProps): JSX.Element {
|
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
if (!contextQuery) return <></>;
|
|
|
|
return (
|
|
<div className="log-context-container">
|
|
<LogsContextList
|
|
order={ORDERBY_FILTERS.ASC}
|
|
filters={filters}
|
|
isEdit={isEdit}
|
|
log={log}
|
|
query={contextQuery}
|
|
/>
|
|
<RawLogView
|
|
isActiveLog
|
|
isReadOnly
|
|
isTextOverflowEllipsisDisabled={false}
|
|
data={log}
|
|
linesPerRow={1}
|
|
fontSize={FontSize.SMALL}
|
|
/>
|
|
<LogsContextList
|
|
order={ORDERBY_FILTERS.DESC}
|
|
filters={filters}
|
|
isEdit={isEdit}
|
|
log={log}
|
|
query={contextQuery}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default LogContext;
|