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

Add StorageClass input to 'Add bootable Volume' modal #1016

Merged

Conversation

avivtur
Copy link
Member

@avivtur avivtur commented Jan 11, 2023

Signed-off-by: Aviv Turgeman aturgema@redhat.com

📝 Description

Main goal:

  • Adding Storage class dropdown to Add bootable Volume modal under upload image form only
    After:
    sc-input

  • Making the form submit to create a DS on point at existing PVC or at the cloned PVC or uploaded disk
    Side goals:

  • Add disk modal was not working
    Before:
    cant-create-disk

  • Storage class dropdown taking the default SC as value automatically on the first load, either if we already have a previous value or not, which is incorrect (should simply take an existing value from YAML file if exists or stay empty if not selected)
    Before:
    https://user-images.githubusercontent.com/67270715/211790070-f496c6f4-c339-48a3-9f05-b31d90fdcffa.mp4

🎥 Demo

Disk modal is now able to create a disk without enforcing any value from the UI and still get to proper default SC by the backend. (not included in video/screenshot but hotplug disk creation was having same issues which now are resolved)

default-already-selected-after.mp4

@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label Jan 11, 2023
@pcbailey
Copy link
Member

Looks good to me, but I'd like to have someone else review it as well since it's used in multiple places and I don't have that much direct experience with this area of the code.

@@ -16,12 +16,14 @@ import CapacityInput from '@kubevirt-utils/components/CapacityInput/CapacityInpu
import { removeByteSuffix } from '@kubevirt-utils/components/CapacityInput/utils';
Copy link
Member

Choose a reason for hiding this comment

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

i think that some functions can be extracted to utiil? what do u think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree with that, I think this PR is already quite big so maybe can you name which functions other than this one you had in mind and I'll create a separate PR for moving them to utils, wdyt?

Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
@avivtur
Copy link
Member Author

avivtur commented Jan 15, 2023

/retest

<FilterSelect
selected={labels?.[DEFAULT_PREFERENCE_LABEL]}
setSelected={setBootableVolumeField('labels', DEFAULT_PREFERENCE_LABEL)}
options={preferencesNames}
optionLabelText={t('Preference')}
/>
</FormGroup>
<FormGroup label={t('Preferred Instancetype')}>
<FormGroup label={t('Instancetypes')} isRequired>
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be 'InstanceTypes'?

Copy link
Member Author

Choose a reason for hiding this comment

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

well the kind of the resource is Instancetype so I just made it plural, I wouldn't waste any time about naming for now as the names of everything can easily be changed (it's currently under discussion as Ronen and Yifat told me in the last sync meeting :) )

@pcbailey
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label Jan 16, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avivtur, pcbailey

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

@openshift-merge-robot openshift-merge-robot merged commit d6c9ea7 into kubevirt-ui:main Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This issue is something we want to fix lgtm Passed code review, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants