diff --git a/telemetry/ui/src/components/routes/app/DataView.tsx b/telemetry/ui/src/components/routes/app/DataView.tsx index b1f00963..1a957353 100644 --- a/telemetry/ui/src/components/routes/app/DataView.tsx +++ b/telemetry/ui/src/components/routes/app/DataView.tsx @@ -2,6 +2,10 @@ import React, { useState } from 'react'; import { Step } from '../../../api'; import JsonView from '@uiw/react-json-view'; import { Button } from '../../common/button'; +import { Switch, SwitchField } from '../../common/switch'; +import { Label } from '../../common/fieldset'; +import { classNames } from '../../../utils/tailwind'; +import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/20/solid'; const StateButton = (props: { label: string; selected: boolean; setSelected: () => void }) => { const color = props.selected ? 'zinc' : 'light'; @@ -13,46 +17,45 @@ const StateButton = (props: { label: string; selected: boolean; setSelected: () }; export const ErrorView = (props: { error: string }) => { - return
{props.error}; + return ( + <> +
{props.error}+ > + ); }; export const DataView = (props: { currentStep: Step | undefined; priorStep: Step | undefined }) => { const [whichState, setWhichState] = useState<'after' | 'before'>('after'); const stepToExamine = whichState === 'after' ? props.currentStep : props.priorStep; const stateData = stepToExamine?.step_end_log?.state; - const resultData = stepToExamine?.step_end_log?.result; + const resultData = stepToExamine?.step_end_log?.result || undefined; const inputs = stepToExamine?.step_start_log?.inputs; const error = props.currentStep?.step_end_log?.exception; const [viewRawData, setViewRawData] = useState<'raw' | 'render'>('render'); return ( -
- {value} --
+ {value} +
NULL+
{value.toString()}+