Another batch of renaming Record to Data

This commit is contained in:
ogabrielluiz 2024-06-12 18:18:03 -03:00
commit 16089ea5b2
61 changed files with 283 additions and 441 deletions

View file

@ -1,4 +1,4 @@
import RecordsOutputComponent from "../../../../../../components/dataOutputComponent";
import DataOutputComponent from "../../../../../../components/dataOutputComponent";
import ForwardedIconComponent from "../../../../../../components/genericIconComponent";
import {
Alert,
@ -29,7 +29,7 @@ const SwitchOutputView: React.FC<SwitchOutputViewProps> = ({
const results = flowPoolNode?.data?.logs[outputName] ?? "";
const resultType = results?.type;
let resultMessage = results?.message;
const RECORD_TYPES = ["record", "object", "array", "message"];
const RECORD_TYPES = ["data", "object", "array", "message"];
if (resultMessage?.raw) {
resultMessage = resultMessage.raw;
}
@ -47,7 +47,7 @@ const SwitchOutputView: React.FC<SwitchOutputViewProps> = ({
</Case>
<Case condition={RECORD_TYPES.includes(resultType)}>
<RecordsOutputComponent
<DataOutputComponent
rows={
Array.isArray(resultMessage)
? (resultMessage as Array<any>).every((item) => item.data)

View file

@ -4,7 +4,7 @@ import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied
import { extractColumnsFromRows } from "../../utils/utils";
import TableComponent from "../tableComponent";
function RecordsOutputComponent({
function DataOutputComponent({
pagination,
rows,
columnMode = "union",
@ -35,4 +35,4 @@ function RecordsOutputComponent({
);
}
export default RecordsOutputComponent;
export default DataOutputComponent;

View file

@ -654,7 +654,7 @@ export const OUTPUT_TYPES = new Set([
"JsonOutput",
"KeyPairOutput",
"StringListOutput",
"RecordsOutput",
"DataOutput",
"TableOutput",
]);

View file

@ -2,7 +2,7 @@ import { cloneDeep } from "lodash";
import { useState } from "react";
import ImageViewer from "../../../../components/ImageViewer";
import CsvOutputComponent from "../../../../components/csvOutputComponent";
import RecordsOutputComponent from "../../../../components/dataOutputComponent";
import DataOutputComponent from "../../../../components/dataOutputComponent";
import InputListComponent from "../../../../components/inputListComponent";
import PdfViewer from "../../../../components/pdfViewer";
import { Textarea } from "../../../../components/ui/textarea";
@ -245,10 +245,10 @@ export default function IOFieldView({
/>
</>
);
case "RecordsOutput":
case "DataOutput":
return (
<div className={left ? "h-56" : "h-full"}>
<RecordsOutputComponent
<DataOutputComponent
pagination={!left}
rows={
Array.isArray(flowPoolNode?.data?.artifacts)

View file

@ -272,7 +272,7 @@ export const nodeColors: { [char: string]: string } = {
retrievers: "#e6b25a",
unknown: "#9CA3AF",
custom_components: "#ab11ab",
Records: "#31a3cc",
Data: "#31a3cc",
Data: "#31a3cc",
Message: "#4367BF",
};