Skip to content

Commit 53a4f7c

Browse files
committed
Adjusting errors and warning tables in discovery report
Signed-off-by: Montse Ortega <mortegag@redhat.com>
1 parent b244e4b commit 53a4f7c

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed

src/migration-wizard/steps/discovery/assessment-report/Dashboard.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ export const Dashboard: React.FC<Props> = ({
112112
</Gallery>
113113
</GridItem>
114114
<GridItem span={12}>
115-
<Gallery hasGutter minWidths={{ default: '300px', md: '45%' }}>
115+
<Gallery hasGutter minWidths={{ default: '300px', md: '45%' }}>
116116
<GalleryItem>
117-
<ErrorTable
118-
errors={vms.notMigratableReasons}
117+
<WarningsTable
118+
warnings={vms.migrationWarnings}
119119
isExportMode={isExportMode}
120120
/>
121121
</GalleryItem>
122122
<GalleryItem>
123-
<WarningsTable
124-
warnings={vms.migrationWarnings}
123+
<ErrorTable
124+
errors={vms.notMigratableReasons}
125125
isExportMode={isExportMode}
126126
/>
127127
</GalleryItem>

src/migration-wizard/steps/discovery/assessment-report/ErrorTable.tsx

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,35 @@ export const ErrorTable: React.FC<ErrorTableProps> = ({
2626
Errors
2727
</CardTitle>
2828
<CardBody style={{ padding: 0 }}>
29-
<div
30-
style={{
31-
maxHeight: tableHeight,
32-
overflowY: 'auto',
33-
overflowX: 'auto',
34-
padding: 2,
35-
}}
36-
>
37-
<ReportTable<MigrationIssue>
38-
data={errors}
39-
columns={['Description', 'Total']}
40-
fields={['assessment', 'count']}
41-
withoutBorder
42-
caption="Virtual machine validations"
43-
/>
44-
</div>
29+
{errors.length === 0 ? (
30+
<div
31+
style={{
32+
padding: '16px',
33+
textAlign: 'center',
34+
color: '#6a6e73',
35+
fontStyle: 'italic',
36+
}}
37+
>
38+
No errors found
39+
</div>
40+
) : (
41+
<div
42+
style={{
43+
maxHeight: tableHeight,
44+
overflowY: 'auto',
45+
overflowX: 'auto',
46+
padding: 2,
47+
}}
48+
>
49+
<ReportTable<MigrationIssue>
50+
data={errors}
51+
columns={['Description', 'Total']}
52+
fields={['assessment', 'count']}
53+
withoutBorder
54+
caption="Virtual machine validations"
55+
/>
56+
</div>
57+
)}
4558
</CardBody>
4659
</Card>
4760
);

0 commit comments

Comments
 (0)