Skip to content

Commit bb18455

Browse files
Merge branch 'main' into dan/fix-build
2 parents fc36a95 + 840a163 commit bb18455

40 files changed

+2725
-1314
lines changed

packages/api/.env.e2e

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ OPAMP_PORT=24320
1515

1616
# Auto-create default connections and sources for new teams
1717
# Uses public demo ClickHouse instance with pre-populated data
18-
DEFAULT_CONNECTIONS='[{"name":"Demo ClickHouse","host":"https://sql-clickhouse.clickhouse.com","username":"otel_demo","password":""}]'
19-
DEFAULT_SOURCES='[{"from":{"databaseName":"otel_v2","tableName":"otel_logs"},"kind":"log","timestampValueExpression":"TimestampTime","name":"Demo Logs","displayedTimestampValueExpression":"Timestamp","implicitColumnExpression":"Body","serviceNameExpression":"ServiceName","eventAttributesExpression":"LogAttributes","resourceAttributesExpression":"ResourceAttributes","defaultTableSelectExpression":"Timestamp,ServiceName,SeverityText,Body","severityTextExpression":"SeverityText","traceIdExpression":"TraceId","spanIdExpression":"SpanId","connection":"Demo ClickHouse","traceSourceId":"Traces","metricSourceId":"Demo Metrics"},{"from":{"databaseName":"otel_v2","tableName":"otel_traces"},"kind":"trace","timestampValueExpression":"Timestamp","name":"Demo Traces","displayedTimestampValueExpression":"Timestamp","implicitColumnExpression":"SpanName","serviceNameExpression":"ServiceName","eventAttributesExpression":"SpanAttributes","resourceAttributesExpression":"ResourceAttributes","defaultTableSelectExpression":"Timestamp,ServiceName,StatusCode,round(Duration/1e6),SpanName","traceIdExpression":"TraceId","spanIdExpression":"SpanId","durationExpression":"Duration","durationPrecision":9,"parentSpanIdExpression":"ParentSpanId","spanNameExpression":"SpanName","spanKindExpression":"SpanKind","statusCodeExpression":"StatusCode","statusMessageExpression":"StatusMessage","connection":"Demo ClickHouse","logSourceId":"Demo Logs","metricSourceId":"Demo Metrics"},{"from":{"databaseName":"otel_v2","tableName":""},"kind":"metric","timestampValueExpression":"TimeUnix","name":"Demo Metrics","resourceAttributesExpression":"ResourceAttributes","serviceNameExpression":"ServiceName","metricTables":{"gauge":"otel_metrics_gauge","histogram":"otel_metrics_histogram","sum":"otel_metrics_sum","summary":"otel_metrics_summary","exponential histogram":"otel_metrics_exponential_histogram"},"connection":"Demo ClickHouse","logSourceId":"Demo Logs","traceSourceId":"Demo Traces"}]'
18+
DEFAULT_CONNECTIONS='[{"name":"local","host":"https://sql-clickhouse.clickhouse.com","username":"otel_demo","password":""}]'
19+
DEFAULT_SOURCES='[{"kind":"log","name":"Demo Logs","connection":"local","from":{"databaseName":"otel_v2","tableName":"otel_logs"},"timestampValueExpression":"TimestampTime","defaultTableSelectExpression":"Timestamp, ServiceName, SeverityText, Body","serviceNameExpression":"ServiceName","severityTextExpression":"SeverityText","eventAttributesExpression":"LogAttributes","resourceAttributesExpression":"ResourceAttributes","traceIdExpression":"TraceId","spanIdExpression":"SpanId","implicitColumnExpression":"Body","displayedTimestampValueExpression":"Timestamp","sessionSourceId":"Demo Sessions","traceSourceId":"Demo Traces","metricSourceId":"Demo Metrics"},{"kind":"trace","name":"Demo Traces","connection":"local","from":{"databaseName":"otel_v2","tableName":"otel_traces"},"timestampValueExpression":"Timestamp","defaultTableSelectExpression":"Timestamp, ServiceName, StatusCode, round(Duration / 1e6), SpanName","serviceNameExpression":"ServiceName","eventAttributesExpression":"SpanAttributes","resourceAttributesExpression":"ResourceAttributes","traceIdExpression":"TraceId","spanIdExpression":"SpanId","implicitColumnExpression":"SpanName","durationExpression":"Duration","durationPrecision":9,"parentSpanIdExpression":"ParentSpanId","spanKindExpression":"SpanKind","spanNameExpression":"SpanName","logSourceId":"Demo Logs","statusCodeExpression":"StatusCode","statusMessageExpression":"StatusMessage","spanEventsValueExpression":"Events","metricSourceId":"Demo Metrics","sessionSourceId":"Demo Sessions"},{"kind":"metric","name":"Demo Metrics","connection":"local","from":{"databaseName":"otel_v2","tableName":""},"timestampValueExpression":"TimeUnix","serviceNameExpression":"ServiceName","metricTables":{"gauge":"otel_metrics_gauge","histogram":"otel_metrics_histogram","sum":"otel_metrics_sum","summary":"otel_metrics_summary","exponential histogram":"otel_metrics_exponential_histogram"},"resourceAttributesExpression":"ResourceAttributes","logSourceId":"Demo Logs"},{"kind":"session","name":"Demo Sessions","connection":"local","from":{"databaseName":"otel_v2","tableName":"hyperdx_sessions"},"timestampValueExpression":"TimestampTime","defaultTableSelectExpression":"Timestamp, ServiceName, Body","serviceNameExpression":"ServiceName","severityTextExpression":"SeverityText","eventAttributesExpression":"LogAttributes","resourceAttributesExpression":"ResourceAttributes","traceSourceId":"Demo Traces","traceIdExpression":"TraceId","spanIdExpression":"SpanId","implicitColumnExpression":"Body"},{"kind":"trace","name":"ClickPy Traces","connection":"local","from":{"databaseName":"otel_clickpy","tableName":"otel_traces"},"timestampValueExpression":"Timestamp","defaultTableSelectExpression":"Timestamp, ServiceName, StatusCode, round(Duration / 1e6), SpanName","serviceNameExpression":"ServiceName","eventAttributesExpression":"SpanAttributes","resourceAttributesExpression":"ResourceAttributes","traceIdExpression":"TraceId","spanIdExpression":"SpanId","implicitColumnExpression":"SpanName","durationExpression":"Duration","durationPrecision":9,"parentSpanIdExpression":"ParentSpanId","spanKindExpression":"SpanKind","spanNameExpression":"SpanName","statusCodeExpression":"StatusCode","statusMessageExpression":"StatusMessage","spanEventsValueExpression":"Events","highlightedTraceAttributeExpressions":[{"sqlExpression":"if((SpanAttributes['http.route']) LIKE '%dashboard%', concat('https://clickpy.clickhouse.com', path(SpanAttributes['http.target'])), '')","alias":"clickpy_link"}],"sessionSourceId":"ClickPy Sessions"},{"kind":"session","name":"ClickPy Sessions","connection":"local","from":{"databaseName":"otel_clickpy","tableName":"hyperdx_sessions"},"timestampValueExpression":"TimestampTime","defaultTableSelectExpression":"Timestamp, ServiceName, Body","serviceNameExpression":"ServiceName","severityTextExpression":"SeverityText","eventAttributesExpression":"LogAttributes","resourceAttributesExpression":"ResourceAttributes","traceSourceId":"ClickPy Traces","traceIdExpression":"TraceId","spanIdExpression":"SpanId","implicitColumnExpression":"Body"}]'
20+

packages/app/eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks';
77
import prettierConfig from 'eslint-config-prettier';
88
import simpleImportSort from 'eslint-plugin-simple-import-sort';
99
import prettierPlugin from 'eslint-plugin-prettier/recommended';
10+
import playwrightPlugin from 'eslint-plugin-playwright';
1011

1112
export default [
1213
js.configs.recommended,
@@ -116,11 +117,14 @@ export default [
116117
},
117118
{
118119
files: ['tests/e2e/**/*.{ts,js}'],
120+
...playwrightPlugin.configs['flat/recommended'],
119121
rules: {
122+
...playwrightPlugin.configs['flat/recommended'].rules,
120123
'no-console': 'off',
121124
'no-empty': 'off',
122125
'@typescript-eslint/no-explicit-any': 'off',
123126
'@next/next/no-html-link-for-pages': 'off',
127+
'playwright/no-networkidle': 'off', // temporary until we have a better way to deal with react re-renders
124128
},
125129
},
126130
...storybook.configs['flat/recommended'],

packages/app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
"@types/react-table": "^7.7.14",
135135
"@types/sqlstring": "^2.3.2",
136136
"eslint-config-next": "^16.0.10",
137+
"eslint-plugin-playwright": "^2.4.0",
137138
"eslint-plugin-storybook": "10.1.4",
138139
"identity-obj-proxy": "^3.0.0",
139140
"jest": "^30.2.0",
@@ -144,7 +145,7 @@
144145
"postcss": "^8.4.38",
145146
"postcss-preset-mantine": "^1.15.0",
146147
"prettier": "^3.3.2",
147-
"storybook": "^10.1.4",
148+
"storybook": "^10.1.10",
148149
"stylelint": "^16.26.1",
149150
"stylelint-config-standard-scss": "^16.0.0",
150151
"stylelint-prettier": "^5.0.3",

packages/app/src/AppNav.components.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,8 @@ export const AppNavCloudBanner = () => {
4747
<div className="my-3 bg-muted rounded p-2 text-center">
4848
<span className="fs-8">Ready to deploy on ClickHouse Cloud?</span>
4949
<div className="mt-2 mb-2">
50-
<Link
51-
href="https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started#deploy-with-clickhouse-cloud"
52-
passHref
53-
legacyBehavior
54-
>
55-
<Button
56-
variant="light"
57-
size="xs"
58-
component="a"
59-
className="hover-color-white"
60-
>
50+
<Link href="https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started#deploy-with-clickhouse-cloud">
51+
<Button variant="light" size="xs" className="hover-color-white">
6152
Get Started for Free
6253
</Button>
6354
</Link>

packages/app/src/HDXMultiSeriesTableChart.tsx

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,25 @@ export const Table = ({
111111
const link = getRowSearchLink(row.original);
112112

113113
if (!link) {
114-
return formattedValue;
114+
return (
115+
<div
116+
className={cx('align-top overflow-hidden py-1 pe-3', {
117+
'text-break': wrapLinesEnabled,
118+
'text-truncate': !wrapLinesEnabled,
119+
})}
120+
>
121+
{formattedValue}
122+
</div>
123+
);
115124
}
116125

117126
return (
118127
<Link
119128
href={link}
120-
passHref
121-
className={'align-top overflow-hidden py-1 pe-3'}
129+
className={cx('align-top overflow-hidden py-1 pe-3', {
130+
'text-break': wrapLinesEnabled,
131+
'text-truncate': !wrapLinesEnabled,
132+
})}
122133
style={{
123134
display: 'block',
124135
color: 'inherit',
@@ -256,7 +267,6 @@ export const Table = ({
256267
)}
257268
{items.map(virtualRow => {
258269
const row = rows[virtualRow.index] as TableRow<any>;
259-
const link = getRowSearchLink?.(row.original);
260270
return (
261271
<tr
262272
key={virtualRow.key}
@@ -267,34 +277,9 @@ export const Table = ({
267277
{row.getVisibleCells().map(cell => {
268278
return (
269279
<td key={cell.id} title={`${cell.getValue()}`}>
270-
{!link ? (
271-
<div
272-
className={cx('align-top overflow-hidden py-1 pe-3', {
273-
'text-break': wrapLinesEnabled,
274-
'text-truncate': !wrapLinesEnabled,
275-
})}
276-
>
277-
{flexRender(
278-
cell.column.columnDef.cell,
279-
cell.getContext(),
280-
)}
281-
</div>
282-
) : (
283-
<Link
284-
href={link}
285-
passHref
286-
className="align-top overflow-hidden py-1 pe-3"
287-
style={{
288-
display: 'block',
289-
color: 'inherit',
290-
textDecoration: 'none',
291-
}}
292-
>
293-
{flexRender(
294-
cell.column.columnDef.cell,
295-
cell.getContext(),
296-
)}
297-
</Link>
280+
{flexRender(
281+
cell.column.columnDef.cell,
282+
cell.getContext(),
298283
)}
299284
</td>
300285
);

packages/app/src/KubernetesDashboardPage.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,11 @@ export const InfraPodsStatusTable = ({
421421
{virtualItems.map(virtualRow => {
422422
const pod = podsList[virtualRow.index];
423423
return (
424-
<Link key={pod.id} href={getLink(pod.name)} legacyBehavior>
424+
<Link
425+
key={pod.id}
426+
href={getLink(pod.name)}
427+
style={{ display: 'contents' }}
428+
>
425429
<Table.Tr
426430
className="cursor-pointer"
427431
ref={rowVirtualizer.measureElement}
@@ -657,9 +661,9 @@ const NodesTable = ({
657661
const node = nodesList[virtualRow.index];
658662
return (
659663
<Link
660-
key={node.name}
661664
href={getLink(node.name)}
662-
legacyBehavior
665+
key={node.name}
666+
style={{ display: 'contents' }}
663667
>
664668
<Table.Tr
665669
className="cursor-pointer"
@@ -857,7 +861,7 @@ const NamespacesTable = ({
857861
<Link
858862
key={namespace.name}
859863
href={getLink(namespace.name)}
860-
legacyBehavior
864+
style={{ display: 'contents' }}
861865
>
862866
<Table.Tr
863867
className="cursor-pointer"

packages/app/src/LandingHeader.tsx

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,15 @@ export default function LandingHeader({
8080
{!isLoggedIn &&
8181
activeKey !== '/register' &&
8282
installation?.isTeamExisting === false && (
83-
<Link href="/register" passHref legacyBehavior>
84-
<Button
85-
component="a"
86-
variant="outline"
87-
color="green"
88-
size="sm"
89-
>
83+
<Link href="/register">
84+
<Button variant="outline" color="green" size="sm">
9085
Setup Account
9186
</Button>
9287
</Link>
9388
)}
9489
{isLoggedIn && (
95-
<Link href="/search" passHref legacyBehavior>
96-
<Button
97-
component="a"
98-
variant="outline"
99-
color="green"
100-
size="sm"
101-
>
90+
<Link href="/search">
91+
<Button variant="outline" color="green" size="sm">
10292
Go to Search
10393
</Button>
10494
</Link>
@@ -135,27 +125,15 @@ export default function LandingHeader({
135125
{!isLoggedIn &&
136126
activeKey !== '/register' &&
137127
installation?.isTeamExisting === false && (
138-
<Link href="/register" passHref legacyBehavior>
139-
<Button
140-
component="a"
141-
variant="outline"
142-
color="green"
143-
size="sm"
144-
fullWidth
145-
>
128+
<Link href="/register">
129+
<Button variant="outline" color="green" size="sm" fullWidth>
146130
Setup Account
147131
</Button>
148132
</Link>
149133
)}
150134
{isLoggedIn && (
151-
<Link href="/search" passHref legacyBehavior>
152-
<Button
153-
component="a"
154-
variant="outline"
155-
color="green"
156-
size="sm"
157-
fullWidth
158-
>
135+
<Link href="/search">
136+
<Button variant="outline" color="green" size="sm" fullWidth>
159137
Go to Search
160138
</Button>
161139
</Link>

packages/app/src/components/DBListBarChart.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,7 @@ function ListBar({
132132
) : null;
133133

134134
return getRowSearchLink ? (
135-
<Link
136-
href={getRowSearchLink(row)}
137-
passHref
138-
legacyBehavior
139-
key={group}
140-
>
135+
<Link href={getRowSearchLink(row)} key={group}>
141136
<Box
142137
mb="sm"
143138
td="none"

packages/app/src/components/DBSearchPageFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export const FilterCheckbox = ({
255255
</div>
256256
{pinned && (
257257
<Center me="1px">
258-
<IconPinFilled size={12} />
258+
<IconPinFilled size={12} data-testid={`filter-pin-${label}-pinned`} />
259259
</Center>
260260
)}
261261
</div>

packages/app/src/components/EventTag.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,7 @@ export default function EventTag({
113113
</Button>
114114
)}
115115
{generateSearchUrl && (
116-
<Link
117-
href={generateSearchUrl(searchCondition, nameLanguage)}
118-
passHref
119-
legacyBehavior
120-
>
116+
<Link href={generateSearchUrl(searchCondition, nameLanguage)}>
121117
<Button
122118
justify="space-between"
123119
color="gray"

0 commit comments

Comments
 (0)