Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.
Python aiburrchatbot-frameworkdagsgenerative-aigraphshacktoberfestllmopsllmsmlopspersistent-data-structurestate-machinestate-managementvisibility
Adds icons to minimized table sections
elijahbenizzy0af9490e0311
diff --git a/telemetry/ui/src/components/common/layout.tsx b/telemetry/ui/src/components/common/layout.tsxindex 082750b7..7f8b027c 100644--- a/telemetry/ui/src/components/common/layout.tsx+++ b/telemetry/ui/src/components/common/layout.tsx@@ -15,7 +15,7 @@ const TwoColumnLayout: React.FC<TwoColumnLayoutProps> = ({}) => {if (mode == 'first-minimal') {return (- <div className={`flex h-full w-full ${mode == 'first-minimal' ? 'flex flex-1' : ''}`}>+ <div className={`flex h-full w-full ${mode === 'first-minimal' ? 'flex flex-1' : ''}`}><div className="h-full">{leftColumnContent}</div><div className="h-full grow">{rightColumnContent}</div></div>diff --git a/telemetry/ui/src/components/routes/app/AppView.tsx b/telemetry/ui/src/components/routes/app/AppView.tsxindex 282115bb..e63e74d3 100644--- a/telemetry/ui/src/components/routes/app/AppView.tsx+++ b/telemetry/ui/src/components/routes/app/AppView.tsx@@ -167,18 +167,20 @@ export const AppView = () => {<TwoColumnLayoutmode={minimizedTable ? 'first-minimal' : 'half'}leftColumnContent={- <StepList- steps={stepsSorted}- currentHoverIndex={hoverIndex}- setCurrentHoverIndex={setCurrentHoverIndex}- currentSelectedIndex={currentActionIndex}- setCurrentSelectedIndex={setCurrentActionIndex}- numPriorIndices={NUM_PREVIOUS_ACTIONS}- autoRefresh={autoRefresh}- setAutoRefresh={setAutoRefresh}- minimized={minimizedTable}- setMinimized={setMinimizedTable}- />+ <div className="overflow-y-scroll hide-scrollbar h-full w-full">+ <StepList+ steps={stepsSorted}+ currentHoverIndex={hoverIndex}+ setCurrentHoverIndex={setCurrentHoverIndex}+ currentSelectedIndex={currentActionIndex}+ setCurrentSelectedIndex={setCurrentActionIndex}+ numPriorIndices={NUM_PREVIOUS_ACTIONS}+ autoRefresh={autoRefresh}+ setAutoRefresh={setAutoRefresh}+ minimized={minimizedTable}+ setMinimized={setMinimizedTable}+ />+ </div>}rightColumnContent={<AppStateViewdiff --git a/telemetry/ui/src/components/routes/app/StepList.tsx b/telemetry/ui/src/components/routes/app/StepList.tsxindex 8b7b924f..586a3827 100644--- a/telemetry/ui/src/components/routes/app/StepList.tsx+++ b/telemetry/ui/src/components/routes/app/StepList.tsx@@ -6,12 +6,15 @@ import { Status, getActionStatus } from '../../../utils';import { Chip } from '../../common/chip';import { useState } from 'react';import {+ ArrowPathIcon,ChevronLeftIcon,ChevronRightIcon,MinusIcon,PlusIcon} from '@heroicons/react/24/outline';+import { PauseIcon } from '@heroicons/react/24/solid';+import { RiCornerDownRightLine } from 'react-icons/ri';/**@@ -50,27 +53,15 @@ const AutoRefreshSwitch = (props: {autoRefresh: boolean;setAutoRefresh: (b: boolean) => void;}) => {+ const AutoRefreshIcon = props.autoRefresh ? PauseIcon : ArrowPathIcon;return (- <fieldset>- <div className="space-y-5">- <div className="relative flex items-start">- <div className="flex h-6 items-center">- <input- type="checkbox"- value={props.autoRefresh ? 'on' : 'off'}- checked={props.autoRefresh}- onChange={(e) => props.setAutoRefresh(e.target.checked)}- className="h-4 w-4 rounded border-gray-300 text-dwdarkblue focus:ring-dwdarkblue selected:bg-dwdarkblue"- />- </div>- <div className="ml-3 text-sm leading-6">- <label htmlFor="comments" className="font-medium text-gray-500">- Tail- </label>- </div>- </div>- </div>- </fieldset>+ <AutoRefreshIcon+ className="h-4 w-4 text-gray-600 hover:scale-110 cursor-pointer"+ onClick={(e) => {+ props.setAutoRefresh(!props.autoRefresh);+ e.stopPropagation();+ }}+ />);};/**@@ -262,6 +253,19 @@ const TraceSubTable = (props: {);};+const ExpandAllButton = (props: { isExpanded: boolean; toggleExpandAll: () => void }) => {+ const ExpandAllIcon = props.isExpanded ? MinusIcon : PlusIcon;+ return (+ <ExpandAllIcon+ className="h-4 w-4 text-gray-600 hover:scale-110 cursor-pointer"+ onClick={(e) => {+ props.toggleExpandAll();+ e.stopPropagation();+ }}+ />+ );+};+/*** Table with a list of steps.* The indexing is off here -- as it updates the index stays the same.@@ -294,7 +298,7 @@ export const StepList = (props: {}};const [intentionExpandAll, setIntentionExpandAll] = useState(false);- const ExpandAllIcon = intentionExpandAll ? MinusIcon : PlusIcon;+ // const ExpandAllIcon = intentionExpandAll ? MinusIcon : PlusIcon;const expandAll = () => {const allIndices = props.steps.map((step) => step.step_start_log.sequence_id);setExpandedActions(allIndices);@@ -313,10 +317,10 @@ export const StepList = (props: {const MinimizeTableIcon = props.minimized ? ChevronRightIcon : ChevronLeftIcon;return (<Table dense={2}>- <TableHead className="">- <TableRow>- <TableHeader>- <div className="py-1">+ <TableHead className=" bg-white">+ <TableRow className="">+ <TableHeader className="">+ <div className="py-1 flex flex-row gap-2"><MinimizeTableIconclassName="h-4 w-4 text-gray-600 hover:scale-110 cursor-pointer"onClick={(e) => {@@ -324,6 +328,22 @@ export const StepList = (props: {e.stopPropagation();}}/>+ {props.minimized ? (+ <ExpandAllButton+ isExpanded={intentionExpandAll}+ toggleExpandAll={toggleExpandAll}+ />+ ) : (+ <></>+ )}+ {props.minimized ? (+ <AutoRefreshSwitch+ setAutoRefresh={props.setAutoRefresh}+ autoRefresh={props.autoRefresh}+ />+ ) : (+ <></>+ )}</div></TableHeader>{!props.minimized && (@@ -335,27 +355,28 @@ export const StepList = (props: {<TableHeader>Duration</TableHeader><TableHeader><div className="flex flex-row items-center gap-2">- <ExpandAllIcon- className="h-4 w-4 text-gray-600 hover:scale-110 cursor-pointer"- onClick={(e) => {- toggleExpandAll();- e.stopPropagation();- }}+ <ExpandAllButton+ isExpanded={intentionExpandAll}+ toggleExpandAll={toggleExpandAll}/>Spans</div></TableHeader><TableHeader>- <AutoRefreshSwitch- setAutoRefresh={props.setAutoRefresh}- autoRefresh={props.autoRefresh}- />+ <div className="flex flex-row items-center gap-2">+ <AutoRefreshSwitch+ setAutoRefresh={props.setAutoRefresh}+ autoRefresh={props.autoRefresh}+ />+ <span>Tail</span>+ </div></TableHeader></>)}</TableRow></TableHead>- <TableBody>+ {/* <div className="h-10"></div> */}+ <TableBody className="pt-10">{props.steps.map((step) => {return (<>