feat: rm other actions logic
This commit is contained in:
@@ -547,8 +547,7 @@
|
|||||||
"view_full": "Vollständige Daten anzeigen",
|
"view_full": "Vollständige Daten anzeigen",
|
||||||
"items": "Elemente",
|
"items": "Elemente",
|
||||||
"schema_title": "Text erfassen",
|
"schema_title": "Text erfassen",
|
||||||
"list_title": "Liste erfassen",
|
"list_title": "Liste erfassen"
|
||||||
"other_title": "Andere Daten"
|
|
||||||
},
|
},
|
||||||
"captured_screenshot": {
|
"captured_screenshot": {
|
||||||
"title": "Erfasste Screenshots",
|
"title": "Erfasste Screenshots",
|
||||||
|
|||||||
@@ -568,8 +568,7 @@
|
|||||||
"view_full": "View Full Data",
|
"view_full": "View Full Data",
|
||||||
"items": "items",
|
"items": "items",
|
||||||
"schema_title": "Capture Text",
|
"schema_title": "Capture Text",
|
||||||
"list_title": "Capture List",
|
"list_title": "Capture List"
|
||||||
"other_title": "Other Data"
|
|
||||||
},
|
},
|
||||||
"captured_screenshot": {
|
"captured_screenshot": {
|
||||||
"title": "Captured Screenshots",
|
"title": "Captured Screenshots",
|
||||||
|
|||||||
@@ -548,8 +548,7 @@
|
|||||||
"view_full": "Ver Datos Completos",
|
"view_full": "Ver Datos Completos",
|
||||||
"items": "elementos",
|
"items": "elementos",
|
||||||
"schema_title": "Capturar Texto",
|
"schema_title": "Capturar Texto",
|
||||||
"list_title": "Capturar Lista",
|
"list_title": "Capturar Lista"
|
||||||
"other_title": "Otros Datos"
|
|
||||||
},
|
},
|
||||||
"captured_screenshot": {
|
"captured_screenshot": {
|
||||||
"title": "Capturas de Pantalla",
|
"title": "Capturas de Pantalla",
|
||||||
|
|||||||
@@ -548,8 +548,7 @@
|
|||||||
"view_full": "すべてのデータを表示",
|
"view_full": "すべてのデータを表示",
|
||||||
"items": "アイテム",
|
"items": "アイテム",
|
||||||
"schema_title": "テキストをキャプチャ",
|
"schema_title": "テキストをキャプチャ",
|
||||||
"list_title": "リストをキャプチャ",
|
"list_title": "リストをキャプチャ"
|
||||||
"other_title": "その他のデータ"
|
|
||||||
},
|
},
|
||||||
"captured_screenshot": {
|
"captured_screenshot": {
|
||||||
"title": "キャプチャされたスクリーンショット",
|
"title": "キャプチャされたスクリーンショット",
|
||||||
|
|||||||
@@ -548,8 +548,7 @@
|
|||||||
"view_full": "查看完整数据",
|
"view_full": "查看完整数据",
|
||||||
"items": "项目",
|
"items": "项目",
|
||||||
"schema_title": "捕获文本",
|
"schema_title": "捕获文本",
|
||||||
"list_title": "捕获列表",
|
"list_title": "捕获列表"
|
||||||
"other_title": "其他数据"
|
|
||||||
},
|
},
|
||||||
"captured_screenshot": {
|
"captured_screenshot": {
|
||||||
"title": "已捕获的截图",
|
"title": "已捕获的截图",
|
||||||
|
|||||||
@@ -589,7 +589,6 @@ async function executeRun(id: string, userId: string) {
|
|||||||
const categorizedOutput = {
|
const categorizedOutput = {
|
||||||
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
||||||
scrapeList: interpretationInfo.scrapeListOutput || {},
|
scrapeList: interpretationInfo.scrapeListOutput || {},
|
||||||
other: interpretationInfo.otherOutput || {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
@@ -603,7 +602,6 @@ async function executeRun(id: string, userId: string) {
|
|||||||
serializableOutput: {
|
serializableOutput: {
|
||||||
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
||||||
scrapeList: Object.values(categorizedOutput.scrapeList),
|
scrapeList: Object.values(categorizedOutput.scrapeList),
|
||||||
other: Object.values(categorizedOutput.other),
|
|
||||||
},
|
},
|
||||||
binaryOutput: uploadedBinaryOutput,
|
binaryOutput: uploadedBinaryOutput,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -265,8 +265,7 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
|||||||
|
|
||||||
const categorizedOutput = {
|
const categorizedOutput = {
|
||||||
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
||||||
scrapeList: interpretationInfo.scrapeListOutput || {},
|
scrapeList: interpretationInfo.scrapeListOutput || {}
|
||||||
other: interpretationInfo.otherOutput || {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await run.update({
|
await run.update({
|
||||||
@@ -278,7 +277,6 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
|||||||
serializableOutput: {
|
serializableOutput: {
|
||||||
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
||||||
scrapeList: Object.values(categorizedOutput.scrapeList),
|
scrapeList: Object.values(categorizedOutput.scrapeList),
|
||||||
other: Object.values(categorizedOutput.other),
|
|
||||||
},
|
},
|
||||||
binaryOutput: uploadedBinaryOutput,
|
binaryOutput: uploadedBinaryOutput,
|
||||||
});
|
});
|
||||||
@@ -482,7 +480,6 @@ async function abortRun(runId: string, userId: string): Promise<boolean> {
|
|||||||
let categorizedOutput = {
|
let categorizedOutput = {
|
||||||
scrapeSchema: {},
|
scrapeSchema: {},
|
||||||
scrapeList: {},
|
scrapeList: {},
|
||||||
other: {}
|
|
||||||
};
|
};
|
||||||
let binaryOutput: Record<string, any> = {};
|
let binaryOutput: Record<string, any> = {};
|
||||||
|
|
||||||
@@ -496,7 +493,6 @@ async function abortRun(runId: string, userId: string): Promise<boolean> {
|
|||||||
categorizedOutput = {
|
categorizedOutput = {
|
||||||
scrapeSchema: collectDataByType(browser.interpreter.serializableDataByType.scrapeSchema || []),
|
scrapeSchema: collectDataByType(browser.interpreter.serializableDataByType.scrapeSchema || []),
|
||||||
scrapeList: collectDataByType(browser.interpreter.serializableDataByType.scrapeList || []),
|
scrapeList: collectDataByType(browser.interpreter.serializableDataByType.scrapeList || []),
|
||||||
other: collectDataByType(browser.interpreter.serializableDataByType.other || [])
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,7 +512,6 @@ async function abortRun(runId: string, userId: string): Promise<boolean> {
|
|||||||
serializableOutput: {
|
serializableOutput: {
|
||||||
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
||||||
scrapeList: Object.values(categorizedOutput.scrapeList),
|
scrapeList: Object.values(categorizedOutput.scrapeList),
|
||||||
other: Object.values(categorizedOutput.other),
|
|
||||||
},
|
},
|
||||||
binaryOutput,
|
binaryOutput,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -92,11 +92,9 @@ export class WorkflowInterpreter {
|
|||||||
public serializableDataByType: {
|
public serializableDataByType: {
|
||||||
scrapeSchema: any[],
|
scrapeSchema: any[],
|
||||||
scrapeList: any[],
|
scrapeList: any[],
|
||||||
other: any[]
|
|
||||||
} = {
|
} = {
|
||||||
scrapeSchema: [],
|
scrapeSchema: [],
|
||||||
scrapeList: [],
|
scrapeList: [],
|
||||||
other: []
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -216,12 +214,7 @@ export class WorkflowInterpreter {
|
|||||||
type: 'captureList',
|
type: 'captureList',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
} else {
|
}
|
||||||
this.socket.emit('serializableCallback', {
|
|
||||||
type: 'other',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
binaryCallback: (data: string, mimetype: string) => {
|
binaryCallback: (data: string, mimetype: string) => {
|
||||||
this.socket.emit('binaryCallback', {
|
this.socket.emit('binaryCallback', {
|
||||||
@@ -292,7 +285,6 @@ export class WorkflowInterpreter {
|
|||||||
this.serializableDataByType = {
|
this.serializableDataByType = {
|
||||||
scrapeSchema: [],
|
scrapeSchema: [],
|
||||||
scrapeList: [],
|
scrapeList: [],
|
||||||
other: []
|
|
||||||
};
|
};
|
||||||
this.binaryData = [];
|
this.binaryData = [];
|
||||||
}
|
}
|
||||||
@@ -342,9 +334,7 @@ export class WorkflowInterpreter {
|
|||||||
}
|
}
|
||||||
} else if (this.currentActionType === 'scrapeList') {
|
} else if (this.currentActionType === 'scrapeList') {
|
||||||
this.serializableDataByType.scrapeList.push(data);
|
this.serializableDataByType.scrapeList.push(data);
|
||||||
} else {
|
}
|
||||||
this.serializableDataByType.other.push(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.socket.emit('serializableCallback', data);
|
this.socket.emit('serializableCallback', data);
|
||||||
},
|
},
|
||||||
@@ -394,12 +384,6 @@ export class WorkflowInterpreter {
|
|||||||
...reducedObject,
|
...reducedObject,
|
||||||
}
|
}
|
||||||
}, {}),
|
}, {}),
|
||||||
otherOutput: this.serializableDataByType.other.reduce((reducedObject, item, index) => {
|
|
||||||
return {
|
|
||||||
[`item-${index}`]: item,
|
|
||||||
...reducedObject,
|
|
||||||
}
|
|
||||||
}, {}),
|
|
||||||
binaryOutput: this.binaryData.reduce((reducedObject, item, index) => {
|
binaryOutput: this.binaryData.reduce((reducedObject, item, index) => {
|
||||||
return {
|
return {
|
||||||
[`item-${index}`]: item,
|
[`item-${index}`]: item,
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ interface AirtableUpdateTask {
|
|||||||
interface SerializableOutput {
|
interface SerializableOutput {
|
||||||
scrapeSchema?: any[];
|
scrapeSchema?: any[];
|
||||||
scrapeList?: any[];
|
scrapeList?: any[];
|
||||||
other?: any[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_RETRIES = 3;
|
const MAX_RETRIES = 3;
|
||||||
@@ -52,7 +51,6 @@ function mergeRelatedData(serializableOutput: SerializableOutput, binaryOutput:
|
|||||||
...[
|
...[
|
||||||
...(serializableOutput.scrapeSchema ?? []).map(arr => arr?.length ?? 0),
|
...(serializableOutput.scrapeSchema ?? []).map(arr => arr?.length ?? 0),
|
||||||
...(serializableOutput.scrapeList ?? []).map(arr => arr?.length ?? 0),
|
...(serializableOutput.scrapeList ?? []).map(arr => arr?.length ?? 0),
|
||||||
...(serializableOutput.other ?? []).map(arr => arr?.length ?? 0),
|
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@@ -83,17 +81,6 @@ function mergeRelatedData(serializableOutput: SerializableOutput, binaryOutput:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serializableOutput.other) {
|
|
||||||
for (const otherArray of serializableOutput.other) {
|
|
||||||
if (!Array.isArray(otherArray)) continue;
|
|
||||||
|
|
||||||
for (let i = 0; i < otherArray.length; i++) {
|
|
||||||
if (i >= mergedRecords.length) break;
|
|
||||||
mergedRecords[i] = { ...mergedRecords[i], ...otherArray[i] };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (binaryOutput && Object.keys(binaryOutput).length > 0) {
|
if (binaryOutput && Object.keys(binaryOutput).length > 0) {
|
||||||
for (let i = 0; i < mergedRecords.length; i++) {
|
for (let i = 0; i < mergedRecords.length; i++) {
|
||||||
const screenshotKey = `item-${i}`;
|
const screenshotKey = `item-${i}`;
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ interface GoogleSheetUpdateTask {
|
|||||||
interface SerializableOutput {
|
interface SerializableOutput {
|
||||||
scrapeSchema?: any[];
|
scrapeSchema?: any[];
|
||||||
scrapeList?: any[];
|
scrapeList?: any[];
|
||||||
other?: any[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_RETRIES = 5;
|
const MAX_RETRIES = 5;
|
||||||
@@ -69,16 +68,6 @@ export async function updateGoogleSheet(robotId: string, runId: string) {
|
|||||||
plainRobot
|
plainRobot
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serializableOutput.other && serializableOutput.other.length > 0) {
|
|
||||||
await processOutputType(
|
|
||||||
robotId,
|
|
||||||
spreadsheetId,
|
|
||||||
'Other',
|
|
||||||
serializableOutput.other,
|
|
||||||
plainRobot
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plainRun.binaryOutput && Object.keys(plainRun.binaryOutput).length > 0) {
|
if (plainRun.binaryOutput && Object.keys(plainRun.binaryOutput).length > 0) {
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ async function executeRun(id: string, userId: string) {
|
|||||||
const categorizedOutput = {
|
const categorizedOutput = {
|
||||||
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
||||||
scrapeList: interpretationInfo.scrapeListOutput || {},
|
scrapeList: interpretationInfo.scrapeListOutput || {},
|
||||||
other: interpretationInfo.otherOutput || {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
@@ -149,7 +148,6 @@ async function executeRun(id: string, userId: string) {
|
|||||||
serializableOutput: {
|
serializableOutput: {
|
||||||
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
||||||
scrapeList: Object.values(categorizedOutput.scrapeList),
|
scrapeList: Object.values(categorizedOutput.scrapeList),
|
||||||
other: Object.values(categorizedOutput.other),
|
|
||||||
},
|
},
|
||||||
binaryOutput: uploadedBinaryOutput,
|
binaryOutput: uploadedBinaryOutput,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -96,17 +96,6 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
|||||||
const tabIndex = availableTabs.findIndex(tab => tab.id === 'captureText');
|
const tabIndex = availableTabs.findIndex(tab => tab.id === 'captureText');
|
||||||
if (tabIndex !== -1) setActiveTab(tabIndex);
|
if (tabIndex !== -1) setActiveTab(tabIndex);
|
||||||
}
|
}
|
||||||
} else if (type === 'other') {
|
|
||||||
if (Array.isArray(data)) {
|
|
||||||
setOtherData(prev => [...prev, data]);
|
|
||||||
} else {
|
|
||||||
setOtherData(prev => [...prev, [data]]);
|
|
||||||
}
|
|
||||||
if (otherData.length === 0) {
|
|
||||||
const availableTabs = getAvailableTabs();
|
|
||||||
const tabIndex = availableTabs.findIndex(tab => tab.id === 'other');
|
|
||||||
if (tabIndex !== -1) setActiveTab(tabIndex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollLogToBottom();
|
scrollLogToBottom();
|
||||||
@@ -178,10 +167,6 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
|||||||
tabs.push({ id: 'captureScreenshot', label: 'Screenshots' });
|
tabs.push({ id: 'captureScreenshot', label: 'Screenshots' });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (otherData.length > 0) {
|
|
||||||
tabs.push({ id: 'other', label: 'Other' });
|
|
||||||
}
|
|
||||||
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}, [captureListData.length, captureTextData.length, screenshotData.length, otherData.length]);
|
}, [captureListData.length, captureTextData.length, screenshotData.length, otherData.length]);
|
||||||
|
|
||||||
@@ -464,87 +449,6 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
|||||||
</Table>
|
</Table>
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{activeTab === availableTabs.findIndex(tab => tab.id === 'other') && otherData.length > 0 && (
|
|
||||||
<Box>
|
|
||||||
{otherData.length > 1 && (
|
|
||||||
<Box sx={{
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
alignItems: 'center',
|
|
||||||
mb: 2,
|
|
||||||
mt: 2
|
|
||||||
}}>
|
|
||||||
<Typography variant="body2">
|
|
||||||
{`Dataset ${otherPage + 1} of ${otherData.length}`}
|
|
||||||
</Typography>
|
|
||||||
<Box>
|
|
||||||
<Button
|
|
||||||
onClick={() => setOtherPage(prev => Math.max(0, prev - 1))}
|
|
||||||
disabled={otherPage === 0}
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
Previous
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => setOtherPage(prev => Math.min(otherData.length - 1, prev + 1))}
|
|
||||||
disabled={otherPage >= otherData.length - 1}
|
|
||||||
size="small"
|
|
||||||
sx={{ ml: 1 }}
|
|
||||||
>
|
|
||||||
Next
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
<TableContainer component={Paper} sx={{ boxShadow: 'none', borderRadius: 0 }}>
|
|
||||||
<Table>
|
|
||||||
<TableHead>
|
|
||||||
<TableRow>
|
|
||||||
{otherData[otherPage] && otherData[otherPage].length > 0 &&
|
|
||||||
Object.keys(otherData[otherPage][0]).map((column) => (
|
|
||||||
<TableCell
|
|
||||||
key={column}
|
|
||||||
sx={{
|
|
||||||
borderBottom: '1px solid',
|
|
||||||
borderColor: darkMode ? '#3a4453' : '#dee2e6',
|
|
||||||
backgroundColor: darkMode ? '#2a3441' : '#f8f9fa'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{column}
|
|
||||||
</TableCell>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
</TableRow>
|
|
||||||
</TableHead>
|
|
||||||
<TableBody>
|
|
||||||
{otherData[otherPage] &&
|
|
||||||
otherData[otherPage].map((row: any, idx: any) => (
|
|
||||||
<TableRow
|
|
||||||
key={idx}
|
|
||||||
sx={{
|
|
||||||
borderBottom: '1px solid',
|
|
||||||
borderColor: darkMode ? '#3a4453' : '#dee2e6'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{Object.keys(row).map((column) => (
|
|
||||||
<TableCell
|
|
||||||
key={column}
|
|
||||||
sx={{
|
|
||||||
borderBottom: 'none',
|
|
||||||
py: 2
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{row[column]}
|
|
||||||
</TableCell>
|
|
||||||
))}
|
|
||||||
</TableRow>
|
|
||||||
))}
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
</TableContainer>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -45,9 +45,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
const [listData, setListData] = useState<any[][]>([]);
|
const [listData, setListData] = useState<any[][]>([]);
|
||||||
const [listColumns, setListColumns] = useState<string[][]>([]);
|
const [listColumns, setListColumns] = useState<string[][]>([]);
|
||||||
const [currentListIndex, setCurrentListIndex] = useState<number>(0);
|
const [currentListIndex, setCurrentListIndex] = useState<number>(0);
|
||||||
|
|
||||||
const [otherData, setOtherData] = useState<any[]>([]);
|
|
||||||
const [otherColumns, setOtherColumns] = useState<string[]>([]);
|
|
||||||
|
|
||||||
const [expandedView, setExpandedView] = useState<string | null>(null);
|
const [expandedView, setExpandedView] = useState<string | null>(null);
|
||||||
|
|
||||||
@@ -66,7 +63,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
|
|
||||||
if (!row.serializableOutput.scrapeSchema &&
|
if (!row.serializableOutput.scrapeSchema &&
|
||||||
!row.serializableOutput.scrapeList &&
|
!row.serializableOutput.scrapeList &&
|
||||||
!row.serializableOutput.other &&
|
|
||||||
Object.keys(row.serializableOutput).length > 0) {
|
Object.keys(row.serializableOutput).length > 0) {
|
||||||
|
|
||||||
setIsLegacyData(true);
|
setIsLegacyData(true);
|
||||||
@@ -83,10 +79,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
if (row.serializableOutput.scrapeList) {
|
if (row.serializableOutput.scrapeList) {
|
||||||
processScrapeList(row.serializableOutput.scrapeList);
|
processScrapeList(row.serializableOutput.scrapeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.serializableOutput.other && Object.keys(row.serializableOutput.other).length > 0) {
|
|
||||||
processDataCategory(row.serializableOutput.other, setOtherData, setOtherColumns);
|
|
||||||
}
|
|
||||||
}, [row.serializableOutput]);
|
}, [row.serializableOutput]);
|
||||||
|
|
||||||
const processLegacyData = (legacyOutput: Record<string, any>) => {
|
const processLegacyData = (legacyOutput: Record<string, any>) => {
|
||||||
@@ -240,7 +232,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
allData = {
|
allData = {
|
||||||
schema: schemaData,
|
schema: schemaData,
|
||||||
list: listData.flat(),
|
list: listData.flat(),
|
||||||
other: otherData
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,13 +610,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
csvFilename = 'list_data.csv';
|
csvFilename = 'list_data.csv';
|
||||||
jsonFilename = 'list_data.json';
|
jsonFilename = 'list_data.json';
|
||||||
break;
|
break;
|
||||||
case 'other':
|
|
||||||
data = otherData;
|
|
||||||
columns = otherColumns;
|
|
||||||
title = t('run_content.captured_data.other_title');
|
|
||||||
csvFilename = 'other_data.csv';
|
|
||||||
jsonFilename = 'other_data.json';
|
|
||||||
break;
|
|
||||||
case 'legacy':
|
case 'legacy':
|
||||||
data = legacyData;
|
data = legacyData;
|
||||||
columns = legacyColumns;
|
columns = legacyColumns;
|
||||||
@@ -714,7 +698,7 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const hasData = schemaData.length > 0 || listData.length > 0 || otherData.length > 0 || legacyData.length > 0;
|
const hasData = schemaData.length > 0 || listData.length > 0 || legacyData.length > 0;
|
||||||
const hasScreenshots = row.binaryOutput && Object.keys(row.binaryOutput).length > 0;
|
const hasScreenshots = row.binaryOutput && Object.keys(row.binaryOutput).length > 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -881,15 +865,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
'list_data.json',
|
'list_data.json',
|
||||||
true
|
true
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{renderDataTable(
|
|
||||||
otherData,
|
|
||||||
otherColumns,
|
|
||||||
t('run_content.captured_data.other_title'),
|
|
||||||
<MoreHorizIcon sx={{ color: '#FF00C3' }} />,
|
|
||||||
'other_data.csv',
|
|
||||||
'other_data.json'
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
@@ -897,7 +872,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
const dataCategoriesCount = [
|
const dataCategoriesCount = [
|
||||||
schemaData.length > 0,
|
schemaData.length > 0,
|
||||||
listData.length > 0,
|
listData.length > 0,
|
||||||
otherData.length > 0
|
|
||||||
].filter(Boolean).length;
|
].filter(Boolean).length;
|
||||||
|
|
||||||
const columnWidth = dataCategoriesCount === 1 ? 12 : dataCategoriesCount === 2 ? 6 : 4;
|
const columnWidth = dataCategoriesCount === 1 ? 12 : dataCategoriesCount === 2 ? 6 : 4;
|
||||||
@@ -932,20 +906,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
)}
|
)}
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{otherData.length > 0 && (
|
|
||||||
<Grid item xs={12} md={columnWidth} sx={{ display: 'flex' }}>
|
|
||||||
{renderDataCard(
|
|
||||||
otherData,
|
|
||||||
otherColumns,
|
|
||||||
t('run_content.captured_data.other_title'),
|
|
||||||
<MoreHorizIcon sx={{ color: '#FF00C3' }} />,
|
|
||||||
'other',
|
|
||||||
'other_data.csv',
|
|
||||||
'other_data.json'
|
|
||||||
)}
|
|
||||||
</Grid>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
@@ -954,7 +914,6 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{renderExpandedView('schema')}
|
{renderExpandedView('schema')}
|
||||||
{renderExpandedView('other')}
|
|
||||||
{renderExpandedView('legacy')}
|
{renderExpandedView('legacy')}
|
||||||
|
|
||||||
{listData.map((_, index) => renderExpandedView(`list-${index}`))}
|
{listData.map((_, index) => renderExpandedView(`list-${index}`))}
|
||||||
|
|||||||
Reference in New Issue
Block a user