Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide osd migration status alert for dr brownfield #1097

Conversation

TimothyAsirJeyasing
Copy link
Contributor

No description provided.

@TimothyAsirJeyasing
Copy link
Contributor Author

image

@TimothyAsirJeyasing
Copy link
Contributor Author

@GowthamShanmugam Please review

severity: 'passed',
},
};
documentationLink = 'www.google.com';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help me point the document link i should use ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simply use prod document of ODF DR section

@GowthamShanmugam
Copy link
Contributor

Please add screenshots

icon = GreenCheckCircleIcon;
}

return (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely don't want to make it a part of Alert.

Comment on lines 33 to 46
<div className="mco-alert-name-container">
{name && (
<span className="mco-status-card__alert-item-header">{name}</span>
)}
{onClose && (
<button
type="button"
onClick={onClose}
className="mco-close-button"
>
<CloseIcon />
</button>
)}
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is messing up with the alert card, can we keep this entire part are out of alert card?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets not touch alert cars, keep you status under alert card, Please discuss this with UX

Comment on lines 64 to 75
.mco-alert-name-container {
display: flex;
justify-content: space-between;
}

.mco-close-button {
background: none;
border: none;
cursor: pointer;
position: absolute;
left: 90%;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use patternfly components Flex and Button, you dont need these CSS

Comment on lines 1 to 6
.co-dashboard-migration-status {
border-top: var(--pf-global--BorderWidth--sm) solid var(--pf-global--BorderColor--100);
display: flex;
align-items: center;
justify-content: space-between;
}
Copy link
Contributor

@GowthamShanmugam GowthamShanmugam Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use <Divider />

Comment on lines 69 to 94
const getMigrationStatus = (data) => {
if (data && data.length > 0) {
const bluestoreCount =
data[0]?.status?.storage?.osd?.storeType?.['bluestore'];
const bluestoreRdrCount =
data[0]?.status?.storage?.osd?.storeType?.['bluestore-rdr'];

const isDisasterRecoveryTarget =
data[0]?.metadata?.annotations?.[DISASTER_RECOVERY_TARGET_ANNOTATION] ===
'true';

if (bluestoreCount > 0) {
if (bluestoreRdrCount > 0) {
return MigrationStatus.InProgress;
} else if (isDisasterRecoveryTarget) {
return MigrationStatus.InProgress;
} else {
return MigrationStatus.Pending;
}
} else if (bluestoreRdrCount > 0) {
return MigrationStatus.Completed;
}

return '';
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is also used in detail cards to trigger migration, keep one function and keep it in common place.

activeAt: currentDateTime,
state: AlertStates.Silenced,
annotations: {
description: `Cluster is undergoing OSDs migration. ${percentageComplete}% completed (${migratedDevices}/${totalOsd} remaining)`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate the text

description: `Cluster is undergoing OSDs migration. ${percentageComplete}% completed (${migratedDevices}/${totalOsd} remaining)`,
},
labels: {
alertname: 'Cluster OSDs are being migrated',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate the text

},
labels: {
alertname: 'Cluster OSDs are being migrated',
severity: 'current',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to translate the text?

state: AlertStates.Silenced,
annotations: {
description:
'OSDs migration is successful. Your cluster is ready for a regional DR setup.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate the text

'OSDs migration is successful. Your cluster is ready for a regional DR setup.',
},
labels: {
alertname: 'Cluster ready for Regional-DR setup',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate the text

},
labels: {
alertname: 'Cluster ready for Regional-DR setup',
severity: 'passed',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate the text

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep severity under enum

Comment on lines 211 to 219
<AlertsBody>
<CustomAlertItem
alert={migrationAlert as any}
documentationLink={documentationLink}
docHelperText={docHelperText}
onClose={handleAlertClose}
icon={icon}
/>
</AlertsBody>
Copy link
Contributor

@GowthamShanmugam GowthamShanmugam Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better keep this out of the alert card, use separate component

@@ -189,7 +289,7 @@ export const StatusCard: React.FC = () => {
</GalleryItem>
</Gallery>
</HealthBody>
<CephAlerts />
<CephAlerts data={data} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont keep this part of alert card

@GowthamShanmugam
Copy link
Contributor

GowthamShanmugam commented Nov 16, 2023

@TimothyAsirJeyasing Also, please check why the build is failing. And every PR in UI needs Unit testing and e2e testing.

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from e4fd09f to ca42c91 Compare November 20, 2023 11:29
@TimothyAsirJeyasing
Copy link
Contributor Author

image

@@ -33,6 +33,7 @@ import {
CardHeader,
CardTitle,
} from '@patternfly/react-core';
import CephClusterOSDMigrationStatus from '../../../modals/osd-migration/osd-migration-status';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import CephClusterOSDMigrationStatus from '../../../modals/osd-migration/osd-migration-status';
import {OSDMigrationStatus} from '../../../modals/osd-migration/osd-migration-status';

@@ -189,6 +190,7 @@ export const StatusCard: React.FC = () => {
</GalleryItem>
</Gallery>
</HealthBody>
<CephClusterOSDMigrationStatus data={data} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<CephClusterOSDMigrationStatus data={data} />
<OSDMigrationStatus data={cephDetails} />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OSD migration details are coming from data.storage.... Whereas cephDetails are pointing to data.status

import { InProgressIcon } from '@patternfly/react-icons';
import { OSDMigrationStatus, getOSDMigrationStatus } from '../../utils/ocs';

const CephClusterOSDMigrationStatus: React.FC<CephClusterOSDMigrationStatusProps> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const CephClusterOSDMigrationStatus: React.FC<CephClusterOSDMigrationStatusProps> =
const OSDMigrationStatus: React.FC<OSDMigrationStatusProps> =

const CephClusterOSDMigrationStatus: React.FC<CephClusterOSDMigrationStatusProps> =
({ data }) => {
const { t } = useCustomTranslation();
const osdMigrationStatus = getOSDMigrationStatus(data[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const osdMigrationStatus = getOSDMigrationStatus(data[0]);
const osdMigrationStatus = getOSDMigrationStatus(data);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to migrationStatus or status

const BLUESTORE_RDR = 'bluestore-rdr';
const BLUESTORE = 'bluestore';

export const getOSDMigrationStatus = (ceph: CephClusterKind) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const OSDMigrationModal: React.FC = ({ cephData }) => {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this inside utils folder under ocs.ts, And rename this function as getOSDMigrationStatus

Comment on lines 15 to 19
.mco-osd-migration-description {
display: flex;
flex-direction: column;
margin-left: 15px;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.mco-osd-migration-description {
display: flex;
flex-direction: column;
margin-left: 15px;
}
use <Flux> component


export default CephClusterOSDMigrationStatus;

type CephClusterOSDMigrationStatusProps = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type CephClusterOSDMigrationStatusProps = {
type OSDMigrationStatusProps = {

export default CephClusterOSDMigrationStatus;

type CephClusterOSDMigrationStatusProps = {
data?: K8sResourceKind[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data?: K8sResourceKind[];
data?: CephClusterKind;

);
};

export default CephClusterOSDMigrationStatus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export default CephClusterOSDMigrationStatus;

import { InProgressIcon } from '@patternfly/react-icons';
import { OSDMigrationStatus, getOSDMigrationStatus } from '../../utils/ocs';

const CephClusterOSDMigrationStatus: React.FC<CephClusterOSDMigrationStatusProps> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const CephClusterOSDMigrationStatus: React.FC<CephClusterOSDMigrationStatusProps> =
export const CephClusterOSDMigrationStatus: React.FC<CephClusterOSDMigrationStatusProps> =

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from ca42c91 to 5ef290c Compare November 21, 2023 08:13
@@ -189,6 +190,7 @@ export const StatusCard: React.FC = () => {
</GalleryItem>
</Gallery>
</HealthBody>
<OSDMigrationStatus data={data[0]} />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<OSDMigrationStatus data={data?.[0]}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -189,6 +190,7 @@ export const StatusCard: React.FC = () => {
</GalleryItem>
</Gallery>
</HealthBody>
<OSDMigrationStatus data={data[0]} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<OSDMigrationStatus data={data[0]} />
<OSDMigrationStatus data={data?.[0]} />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 8 to 10
.mco-osd-migration {
margin-left: 5px;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.mco-osd-migration {
margin-left: 5px;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,117 @@
import * as React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osd-migration-status.tsx is not a modal, dont keep this file inside a modal folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,117 @@
import * as React from 'react';
import { DOC_LINKS, ViewDocumentation } from '@odf/mco/utils';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't import anything from MCO. if you want to use doc_utils then move it to shared and refactor doc-utils.ts. Also, It should not have any info about MCO or ODF.

Comment on lines 11 to 18
import {
COMPLETED,
PENDING,
FAILED,
BLUESTORE,
BLUESTORE_RDR,
getOSDMigrationStatus,
} from '../../utils/osd-migration';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep these inside enum and move the enum to dataProtection.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

doclink={DOC_LINKS.APPLY_POLICY}
/>
{t(
` ${osdMigrationData.percentageComplete}% completed (${osdMigrationData.migratedDevices}/${osdMigrationData.totalOsd} remaining)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
` ${osdMigrationData.percentageComplete}% completed (${osdMigrationData.migratedDevices}/${osdMigrationData.totalOsd} remaining)`

This is not the right way to translate, please refer other places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

{migrationStatus === COMPLETED && (
<FlexItem>
<Button variant="plain" aria-label="Close" onClick={handleClose}>
<span aria-hidden>✕</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<span aria-hidden></span>

what is this X ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you are using a wrong patternfly component to implement this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use X icon

};

type OSDMigrationStatusProps = {
data?: CephClusterKind;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data?: CephClusterKind;
cephData?: CephClusterKind;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 5 to 8
export const IN_PROGRESS = 'In Progress';
export const PENDING = 'Pending';
export const COMPLETED = 'Completed';
export const FAILED = 'Failed';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert this status into Enum and move inside constant folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 9 to 10
export const BLUESTORE_RDR = 'bluestore-rdr';
export const BLUESTORE = 'bluestore';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move inside constant folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from 5ef290c to 092577f Compare November 23, 2023 08:52
import {
ViewDocumentation,
DOC_LINKS,
} from '../../../../../shared/src/doc/doc-utils';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} from '../../../../../shared/src/doc/doc-utils';
} from '@odf/shared/doc/doc-utils';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -1,3 +1,3 @@
export * from './disaster-recovery';
export * from './common';
export * from './doc-utils';
export * from '../../shared/src/doc/doc-utils';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export * from '../../shared/src/doc/doc-utils';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 34 to 42
const [migratedDevices, totalOsd, percentageComplete] = React.useMemo(
() => calculateOSDMigration(cephData),
[cephData]
);

const migrationStatus: string = React.useMemo(
() => getOSDMigrationStatus(cephData),
[cephData]
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const [migratedDevices, totalOsd, percentageComplete] = React.useMemo(
() => calculateOSDMigration(cephData),
[cephData]
);
const migrationStatus: string = React.useMemo(
() => getOSDMigrationStatus(cephData),
[cephData]
);
const migrationStatus: StatusType= React.useMemo(
() => ({
...calculateOSDMigration(cephData),
status: getOSDMigrationStatus(cephData)
})
[cephData]
);

you can do this inside one useMemo and return as a single object. Becuase when cephData changed, both the hooks will be triggered.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const StatusType = {
  migratedDevices: number;
  totalOsd: number;
  percentageComplete: number;
  status: OSD_Migration_Status;
};

};

type OSDMigrationStatusProps = {
cephData?: CephClusterKind;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cephData?: CephClusterKind;
cephData: CephClusterKind;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 4 to 9
export enum osdMigration {
IN_PROGRESS = 'In Progress',
PENDING = 'Pending',
COMPLETED = 'Completed',
FAILED = 'Failed',
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export enum osdMigration {
IN_PROGRESS = 'In Progress',
PENDING = 'Pending',
COMPLETED = 'Completed',
FAILED = 'Failed',
}
export enum OSD_MIGRATION_STATUS {
IN_PROGRESS = 'In Progress',
PENDING = 'Pending',
COMPLETED = 'Completed',
FAILED = 'Failed',
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done as per 1st PR review suggestion to this name

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from 092577f to 862c3ac Compare November 27, 2023 10:51
import { cleanup, render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import { MemoryRouter } from 'react-router-dom';
import * as migrationStatus from '../../../../utils/osd-migration';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import * as migrationStatus from '../../../../utils/osd-migration';
import { getOSDMigrationStatus } from '../../../../utils/osd-migration';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc-utils.ts has a lot of MCO and ACM-related constants, you have to move these to MCO constants. Shared component should be generic.

)}

{migrationStatus === OSDMigrationStatus.FAILED && (
<>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give some more light on this

/>
<ViewDocumentation
text={t('Setting up disaster recovery')}
doclink={DOC_LINKS.APPLY_POLICY}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we are using the apply policy document here? is this discussed with UX?

)}

{migrationStatus === OSDMigrationStatus.FAILED && (
<>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give some more light on this

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch 2 times, most recently from a0ebcb6 to d04b1f5 Compare November 28, 2023 07:11
Comment on lines 52 to 56
{[
OSDMigrationStatus.IN_PROGRESS,
OSDMigrationStatus.COMPLETED,
OSDMigrationStatus.FAILED,
].includes(migrationStatus as OSDMigrationStatus) && <Divider />}{' '}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are not displaying the divider only for the pending, then lets check !OSDMigrationStatus.PENDING.

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from d04b1f5 to e6bf1fb Compare November 28, 2023 10:20
};

return (
isMigrationStatusVisible && (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can users close pending and failed status as well ?? (isn't UX only allow it for completed status ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the close icon will be available only for complete status, so user will not have any close options for other status.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but that's not happening here, right ?
u are showing it for all statuses...

};

return (
isMigrationStatusVisible && (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will not work, what if I close dashboard and visit it again (FC will be un-mounted and mounted again), isMigrationStatusVisible will again be set to true and u will see both status and close button...

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from e6bf1fb to 64f24be Compare November 28, 2023 17:05
Comment on lines 49 to 58
React.useEffect(() => {
// If it's the initial mount and the status is COMPLETED, hide the migration status
if (
!isMigrationStatusVisible &&
migrationStatus === OSDMigrationStatus.COMPLETED
) {
return;
}
// For updates, trigger visibility
setIsMigrationStatusVisible(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did u test ur PR ?? this is not gonna make any difference to the original issue we discussed #1097 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can remove close button entirely (discussed with @GowthamShanmugam), need to be verified with UX (asap)...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now let's remove it and if needed to absolutely add it we can do so as a bug fix... no need to block this PR any longer...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, removed the button and updated

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch 2 times, most recently from 02d1b20 to b596ace Compare November 29, 2023 07:23
@SanjalKatiyar
Copy link
Collaborator

LGTM

return [migratedDevices, totalOsd, percentageComplete];
};

export const OSDMigration: React.FC<OSDMigrationStatusProps> = ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to match it with file name and props' type name...

Suggested change
export const OSDMigration: React.FC<OSDMigrationStatusProps> = ({
export const OSDMigrationStatus: React.FC<OSDMigrationStatusProps> = ({

Copy link
Contributor Author

@TimothyAsirJeyasing TimothyAsirJeyasing Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OSDMigrationStatus name used for "enum OSDMigrationStatus" in data-protection.ts and its used here, So any suggestion please ...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ? rename the enum or rename ur props' type/file name to match with the FC name...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

doclink: string;
text?: string;
padding?: string;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export from index file...

@@ -1,8 +1,9 @@
import * as React from 'react';
import { DOC_LINKS } from '@odf/mco/constants/doc';
import { ViewDocumentation } from '@odf/shared/utils/doc-utils';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ViewDocumentation } from '@odf/shared/utils/doc-utils';
import { ViewDocumentation } from '@odf/shared/utils';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -1,8 +1,9 @@
import * as React from 'react';
import { ViewDocumentation } from '@odf/shared/utils/doc-utils';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ViewDocumentation } from '@odf/shared/utils/doc-utils';
import { ViewDocumentation } from '@odf/shared/utils';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import { RedExclamationCircleIcon } from '@odf/shared/status/icons';
import { CephClusterKind } from '@odf/shared/types';
import { useCustomTranslation } from '@odf/shared/useCustomTranslationHook';
import { ViewDocumentation } from '@odf/shared/utils/doc-utils';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ViewDocumentation } from '@odf/shared/utils/doc-utils';
import { ViewDocumentation } from '@odf/shared/utils';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

export const BLUESTORE_RDR = 'bluestore-rdr';
export const BLUESTORE = 'bluestore';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz rename this file to data-protection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@TimothyAsirJeyasing TimothyAsirJeyasing force-pushed the brownfiled-migration-status-alert branch from b596ace to 50e0947 Compare November 30, 2023 08:32
@openshift-ci openshift-ci bot removed the lgtm label Nov 30, 2023
@SanjalKatiyar
Copy link
Collaborator

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented Nov 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GowthamShanmugam, SanjalKatiyar, TimothyAsirJeyasing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@SanjalKatiyar
Copy link
Collaborator

/test odf-console-e2e-aws

@openshift-merge-bot openshift-merge-bot bot merged commit 9b55fef into red-hat-storage:master Nov 30, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants