diff --git a/frontend/src/lib/components/ArgInfo.svelte b/frontend/src/lib/components/ArgInfo.svelte index a1cfdf6276..83ef8f3772 100644 --- a/frontend/src/lib/components/ArgInfo.svelte +++ b/frontend/src/lib/components/ArgInfo.svelte @@ -20,6 +20,19 @@ return typeof value === 'string' || value instanceof String } + // `{ $interpolate: ["literal", { $var: "path" }, ...] }` args are produced by flow + // input transforms that embed variable() in a template literal: the variable is + // resolved (and masked) on the child job, so the arg holds a reference, not the value. + function isInterpolate(value: any): boolean { + return ( + value != undefined && + typeof value === 'object' && + !Array.isArray(value) && + Object.keys(value).length === 1 && + Array.isArray(value['$interpolate']) + ) + } + async function getResource(path: string) { jsonViewerContent = await ResourceService.getResourceValue({ workspace: $workspaceStore!, @@ -99,6 +112,17 @@ > {/if} +{:else if isInterpolate(value)} + {#each value['$interpolate'] as part, i (i)}{#if isString(part)}{part}{:else if part != undefined && typeof part === 'object' && isString(part['$var'])}{/if}{/each} {:else}
{#if JSON.stringify(value).length > 120}