diff --git a/dashboard/src/app/[tenantId]/(diagram)/wfRun/[...ids]/components/Variables.tsx b/dashboard/src/app/[tenantId]/(diagram)/wfRun/[...ids]/components/Variables.tsx index cccf02436..68548b975 100644 --- a/dashboard/src/app/[tenantId]/(diagram)/wfRun/[...ids]/components/Variables.tsx +++ b/dashboard/src/app/[tenantId]/(diagram)/wfRun/[...ids]/components/Variables.tsx @@ -33,7 +33,9 @@ export const Variables: FC = ({ variableDefs, variables }) => { v.id?.name === variable.varDef?.name)?.value)?.toString() ?? ''} + text={ + getVariableValue(variables.find(v => v.id?.name === variable.varDef?.name)?.value)?.toString() ?? '' + } /> diff --git a/dashboard/src/app/[tenantId]/components/CopyButton.tsx b/dashboard/src/app/[tenantId]/components/CopyButton.tsx index 65dd7b1ca..837cd8976 100644 --- a/dashboard/src/app/[tenantId]/components/CopyButton.tsx +++ b/dashboard/src/app/[tenantId]/components/CopyButton.tsx @@ -5,29 +5,25 @@ import { Check, Copy } from 'lucide-react' import { cn } from '@/components/utils' interface CopyButtonProps { - value: string - className?: string + value: string + className?: string } export const CopyButton: FC = ({ value, className }) => { - const [copied, setCopied] = useState(false) + const [copied, setCopied] = useState(false) - return ( - - ) -} \ No newline at end of file + return ( + + ) +} diff --git a/dashboard/src/app/[tenantId]/components/OverflowText.tsx b/dashboard/src/app/[tenantId]/components/OverflowText.tsx index 82a8afbd9..8d6bef453 100644 --- a/dashboard/src/app/[tenantId]/components/OverflowText.tsx +++ b/dashboard/src/app/[tenantId]/components/OverflowText.tsx @@ -3,71 +3,58 @@ import { FC, useEffect, useRef, useState } from 'react' import { cn } from '@/components/utils' import { Button } from '@/components/ui/button' import { ChevronRight } from 'lucide-react' -import { - Dialog, - DialogContent, - DialogTrigger, -} from '@/components/ui/dialog' +import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog' import { CopyButton } from './CopyButton' import { tryFormatAsJson } from '@/app/utils/tryFormatAsJson' type OverflowTextProps = { - text: string - className?: string + text: string + className?: string } - - export const OverflowText: FC = ({ text, className }) => { - const textRef = useRef(null) - const [isOverflowing, setIsOverflowing] = useState(false) + const textRef = useRef(null) + const [isOverflowing, setIsOverflowing] = useState(false) - useEffect(() => { - const element = textRef.current - if (element) { - setIsOverflowing(element.scrollWidth > element.clientWidth) - } - }, [text]) + useEffect(() => { + const element = textRef.current + if (element) { + setIsOverflowing(element.scrollWidth > element.clientWidth) + } + }, [text]) - const formattedText = tryFormatAsJson(text) + const formattedText = tryFormatAsJson(text) - if (isOverflowing) { - return ( - - - - - - -
-
- {formattedText} -
-
-
-
- ) - } + if (isOverflowing) { return ( -
- {formattedText} -
+ + + + + + +
+
{formattedText}
+
+
+
) -} \ No newline at end of file + } + return ( +
+ {formattedText} +
+ ) +} diff --git a/dashboard/src/components/ui/scroll-area.tsx b/dashboard/src/components/ui/scroll-area.tsx index 06ca0d732..fd018c1fa 100644 --- a/dashboard/src/components/ui/scroll-area.tsx +++ b/dashboard/src/components/ui/scroll-area.tsx @@ -1,22 +1,16 @@ -"use client" +'use client' -import * as React from "react" -import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" +import * as React from 'react' +import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area' -import { cn } from "@/components/utils" +import { cn } from '@/components/utils' const ScrollArea = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - - - {children} - + + {children} @@ -26,16 +20,14 @@ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName const ScrollBar = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, orientation = "vertical", ...props }, ref) => ( +>(({ className, orientation = 'vertical', ...props }, ref) => (