Merge branch 'cz/inspection' of https://github.com/langflow-ai/langflow into cz/inspection
This commit is contained in:
commit
4c927517b2
5 changed files with 33 additions and 26 deletions
|
|
@ -6,13 +6,13 @@ import TableComponent from "../tableComponent";
|
||||||
import { extractColumnsFromRows } from "../../utils/utils";
|
import { extractColumnsFromRows } from "../../utils/utils";
|
||||||
|
|
||||||
function RecordsOutputComponent({
|
function RecordsOutputComponent({
|
||||||
flowPool,
|
flowPoolObject,
|
||||||
pagination,
|
pagination,
|
||||||
}: {
|
}: {
|
||||||
flowPool: FlowPoolObjectType;
|
flowPoolObject: FlowPoolObjectType;
|
||||||
pagination: boolean;
|
pagination: boolean;
|
||||||
}) {
|
}) {
|
||||||
const rows = flowPool?.data?.artifacts?.records ?? [];
|
const rows = flowPoolObject?.data?.artifacts?.records ?? [];
|
||||||
const columns = extractColumnsFromRows(rows, "union");
|
const columns = extractColumnsFromRows(rows, "union");
|
||||||
const columnDefs = columns.map((col, idx) => ({
|
const columnDefs = columns.map((col, idx) => ({
|
||||||
...col,
|
...col,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,10 @@ export default function SwitchOutputView(nodeId): JSX.Element {
|
||||||
</Case>
|
</Case>
|
||||||
|
|
||||||
<Case condition={node && Array.isArray(results)}>
|
<Case condition={node && Array.isArray(results)}>
|
||||||
<RecordsOutputComponent flowPool={flowPoolNode} pagination={true} />
|
<RecordsOutputComponent
|
||||||
|
flowPoolObject={flowPoolNode}
|
||||||
|
pagination={true}
|
||||||
|
/>
|
||||||
</Case>
|
</Case>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -258,28 +258,30 @@ export default function ParameterComponent({
|
||||||
<span className={!left && data.node?.frozen ? " text-ice" : ""}>
|
<span className={!left && data.node?.frozen ? " text-ice" : ""}>
|
||||||
{title}
|
{title}
|
||||||
</span>
|
</span>
|
||||||
<ShadTooltip
|
{!left && (
|
||||||
content={
|
<ShadTooltip
|
||||||
displayOutputPreview
|
content={
|
||||||
? "Inspect Output"
|
displayOutputPreview
|
||||||
: "Please build the component first"
|
? "Inspect Output"
|
||||||
}
|
: "Please build the component first"
|
||||||
>
|
}
|
||||||
<button
|
|
||||||
disabled={!displayOutputPreview}
|
|
||||||
onClick={() => setOpenOutputModal(true)}
|
|
||||||
>
|
>
|
||||||
<IconComponent
|
<button
|
||||||
className={classNames(
|
disabled={!displayOutputPreview}
|
||||||
"h-5 w-5",
|
onClick={() => setOpenOutputModal(true)}
|
||||||
displayOutputPreview
|
>
|
||||||
? ""
|
<IconComponent
|
||||||
: " cursor-not-allowed text-muted-foreground",
|
className={classNames(
|
||||||
)}
|
"h-5 w-5",
|
||||||
name={"Eye"}
|
displayOutputPreview
|
||||||
/>
|
? ""
|
||||||
</button>
|
: " cursor-not-allowed text-muted-foreground",
|
||||||
</ShadTooltip>
|
)}
|
||||||
|
name={"ScanEye"}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</ShadTooltip>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<span className={(required ? "ml-2 " : "") + "text-status-red"}>
|
<span className={(required ? "ml-2 " : "") + "text-status-red"}>
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ export default function IOFieldView({
|
||||||
return (
|
return (
|
||||||
<div className={left ? "h-56" : "h-full"}>
|
<div className={left ? "h-56" : "h-full"}>
|
||||||
<RecordsOutputComponent
|
<RecordsOutputComponent
|
||||||
flowPool={flowPoolNode}
|
flowPoolObject={flowPoolNode}
|
||||||
pagination={!left}
|
pagination={!left}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ import {
|
||||||
FileType2,
|
FileType2,
|
||||||
FileUp,
|
FileUp,
|
||||||
FlaskConical,
|
FlaskConical,
|
||||||
|
ScanEye,
|
||||||
FolderIcon,
|
FolderIcon,
|
||||||
FolderPlus,
|
FolderPlus,
|
||||||
FolderPlusIcon,
|
FolderPlusIcon,
|
||||||
|
|
@ -397,6 +398,7 @@ export const nodeIconsLucide: iconsType = {
|
||||||
textsplitters: Scissors,
|
textsplitters: Scissors,
|
||||||
wrappers: Gift,
|
wrappers: Gift,
|
||||||
helpers: Wand2,
|
helpers: Wand2,
|
||||||
|
ScanEye,
|
||||||
experimental: FlaskConical,
|
experimental: FlaskConical,
|
||||||
langchain_utilities: PocketKnife,
|
langchain_utilities: PocketKnife,
|
||||||
WolframAlphaAPIWrapper: SvgWolfram,
|
WolframAlphaAPIWrapper: SvgWolfram,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue