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 2000935: add volume mode selection in storage creation #9971
Bug 2000935: add volume mode selection in storage creation #9971
Conversation
Hi @shdn-ibm. 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. |
...orage-plugin/src/components/create-storage-system/external-storage/ibm-flashsystem/index.tsx
Show resolved
Hide resolved
@@ -89,6 +103,18 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash | |||
isRequired | |||
/> | |||
</FormGroup> | |||
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volmode-input"> |
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.
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volmode-input"> | |
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volume-mode-input"> |
const volModeOptions = volModeList.map((mode) => { | ||
return <SelectOption key={mode} value={mode} />; | ||
}); |
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 volModeOptions = volModeList.map((mode) => { | |
return <SelectOption key={mode} value={mode} />; | |
}); | |
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />; |
@@ -31,6 +33,18 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash | |||
: setEndpointValid(ValidatedOptions.error); | |||
}; | |||
|
|||
const volModeList = ['thick', 'thin']; |
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 volModeList = ['thick', 'thin']; | |
const VOLUME_MODES = ['thick', 'thin']; |
Define it outside the component
const volModeOptions = volModeList.map((mode) => { | ||
return <SelectOption key={mode} value={mode} />; | ||
}); | ||
const [isOpen, setIsOpen] = React.useState(false); |
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.
Move it above with rest of the hooks.
Hooks should always be at the top
const onToggle = () => setIsOpen(!isOpen); | ||
const onModeSelect = (event, value) => { |
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.
Add a space
const onToggle = () => setIsOpen(!isOpen); | |
const onModeSelect = (event, value) => { | |
const onToggle = () => setIsOpen(!isOpen); | |
const onModeSelect = (event, value) => { |
@@ -37,4 +37,5 @@ export type FlashSystemState = { | |||
password: string; | |||
endpoint: string; | |||
poolname: string; | |||
volmode?: string; |
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.
volmode?: string; | |
volmode: string; |
state should not have optional types
/ok-to-test |
9869b1b
to
36c800d
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.
Just some minors
@@ -31,6 +34,16 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash | |||
: setEndpointValid(ValidatedOptions.error); | |||
}; | |||
|
|||
const VOLUME_MODES = ['thick', 'thin']; |
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.
define this outside the component
isDisabled={false} | ||
placeholderText={VOLUME_MODES[0]} | ||
> | ||
{volModeOptions} |
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.
{volModeOptions} | |
{VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />)} |
@@ -31,6 +34,16 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash | |||
: setEndpointValid(ValidatedOptions.error); | |||
}; | |||
|
|||
const VOLUME_MODES = ['thick', 'thin']; | |||
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />); |
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 volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />); | |
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />); |
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />); |
36c800d
to
c0a07ca
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.
/lgtm
@@ -89,6 +105,21 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash | |||
isRequired | |||
/> | |||
</FormGroup> | |||
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volume-mode-input"> |
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.
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volume-mode-input"> | |
<FormGroup label={t('ceph-storage-plugin~Volume mode')} fieldId="volume-mode-input"> |
/retitle Bug 2000935: add volume mode selection in storage creation |
@shdn-ibm: This pull request references Bugzilla bug 2000935, 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
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (ratamir@redhat.com), skipping review request. 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. |
ff21c58
to
f55aeeb
Compare
fix: add volume mode selection Update index.tsx
update string Update ceph-storage-plugin.json
f55aeeb
to
ed620d7
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, SanjalKatiyar, shdn-ibm 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 |
/retest |
@shdn-ibm: All pull requests linked via external trackers have merged: Bugzilla bug 2000935 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. |
add a volume mode selection, to provide an option to use thin or thick volume
default setting is thick mode