Skip to content

Commit

Permalink
Merge branch 'master' into fix-bug--OCP-custom-version-button-is-at-t…
Browse files Browse the repository at this point in the history
…he-bottom-of-the-dropbox
  • Loading branch information
ElayAharoni authored Feb 24, 2025
2 parents 449a6b9 + ba0292b commit 0e2cf4e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
43 changes: 25 additions & 18 deletions libs/ui-lib/lib/common/components/storage/DisksTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,10 @@ const DisksTable = ({
.sort((a, b) => {
const aVal = (a.holders || a.name) as string;
const bVal = (b.holders || b.name) as string;

return aVal?.localeCompare(bVal) || 0;
})
.map((disk, index) => ({
cells: [
.map((disk, index) => {
const rowCells = [
{
title: (
<DiskName
Expand All @@ -180,27 +179,34 @@ const DisksTable = ({
props: { 'data-testid': 'disk-role' },
},
{ title: <DiskLimitations disk={disk} />, props: { 'data-testid': 'disk-limitations' } },
isEditable && {
title: (
<FormatDiskCheckbox
host={host}
diskId={disk.id}
installationDiskId={installationDiskId}
index={index}
updateDiskSkipFormatting={updateDiskSkipFormatting}
/>
),
props: { 'data-testid': 'disk-formatted' },
},
isEditable
? {
title: (
<FormatDiskCheckbox
host={host}
diskId={disk.id}
installationDiskId={installationDiskId}
index={index}
updateDiskSkipFormatting={updateDiskSkipFormatting}
/>
),
props: { 'data-testid': 'disk-formatted' },
}
: null,
{ title: disk.driveType, props: { 'data-testid': 'drive-type' } },
{ title: fileSize(disk.sizeBytes || 0, 2, 'si'), props: { 'data-testid': 'disk-size' } },
{ title: disk.serial, props: { 'data-testid': 'disk-serial' } },
{ title: disk.model, props: { 'data-testid': 'disk-model' } },
{ title: disk.wwn, props: { 'data-testid': 'disk-wwn' } },
],
key: disk.path,
})) as { key: string; cells: { title: string | React.ReactNode; props: object }[] }[];
].filter(Boolean); // Remove null values to keep alignment

return { key: disk.path, cells: rowCells } as {
key: string;
cells: { title: string | React.ReactNode; props: object }[];
};
});
// eslint-disable-next-line no-console
console.log(rows);
return (
<Table data-testid={testId} variant={TableVariant.compact} aria-label="Host's disks table">
<Thead>
Expand All @@ -212,6 +218,7 @@ const DisksTable = ({
</Thead>
<Tbody>
{rows.map((row, i) => (
// eslint-disable-next-line no-console
<Tr key={`disk-row-${row.key}`} data-testid={`disk-row-${row.key}`}>
{row.cells.map((cell, j) => (
<Td key={`cell-${i}-${j}`} {...cell.props}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const operatorComponentMap: Record<string, (props: OperatorProps) => JSX.
'openshift-ai': (props) => <OpenShiftAICheckbox {...props} />,
osc: (props) => <OscCheckbox {...props} />,
lso: (props) => <LsoCheckbox {...props} />,
'node-feature-discovery': () => <NodeFeatureDiscoveryCheckbox />,
'node-feature-discovery': (props) => <NodeFeatureDiscoveryCheckbox {...props} />,
nmstate: (props) => <NmstateCheckbox {...props} />,
serverless: (props) => <ServerlessCheckbox {...props} />,
authorino: (props) => <AuthorinoCheckbox {...props} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const getExpandedHostComponent = (protocolType: StaticProtocolType) => {
/>{' '}
<OcmInputField
name={`${fieldName}.bondSecondaryInterface`}
label="Port 2 MAC Adddress"
label="Port 2 MAC Address"
data-testid={`bond-secondary-interface-${hostIdx}`}
isRequired
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
'osc-requirements-satisfied',
],
},
softValidationIds: ['no-skip-installation-disk', 'no-skip-missing-disk'],
softValidationIds: ['no-skip-installation-disk', 'no-skip-missing-disk', 'compatible-agent'],
};

const storageStepValidationsMap: WizardStepValidationMap = {
Expand Down

0 comments on commit 0e2cf4e

Please sign in to comment.