SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore: use infinity table for logs column view (#8953)
Yunus M9b8a89207957
diff --git a/frontend/src/container/LogsExplorerList/index.tsx b/frontend/src/container/LogsExplorerList/index.tsxindex 986a90189a..1f15539de7 100644--- a/frontend/src/container/LogsExplorerList/index.tsx+++ b/frontend/src/container/LogsExplorerList/index.tsx@@ -27,7 +27,7 @@ import { ILog } from 'types/api/logs/log';import { DataSource, StringOperators } from 'types/common/queryBuilder';import NoLogs from '../NoLogs/NoLogs';-import ColumnView from './ColumnView/ColumnView';+import InfinityTableView from './InfinityTableView';import { LogsExplorerListProps } from './LogsExplorerList.interfaces';import { InfinityWrapperStyled } from './styles';import {@@ -48,7 +48,6 @@ function LogsExplorerList({isError,error,isFilterApplied,- isFrequencyChartVisible,}: LogsExplorerListProps): JSX.Element {const ref = useRef<VirtuosoHandle>(null);@@ -130,51 +129,6 @@ function LogsExplorerList({],);- const isTraceToLogsNavigation = useMemo(() => {- if (!currentStagedQueryData) return false;- return isTraceToLogsQuery(currentStagedQueryData);- }, [currentStagedQueryData]);-- const handleClearFilters = useCallback((): void => {- const queryIndex = lastUsedQuery ?? 0;- const updatedQuery = currentQuery?.builder.queryData?.[queryIndex];-- if (!updatedQuery) return;-- if (updatedQuery?.filters?.items) {- updatedQuery.filters.items = [];- }-- const preparedQuery = {- ...currentQuery,- builder: {- ...currentQuery.builder,- queryData: currentQuery.builder.queryData.map((item, idx: number) => ({- ...item,- filters: {- ...item.filters,- items: idx === queryIndex ? [] : [...(item.filters?.items || [])],- op: item.filters?.op || 'AND',- },- })),- },- };-- redirectWithQueryBuilderData(preparedQuery);- }, [currentQuery, lastUsedQuery, redirectWithQueryBuilderData]);-- const getEmptyStateMessage = useMemo(() => {- if (!isTraceToLogsNavigation) return;-- return getEmptyLogsListConfig(handleClearFilters);- }, [isTraceToLogsNavigation, handleClearFilters]);-- const handleLoadMore = useCallback(() => {- if (isLoading || isFetching) return;-- onEndReached(logs.length);- }, [isLoading, isFetching, onEndReached, logs.length]);-const renderContent = useMemo(() => {const components = isLoading? {@@ -184,17 +138,18 @@ function LogsExplorerList({if (options.format === 'table') {return (- <ColumnView- logs={logs}- onLoadMore={handleLoadMore}- selectedFields={selectedFields}+ <InfinityTableView+ ref={ref}isLoading={isLoading}- isFetching={isFetching}- options={{- maxLinesPerRow: options.maxLines,+ tableViewProps={{+ logs,+ fields: selectedFields,+ linesPerRow: options.maxLines,fontSize: options.fontSize,+ appendTo: 'end',+ activeLogIndex,}}- isFrequencyChartVisible={isFrequencyChartVisible}+ infitiyTableProps={{ onEndReached }}/>);}@@ -213,39 +168,75 @@ function LogsExplorerList({}return (- <InfinityWrapperStyled data-testid="logs-list-virtuoso">- <Card- style={{ width: '100%', marginTop: getMarginTop() }}- bodyStyle={CARD_BODY_STYLE}- >- <OverlayScrollbar isVirtuoso>- <Virtuoso- key={activeLogIndex || 'logs-virtuoso'}- ref={ref}- initialTopMostItemIndex={activeLogIndex !== -1 ? activeLogIndex : 0}- data={logs}- endReached={onEndReached}- totalCount={logs.length}- itemContent={getItemContent}- components={components}- />- </OverlayScrollbar>- </Card>- </InfinityWrapperStyled>+ <Card+ style={{ width: '100%', marginTop: getMarginTop() }}+ bodyStyle={CARD_BODY_STYLE}+ >+ <OverlayScrollbar isVirtuoso>+ <Virtuoso+ key={activeLogIndex || 'logs-virtuoso'}+ ref={ref}+ initialTopMostItemIndex={activeLogIndex !== -1 ? activeLogIndex : 0}+ data={logs}+ endReached={onEndReached}+ totalCount={logs.length}+ itemContent={getItemContent}+ components={components}+ />+ </OverlayScrollbar>+ </Card>);}, [isLoading,+ options.format,+ options.maxLines,+ options.fontSize,activeLogIndex,- handleLoadMore,- isFetching,logs,onEndReached,getItemContent,selectedFields,- isFrequencyChartVisible,- options,]);+ const isTraceToLogsNavigation = useMemo(() => {+ if (!currentStagedQueryData) return false;+ return isTraceToLogsQuery(currentStagedQueryData);+ }, [currentStagedQueryData]);++ const handleClearFilters = useCallback((): void => {+ const queryIndex = lastUsedQuery ?? 0;+ const updatedQuery = currentQuery?.builder.queryData?.[queryIndex];++ if (!updatedQuery) return;++ if (updatedQuery?.filters?.items) {+ updatedQuery.filters.items = [];+ }++ const preparedQuery = {+ ...currentQuery,+ builder: {+ ...currentQuery.builder,+ queryData: currentQuery.builder.queryData.map((item, idx: number) => ({+ ...item,+ filters: {+ ...item.filters,+ items: idx === queryIndex ? [] : [...(item.filters?.items || [])],+ op: item.filters?.op || 'AND',+ },+ })),+ },+ };++ redirectWithQueryBuilderData(preparedQuery);+ }, [currentQuery, lastUsedQuery, redirectWithQueryBuilderData]);++ const getEmptyStateMessage = useMemo(() => {+ if (!isTraceToLogsNavigation) return;++ return getEmptyLogsListConfig(handleClearFilters);+ }, [isTraceToLogsNavigation, handleClearFilters]);+return (<div className="logs-list-view-container">{(isLoading || (isFetching && logs.length === 0)) && <LogsLoading />}@@ -274,7 +265,9 @@ function LogsExplorerList({{!isLoading && !isError && logs.length > 0 && (<>- {renderContent}+ <InfinityWrapperStyled data-testid="logs-list-virtuoso">+ {renderContent}+ </InfinityWrapperStyled><LogDetailselectedTab={VIEW_TYPES.OVERVIEW}