Skip to content

Commit fa2b73c

Browse files
authored
feat: Format byte numbers on ClickHouse page (#1709)
1 parent 79356c4 commit fa2b73c

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎.changeset/bright-shoes-smile.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
feat: Format byte numbers on ClickHouse page

‎packages/app/src/ClickhousePage.tsx‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ function InfrastructureTab({
109109
dateRange: searchedTimeRange,
110110
timestampValueExpression: 'event_time',
111111
displayType: DisplayType.Line,
112+
numberFormat: {
113+
output: 'byte',
114+
mantissa: 2,
115+
},
112116
}}
113117
onTimeRangeSelect={onTimeRangeSelect}
114118
/>
@@ -142,6 +146,10 @@ function InfrastructureTab({
142146
dateRange: searchedTimeRange,
143147
timestampValueExpression: 'event_time',
144148
displayType: DisplayType.Line,
149+
numberFormat: {
150+
output: 'byte',
151+
mantissa: 2,
152+
},
145153
}}
146154
onTimeRangeSelect={onTimeRangeSelect}
147155
/>
@@ -229,6 +237,10 @@ function InfrastructureTab({
229237
dateRange: searchedTimeRange,
230238
timestampValueExpression: 'event_time',
231239
displayType: DisplayType.Line,
240+
numberFormat: {
241+
output: 'byte',
242+
mantissa: 2,
243+
},
232244
}}
233245
onTimeRangeSelect={onTimeRangeSelect}
234246
/>
@@ -324,6 +336,13 @@ function InsertsTab({
324336
filters,
325337
groupBy: [{ valueExpression: 'tables' }],
326338
connection,
339+
numberFormat:
340+
insertsBy === 'bytes'
341+
? {
342+
output: 'byte',
343+
mantissa: 2,
344+
}
345+
: undefined,
327346
};
328347
}, [insertsBy, searchedTimeRange, connection]);
329348

0 commit comments

Comments
 (0)