Skip to content

Commit eaff492

Browse files
Add copy-to-clipboard buttons in RawLogTable for log line data and URLs (#1227)
Co-authored-by: Mike Shi <[email protected]>
1 parent dbf1682 commit eaff492

14 files changed

+660
-126
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": minor
3+
---
4+
5+
Add toggle filters button, copy field, and per-row copy-to-clipboard for JSON data and modal URLs in RawLogTable

packages/api/tsconfig.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,12 @@
33
"compilerOptions": {
44
"baseUrl": "./src",
55
"paths": {
6-
"@/*": [
7-
"./*"
8-
]
6+
"@/*": ["./*"]
97
},
108
"rootDir": ".",
119
"outDir": "build",
1210
"moduleResolution": "Node16"
1311
},
14-
"include": [
15-
"src",
16-
"migrations",
17-
"scripts"
18-
],
19-
"exclude": [
20-
"node_modules"
21-
]
22-
}
12+
"include": ["src", "migrations", "scripts"],
13+
"exclude": ["node_modules"]
14+
}

packages/app/src/DBSearchPage.tsx

Lines changed: 31 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,11 @@ function DBSearchPage() {
12261226
/>
12271227
)}
12281228
<OnboardingModal />
1229-
<form data-testid="search-form" onSubmit={onFormSubmit}>
1229+
<form
1230+
data-testid="search-form"
1231+
onSubmit={onFormSubmit}
1232+
className={searchPageStyles.searchForm}
1233+
>
12301234
{/* <DevTool control={control} /> */}
12311235
<Flex gap="sm" px="sm" pt="sm" wrap="nowrap">
12321236
<Group gap="4px" wrap="nowrap">
@@ -1497,7 +1501,6 @@ function DBSearchPage() {
14971501
)}
14981502
<Flex
14991503
direction="column"
1500-
mt="sm"
15011504
style={{ overflow: 'hidden', height: '100%' }}
15021505
className="bg-hdx-dark"
15031506
>
@@ -1535,12 +1538,8 @@ function DBSearchPage() {
15351538
{analysisMode === 'pattern' &&
15361539
histogramTimeChartConfig != null && (
15371540
<Flex direction="column" w="100%" gap="0px">
1538-
<Box style={{ height: 20, minHeight: 20 }} p="xs" pb="md">
1539-
<Group
1540-
justify="space-between"
1541-
mb={4}
1542-
style={{ width: '100%' }}
1543-
>
1541+
<Box className={searchPageStyles.searchStatsContainer}>
1542+
<Group justify="space-between" style={{ width: '100%' }}>
15441543
<SearchTotalCountChart
15451544
config={histogramTimeChartConfig}
15461545
queryKeyPrefix={QUERY_KEY_PREFIX}
@@ -1555,12 +1554,7 @@ function DBSearchPage() {
15551554
</Group>
15561555
</Box>
15571556
{!hasQueryError && (
1558-
<Box
1559-
style={{ height: 120, minHeight: 120 }}
1560-
p="xs"
1561-
pb="md"
1562-
mb="md"
1563-
>
1557+
<Box className={searchPageStyles.timeChartContainer}>
15641558
<DBTimeChart
15651559
sourceId={searchedConfig.source ?? undefined}
15661560
showLegend={false}
@@ -1646,32 +1640,40 @@ function DBSearchPage() {
16461640
chartConfig &&
16471641
histogramTimeChartConfig && (
16481642
<>
1649-
<Box style={{ height: 20, minHeight: 20 }} p="xs" pb="md">
1643+
<Box className={searchPageStyles.searchStatsContainer}>
16501644
<Group
16511645
justify="space-between"
1652-
mb={4}
16531646
style={{ width: '100%' }}
16541647
>
16551648
<SearchTotalCountChart
16561649
config={histogramTimeChartConfig}
16571650
queryKeyPrefix={QUERY_KEY_PREFIX}
16581651
/>
1659-
<SearchNumRows
1660-
config={{
1661-
...chartConfig,
1662-
dateRange: searchedTimeRange,
1663-
}}
1664-
enabled={isReady}
1665-
/>
1652+
<Group gap="sm" align="center">
1653+
{shouldShowLiveModeHint &&
1654+
analysisMode === 'results' &&
1655+
denoiseResults != true && (
1656+
<Button
1657+
size="compact-xs"
1658+
variant="outline"
1659+
onClick={handleResumeLiveTail}
1660+
>
1661+
<i className="bi text-success bi-lightning-charge-fill me-2" />
1662+
Resume Live Tail
1663+
</Button>
1664+
)}
1665+
<SearchNumRows
1666+
config={{
1667+
...chartConfig,
1668+
dateRange: searchedTimeRange,
1669+
}}
1670+
enabled={isReady}
1671+
/>
1672+
</Group>
16661673
</Group>
16671674
</Box>
16681675
{!hasQueryError && (
1669-
<Box
1670-
style={{ height: 120, minHeight: 120 }}
1671-
p="xs"
1672-
pb="md"
1673-
mb="md"
1674-
>
1676+
<Box className={searchPageStyles.timeChartContainer}>
16751677
<DBTimeChart
16761678
sourceId={searchedConfig.source ?? undefined}
16771679
showLegend={false}
@@ -1803,31 +1805,6 @@ function DBSearchPage() {
18031805
</>
18041806
) : (
18051807
<>
1806-
{shouldShowLiveModeHint &&
1807-
analysisMode === 'results' &&
1808-
denoiseResults != true && (
1809-
<div
1810-
className="d-flex justify-content-center"
1811-
style={{ height: 0 }}
1812-
>
1813-
<div
1814-
style={{
1815-
position: 'relative',
1816-
top: -20,
1817-
zIndex: 2,
1818-
}}
1819-
>
1820-
<Button
1821-
size="compact-xs"
1822-
variant="outline"
1823-
onClick={handleResumeLiveTail}
1824-
>
1825-
<i className="bi text-success bi-lightning-charge-fill me-2" />
1826-
Resume Live Tail
1827-
</Button>
1828-
</div>
1829-
</div>
1830-
)}
18311808
{chartConfig &&
18321809
searchedConfig.source &&
18331810
dbSqlRowTableConfig &&

packages/app/src/HDXMultiSeriesTableChart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { memo, useCallback, useMemo, useRef, useState } from 'react';
22
import Link from 'next/link';
33
import cx from 'classnames';
44
import { Flex, Text, UnstyledButton } from '@mantine/core';
5+
import { IconGripVertical } from '@tabler/icons-react';
56
import {
67
flexRender,
78
getCoreRowModel,

packages/app/src/components/DBRowSidePanel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ import 'react-modern-drawer/dist/index.css';
4040
import styles from '@/../styles/LogSidePanel.module.scss';
4141

4242
export type RowSidePanelContextProps = {
43-
onPropertyAddClick?: (keyPath: string, value: string) => void;
43+
onPropertyAddClick?: (
44+
keyPath: string,
45+
value: string,
46+
action?: 'only' | 'exclude' | 'include',
47+
) => void;
4448
generateSearchUrl?: ({
4549
where,
4650
whereLanguage,

0 commit comments

Comments
 (0)