Skip to content

Commit 19694c2

Browse files
committed
Increase the size of the image thumbnails
1 parent 7dcb284 commit 19694c2

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

backend/frontend/src/components/ImageThumbnail.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Props {
77
hardware: string;
88
timestamp?: string;
99
stopPropagation?: boolean;
10+
width: number;
1011
}
1112

1213
export function ImageThumbnail({
@@ -15,7 +16,8 @@ export function ImageThumbnail({
1516
name,
1617
hardware,
1718
timestamp,
18-
stopPropagation = false
19+
stopPropagation = false,
20+
width
1921
}: Props) {
2022
const timePart = timestamp ? `/${timestamp}` : '';
2123
return (
@@ -26,7 +28,7 @@ export function ImageThumbnail({
2628
>
2729
<img
2830
src={`/api/result/${type}-thumbnail/${group}/${name}/${hardware}${timePart}`}
29-
style={{ width: 170, height: 95.625 }}
31+
style={{ width }}
3032
loading={'lazy'}
3133
alt={type}
3234
/>

backend/frontend/src/components/TestHistory.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ interface Props {
1313
export function TestHistory({ record, onUpdateReference }: Props) {
1414
const testData = [...record.data].reverse();
1515

16+
const ImageWidth = 250;
17+
1618
return (
1719
<Box p={'md'} bg={'dark.8'}>
1820
<Table
@@ -82,6 +84,7 @@ export function TestHistory({ record, onUpdateReference }: Props) {
8284
name={record.name}
8385
hardware={record.hardware}
8486
timestamp={d.timeStamp}
87+
width={ImageWidth}
8588
/>
8689
</Table.Td>
8790
<Table.Td>
@@ -91,6 +94,7 @@ export function TestHistory({ record, onUpdateReference }: Props) {
9194
name={record.name}
9295
hardware={record.hardware}
9396
timestamp={d.timeStamp}
97+
width={ImageWidth}
9498
/>
9599
</Table.Td>
96100
<Table.Td>
@@ -100,6 +104,7 @@ export function TestHistory({ record, onUpdateReference }: Props) {
100104
name={record.name}
101105
hardware={record.hardware}
102106
timestamp={d.timeStamp}
107+
width={ImageWidth}
103108
/>
104109
</Table.Td>
105110
<Table.Td>

backend/frontend/src/components/TestRow.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export function TestRow({ record, onOpen }: Props) {
1414
const latestData = record.data[record.data.length - 1];
1515
if (!latestData) return null;
1616

17+
const ImageWidth = 250;
18+
1719
return (
1820
<Table.Tr style={{ cursor: 'pointer' }} onClick={() => onOpen(record)}>
1921
<Table.Td style={{ width: 90 }}>
@@ -47,31 +49,34 @@ export function TestRow({ record, onOpen }: Props) {
4749
<Table.Td>
4850
<Text size={'sm'}>{new Date(latestData.timeStamp).toISOString()}</Text>
4951
</Table.Td>
50-
<Table.Td>
52+
<Table.Td style={{ width: ImageWidth }}>
5153
<ImageThumbnail
5254
type={'candidate'}
5355
group={record.group}
5456
name={record.name}
5557
hardware={record.hardware}
5658
stopPropagation
59+
width={ImageWidth}
5760
/>
5861
</Table.Td>
59-
<Table.Td>
62+
<Table.Td style={{ width: ImageWidth }}>
6063
<ImageThumbnail
6164
type={'reference'}
6265
group={record.group}
6366
name={record.name}
6467
hardware={record.hardware}
6568
stopPropagation
69+
width={ImageWidth}
6670
/>
6771
</Table.Td>
68-
<Table.Td>
72+
<Table.Td style={{ width: ImageWidth }}>
6973
<ImageThumbnail
7074
type={'difference'}
7175
group={record.group}
7276
name={record.name}
7377
hardware={record.hardware}
7478
stopPropagation
79+
width={ImageWidth}
7580
/>
7681
</Table.Td>
7782
</Table.Tr>

0 commit comments

Comments
 (0)