Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Drops rendering numeric arrays

Stefan Krawczykd9b1d30cc562
diff --git a/telemetry/ui/src/components/routes/app/DataView.tsx b/telemetry/ui/src/components/routes/app/DataView.tsx
index 6d22f7f7..422e5d84 100644
--- a/telemetry/ui/src/components/routes/app/DataView.tsx
+++ b/telemetry/ui/src/components/routes/app/DataView.tsx
@@ -290,6 +290,10 @@ const RenderedField = (props: {
<span>NULL</span>
) : (
Object.entries(value).map(([k, v]) => {
+ if (v instanceof Array && v.length > 0 && typeof v[0] === 'number') {
+ // we want to display arrays of numbers as a single string.
+ v = v.toString();
+ }
return (
<div key={key + '-' + k} className={bodyClassNames}>
<RenderedField
@@ -328,6 +332,10 @@ const FormRenderer: React.FC<FormRendererProps> = ({ data, isDefaultExpanded: is
return (
<>
{Object.entries(data).map(([key, value]) => {
+ if (value instanceof Array && value.length > 0 && typeof value[0] === 'number') {
+ // we want to display arrays of numbers as a single string.
+ value = value.toString();
+ }
return (
<RenderedField
keyName={key}