mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-12 16:01:32 +08:00
fix: raw log data not rendering in log context (#6991)
* feat: add default selected fields for log context view * fix: add null check to to traceData * refactor: address review comment
This commit is contained in:
parent
e542e96031
commit
d910d99689
@ -6,17 +6,27 @@ import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
|
||||
import { LOCALSTORAGE } from 'constants/localStorage';
|
||||
import ShowButton from 'container/LogsContextList/ShowButton';
|
||||
import { useOptionsMenu } from 'container/OptionsMenu';
|
||||
import { defaultLogsSelectedColumns } from 'container/OptionsMenu/constants';
|
||||
import { FontSize } from 'container/OptionsMenu/types';
|
||||
import { ORDERBY_FILTERS } from 'container/QueryBuilder/filters/OrderByFilter/config';
|
||||
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { Virtuoso } from 'react-virtuoso';
|
||||
import { IField } from 'types/api/logs/fields';
|
||||
import { ILog } from 'types/api/logs/log';
|
||||
import { Query, TagFilter } from 'types/api/queryBuilder/queryBuilderData';
|
||||
import { DataSource, StringOperators } from 'types/common/queryBuilder';
|
||||
|
||||
import { useContextLogData } from './useContextLogData';
|
||||
|
||||
const defaultLogsSelectedFields: IField[] = defaultLogsSelectedColumns.map(
|
||||
(item) => ({
|
||||
name: item.key,
|
||||
type: item.type,
|
||||
dataType: item.dataType,
|
||||
}),
|
||||
);
|
||||
|
||||
function ContextLogRenderer({
|
||||
isEdit,
|
||||
query,
|
||||
@ -109,6 +119,7 @@ function ContextLogRenderer({
|
||||
data={logTorender}
|
||||
linesPerRow={1}
|
||||
fontSize={options.fontSize}
|
||||
selectedFields={defaultLogsSelectedFields}
|
||||
/>
|
||||
),
|
||||
[log.id, options.fontSize],
|
||||
|
@ -68,11 +68,11 @@ function TraceDetailsV2(): JSX.Element {
|
||||
() =>
|
||||
!isFetchingTraceData &&
|
||||
!errorFetchingTraceData &&
|
||||
defaultTo(traceData?.payload?.spans.length, 0) === 0,
|
||||
defaultTo(traceData?.payload?.spans?.length, 0) === 0,
|
||||
[
|
||||
errorFetchingTraceData,
|
||||
isFetchingTraceData,
|
||||
traceData?.payload?.spans.length,
|
||||
traceData?.payload?.spans?.length,
|
||||
],
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user