Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/pages/Stream/Views/Explore/StaticLogRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Log } from '@/@types/parseable/api/query';
import tableStyles from '../../styles/Logs.module.css';
import { useLogsStore, logsStoreReducers, columnsToSkip } from '../../providers/LogsProvider';
import { IconCopy, IconCheck } from '@tabler/icons-react';
import _ from 'lodash';

const { setSelectedLog } = logsStoreReducers;

Expand Down Expand Up @@ -84,14 +85,15 @@ const LogRow: FC<LogRowProps> = (props) => {
<tr key={logIndex} className={logIndex % 2 ? trStyle : trEvenStyle} onClick={() => onClick(log)}>
{columnsToShow.map((header, logSchemaIndex) => {
const parsedData = parseLogData(log[header], header);
const value = typeof parsedData === 'string' ? parsedData : _.toString(parsedData);
return (
<td
key={`${header}-${logSchemaIndex}`}
style={{ position: 'relative', whiteSpace: 'pre' }}
onMouseEnter={() => handleMouseEnter(logIndex, logSchemaIndex)}
onMouseLeave={handleMouseLeave}>
<Group wrap="nowrap">
{parsedData}
{value}
{hoveredCell === `${logIndex}-${logSchemaIndex}` && (
<Stack
style={{
Expand Down
3 changes: 2 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import dayjs from 'dayjs';
import { useMemo } from 'react';
import { useLocation } from 'react-router-dom';
import Cookies from 'js-cookie';
import _ from 'lodash';

export const baseURL = import.meta.env.VITE_PARSEABLE_URL ?? '/';

Expand All @@ -28,7 +29,7 @@ export const parseLogData = (value?: any, columnName?: string) => {
return dayjs(value).utc(true).format('DD/MM/YYYY HH:mm:ss');
}

if (value) {
if (value || typeof value === 'boolean' || typeof value === 'number') {
return value;
}

Expand Down