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
(feat): Add capacity and nodes step and review step to ODF wizard #9581
(feat): Add capacity and nodes step and review step to ODF wizard #9581
Conversation
<EnableTaintNodes | ||
enableTaint={state.enableTaint} | ||
setEnableTaint={() => | ||
dispatch({ type: ActionType.SET_ENABLE_TAINT, payload: !state.enableTaint }) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored taint component , so it can be utilized by ODF UI when required.
Tests are failing due to i18n . Will fix them with next round of reviews. |
); | ||
}; | ||
|
||
export const EnableTaintNodes: React.FC<EnableTaintNodesProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here as previous PR. It is a boolean, We could make use of Switch instead of a checkbox. Could take a look into this later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. its design related so I can only note it for now.
Thanks
nodeCount: nodes.length, | ||
count: nodes.length, | ||
})}{' '} | ||
{t('ceph-storage-plugin~selected ({{cpu}} CPU and {{memory}} on ', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see the totalcpu on the capacity and nodes page. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, did not update the names.
nodes: WizardState['capacityAndNodes']['nodes']; | ||
}; | ||
|
||
const SelectedCapacityAndNodes: React.FC<SelectedCapacityAndNodesProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const SelectedCapacityAndNodes: React.FC<SelectedCapacityAndNodesProps> = ({ | |
const SelectedCapacityAndNodesArbiter: React.FC<SelectedCapacityAndNodesProps> = ({ |
or
const SelectedCapacityAndNodes: React.FC<SelectedCapacityAndNodesProps> = ({ | |
const SelectedCapacityAndNodesNoProvisioner: React.FC<SelectedCapacityAndNodesProps> = ({ |
Both the components have very similiar names. We can name one something different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is Select
other is Selected
as per designs:
<TextContent> | ||
<Text component={TextVariants.small}> | ||
<Trans ns="ceph-storage-plugin"> | ||
The available capacity is based on all attached disks associated with the selected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it need to be externalised or does the Trans
do the same thing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, Trans is the translation component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.. i don't see this line in ceph-storage-plugin file which is why i asked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#9581 (comment)
Check now.
import { WizardNodeState, WizardState } from '../../reducer'; | ||
import './review-and-create-step.scss'; | ||
|
||
const NodesCard: React.FC<NodeCardProps> = ({ nodes }) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can reuse this card from frontend/packages/ceph-storage-plugin/src/components/ocs-install/install-wizard/review-and-create.tsx
, pass the classnames and improvise the state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using this here since soon ocs one will be deprecated. We should not waste effort in maintaining older code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
[AlertVariant.danger]: RedExclamationCircleIcon, | ||
}; | ||
|
||
export const ReviewListTitle: React.FC<ReviewListTitleProps> = ({ text }) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reuse from frontend/packages/ceph-storage-plugin/src/components/ocs-install/install-wizard/review-and-create.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The css is different and also we will remove storage cluster related code post 4.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
|
||
type ReviewListTitleProps = { text: string }; | ||
|
||
export const ReviewListBody: React.FC<ReviewListBodyProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reuse from frontend/packages/ceph-storage-plugin/src/components/ocs-install/install-wizard/review-and-create.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
); | ||
}; | ||
|
||
type ReviewListBodyProps = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of these variables can be reused from the other page
We need to revisit this later for refactoring the code structure. It has become very confusing to navigate. Lot of these components can be organised and repurposed for our case |
0f85677
to
461f64e
Compare
I think its simple navigation. You start from create step -> CapacityAndNodes => SelectedCapacityAndNodes and SelectCapacityAndNodes. Pleas specify which part is confusing ? I will make changes if it sounds valid. |
Ok. thanks for clearing it now . I was confused with why we have so many variants of same component. Basically n-1 issue. |
- implements https://issues.redhat.com/browse/ODFE-86 - implements https://issues.redhat.com/browse/ODFE-87 - merged the steps of attached-devices and internal mode previously in OCS - incorporated new UI changes for raw capacity Signed-off-by: Afreen Rahman <afrahman@redhat.com>
461f64e
to
73a63a3
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, vbnrh 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 |
implements https://issues.redhat.com/browse/ODFE-86
implements https://issues.redhat.com/browse/ODFE-87
merged the steps of attached-devices and internal mode previously in OCS
incorporated new UI changes for raw available capacity
Signed-off-by: Afreen Rahman afrahman@redhat.com