feat: render runs by robot id and display run name

This commit is contained in:
amhsirak
2024-11-18 05:58:24 +05:30
parent f6e08aa766
commit cba24f2f4b

View File

@@ -120,10 +120,10 @@ export const RunsTable = (
All Runs All Runs
</Typography> </Typography>
<TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden' }}> <TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden' }}>
{Object.entries(groupedRows).map(([name, group]) => ( {Object.entries(groupedRows).map(([id, data]) => (
<Accordion key={name}> <Accordion key={id}>
<AccordionSummary expandIcon={<ExpandMoreIcon />}> <AccordionSummary expandIcon={<ExpandMoreIcon />}>
<Typography variant="h6">{name}</Typography> <Typography variant="h6">{data[0].name}</Typography>
</AccordionSummary> </AccordionSummary>
<AccordionDetails> <AccordionDetails>
<Table stickyHeader aria-label="sticky table"> <Table stickyHeader aria-label="sticky table">
@@ -142,17 +142,19 @@ export const RunsTable = (
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
{group.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row) => ( {data
<CollapsibleRow .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
row={row} .map((row) => (
handleDelete={handleDelete} <CollapsibleRow
key={`row-${row.id}`} row={row}
isOpen={runId === row.runId && runningRecordingName === row.name} handleDelete={handleDelete}
currentLog={currentInterpretationLog} key={`row-${row.id}`}
abortRunHandler={abortRunHandler} isOpen={runId === row.runId && runningRecordingName === row.name}
runningRecordingName={runningRecordingName} currentLog={currentInterpretationLog}
/> abortRunHandler={abortRunHandler}
))} runningRecordingName={runningRecordingName}
/>
))}
</TableBody> </TableBody>
</Table> </Table>
</AccordionDetails> </AccordionDetails>