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
Bug 1916888: Modifying OCS wizard Donor chart based on selected device type #7924
Bug 1916888: Modifying OCS wizard Donor chart based on selected device type #7924
Conversation
@Jayashree-panda: This pull request references Bugzilla bug 1916888, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @Jayashree-panda. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@Jayashree-panda: This pull request references Bugzilla bug 1916888, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@afreen23: This pull request references Bugzilla bug 1916888, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@afreen23: This pull request references Bugzilla bug 1916888, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
LGTM |
@@ -16,7 +16,7 @@ export const initialState: State = { | |||
showNodesListOnLVS: false, | |||
diskType: 'All', | |||
diskMode: diskModeDropdownItems.BLOCK, | |||
deviceType: [], | |||
deviceType: ['Disk', 'Part'], |
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.
Use the deviceTypeDropdownItems
deviceType: ['Disk', 'Part'], | |
deviceType: [deviceTypeDropdownItems.DISK, deviceTypeDropdownItems.PART], |
`
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.
@afreen23 Sure. Will do it.
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.
This is to ensure that the changes remain consistent all over in case of modifications
0dbb0d6
to
3b94e72
Compare
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 more, then good to go.
const hasDeviceType: boolean = state.deviceType.includes( | ||
deviceTypeDropdownItems[disk.type.toUpperCase()], |
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.
Now when we are storing the values , we can just go with disk.type
const hasDeviceType: boolean = state.deviceType.includes( | |
deviceTypeDropdownItems[disk.type.toUpperCase()], | |
const hasDeviceType: boolean = state.deviceType.includes(disk.type) |
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.
disk.type has values that are populated using LSO CR, The values are 'part' or 'disk' (small case) and state.deviceType has ['Disk', 'Part'],
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.
Okay, I see the dropdown options are getting set only.
In that case this is good in place for now.
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.
can you attach a screenshot with and without filter & how it behaves?
const hasDeviceType: boolean = state.deviceType.includes( | ||
deviceTypeDropdownItems[disk.type.toUpperCase()], | ||
); |
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.
shouldn't this will work?
const hasDeviceType: boolean = state.deviceType.includes( | |
deviceTypeDropdownItems[disk.type.toUpperCase()], | |
); | |
const hasDeviceType: boolean = state.deviceType.includes(disk.type.toUpperCase()); |
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.
state.deviceType array has values ['Disk', 'Part'], So disk.type.toUpperCase() wont match('DISK' or 'PART')
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.
It will if you see this change.
https://github.com/openshift/console/pull/7924/files#diff-0b015994d7f949840588912fb313db689a1c818fd5a54eab6804e2cfaf8326f1R20
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 value deviceTypeDropdownItems.DISK or deviceTypeDropdownItems.PART is 'Disk' / 'Part' only.
export const deviceTypeDropdownItems = Object.freeze({
DISK: 'Disk',
PART: 'Part',
});
if (isValidSize && hasDiskType && hasDeviceType) { | ||
return true; | ||
} |
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.
if (isValidSize && hasDiskType && hasDeviceType) { | |
return true; | |
} | |
return (isValidSize && hasDiskType && hasDeviceType); |
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 ofcourse. I am making the changes.
3b94e72
to
9c9aef4
Compare
have you verified that only those disks/part are used for storage cluster creation not the other ones? |
What are the other ones you are talking about? Do you mean the other filters like diskType, diskMode etc. ? |
Sure. I am looking on it. Thanks
…On Thu, Jan 28, 2021 at 9:24 AM Afreen Rahman ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In
frontend/packages/ceph-storage-plugin/src/components/ocs-install/attached-devices/create-sc/state.ts
<#7924 (comment)>:
> @@ -16,7 +17,7 @@ export const initialState: State = {
showNodesListOnLVS: false,
diskType: 'All',
diskMode: diskModeDropdownItems.BLOCK,
- deviceType: [],
+ deviceType: [deviceTypeDropdownItems.DISK, deviceTypeDropdownItems.PART],
Use this object instead.
https://github.com/openshift/console/blob/ef18881cf0cf1b640a631c9ddc6f2f979309ca67/frontend/packages/local-storage-operator-plugin/src/components/local-volume-set/types.ts#L12-L15
------------------------------
In
frontend/packages/ceph-storage-plugin/src/components/ocs-install/attached-devices/create-sc/wizard-pages/donut-chart.tsx
<#7924 (comment)>:
> + const hasDeviceType: boolean = state.deviceType.includes(
+ deviceTypeDropdownItems[disk.type.toUpperCase()],
Ah! the object is not helpful here, its for dropdown only.
We shall use this one in default state and then it should be fine.
https://github.com/openshift/console/blob/ef18881cf0cf1b640a631c9ddc6f2f979309ca67/frontend/packages/local-storage-operator-plugin/src/components/local-volume-set/types.ts#L12-L15
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7924 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH6RVLEEXCLPOMZADOPFW6TS4DNYLANCNFSM4WSYVO3A>
.
|
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.
lgtm
I would discard that now, since it would require chnages at other places too.
|
@cloudbehl The change is meant for the donut chart filter only, the cluster creation remains intact. |
RIght, but whatever filter is selected only those disks should be provisioned as PV. So wanted to make sure that we tested it and it's working as expected. |
@cloudbehl Sure. I will be attaching the screenshots once done with testing. |
/ok-to-test |
/test backend |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, cloudbehl, Jayashree-panda 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 |
@Jayashree-panda: All pull requests linked via external trackers have merged: Bugzilla bug 1916888 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
No description provided.