Skip to content

Commit

Permalink
Merge pull request #960 from notoraptor/improve-db-page
Browse files Browse the repository at this point in the history
[dashboard/DB page] Display only 7 first characters of trial ID in ID column.
  • Loading branch information
bouthilx committed Jul 6, 2022
2 parents 11eb0b7 + 6f7340c commit f9d8c94
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dashboard/src/src/experiments/content/DatabasePage/TrialTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ const TrialTable = ({ rows, headers, experiment }) => {
<TableBody>
{rows.map(row => (
<TableRow key={row.id} {...getRowProps({ row })}>
{row.cells.map(cell => (
<TableCell key={cell.id}>{cell.value}</TableCell>
{row.cells.map((cell, cellIndex) => (
<TableCell key={cell.id}>
{cellIndex === 0 && cell.value.length > 7 ? (
<span title={cell.value}>
{cell.value.substr(0, 7)}...
</span>
) : (
cell.value
)}
</TableCell>
))}
</TableRow>
))}
Expand Down

0 comments on commit f9d8c94

Please sign in to comment.