Skip to content

Commit b982e53

Browse files
a110605innobead
authored andcommitted
fix: lowercase options name in volume page
Signed-off-by: andy.lee <[email protected]>
1 parent 40772f2 commit b982e53

File tree

4 files changed

+34
-34
lines changed

4 files changed

+34
-34
lines changed

src/routes/volume/CreateVolume.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -487,45 +487,45 @@ const modal = ({
487487
{getFieldDecorator('unmapMarkSnapChainRemoved', {
488488
initialValue: 'ignored',
489489
})(<Select>
490-
<Option key={'enabled'} value={'enabled'}>Enabled</Option>
491-
<Option key={'disabled'} value={'disabled'}>Disabled</Option>
492-
<Option key={'ignored'} value={'ignored'}>Ignored (Follow the global setting)</Option>
490+
<Option key={'enabled'} value={'enabled'}>enabled</Option>
491+
<Option key={'disabled'} value={'disabled'}>disabled</Option>
492+
<Option key={'ignored'} value={'ignored'}>ignored (follow the global setting)</Option>
493493
</Select>)}
494494
</FormItem>
495495
<FormItem label="Replica Soft Anti Affinity" hasFeedback {...formItemLayoutForAdvanced}>
496496
{getFieldDecorator('replicaSoftAntiAffinity', {
497497
initialValue: 'ignored',
498498
})(<Select>
499-
<Option key={'enabled'} value={'enabled'}>Enabled</Option>
500-
<Option key={'disabled'} value={'disabled'}>Disabled</Option>
501-
<Option key={'ignored'} value={'ignored'}>Ignored (Follow the global setting)</Option>
499+
<Option key={'enabled'} value={'enabled'}>enabled</Option>
500+
<Option key={'disabled'} value={'disabled'}>disabled</Option>
501+
<Option key={'ignored'} value={'ignored'}>ignored (follow the global setting)</Option>
502502
</Select>)}
503503
</FormItem>
504504
<FormItem label="Replica Zone Soft Anti Affinity" hasFeedback {...formItemLayoutForAdvanced}>
505505
{getFieldDecorator('replicaZoneSoftAntiAffinity', {
506506
initialValue: 'ignored',
507507
})(<Select>
508-
<Option key={'enabled'} value={'enabled'}>Enabled</Option>
509-
<Option key={'disabled'} value={'disabled'}>Disabled</Option>
510-
<Option key={'ignored'} value={'ignored'}>Ignored (Follow the global setting)</Option>
508+
<Option key={'enabled'} value={'enabled'}>enabled</Option>
509+
<Option key={'disabled'} value={'disabled'}>disabled</Option>
510+
<Option key={'ignored'} value={'ignored'}>ignored (follow the global setting)</Option>
511511
</Select>)}
512512
</FormItem>
513513
<FormItem label="Replica Disk Soft Anti Affinity" hasFeedback {...formItemLayoutForAdvanced}>
514514
{getFieldDecorator('replicaDiskSoftAntiAffinity', {
515515
initialValue: 'ignored',
516516
})(<Select>
517-
<Option key={'enabled'} value={'enabled'}>Enabled</Option>
518-
<Option key={'disabled'} value={'disabled'}>Disabled</Option>
519-
<Option key={'ignored'} value={'ignored'}>Ignored (Follow the global setting)</Option>
517+
<Option key={'enabled'} value={'enabled'}>enabled</Option>
518+
<Option key={'disabled'} value={'disabled'}>disabled</Option>
519+
<Option key={'ignored'} value={'ignored'}>ignored (follow the global setting)</Option>
520520
</Select>)}
521521
</FormItem>
522522
<FormItem label="Freeze Filesystem For Snapshot" hasFeedback {...formItemLayoutForAdvanced}>
523523
{getFieldDecorator('freezeFilesystemForSnapshot', {
524524
initialValue: 'ignored',
525525
})(<Select>
526-
<Option key={'enabled'} value={'enabled'}>Enabled</Option>
527-
<Option key={'disabled'} value={'disabled'}>Disabled</Option>
528-
<Option key={'ignored'} value={'ignored'}>Ignored (Follow the global setting)</Option>
526+
<Option key={'enabled'} value={'enabled'}>enabled</Option>
527+
<Option key={'disabled'} value={'disabled'}>disabled</Option>
528+
<Option key={'ignored'} value={'ignored'}>ignored (follow the global setting)</Option>
529529
</Select>)}
530530
</FormItem>
531531
<FormItem label="Disable Revision Counter" {...formItemLayoutForAdvanced}>

src/routes/volume/detail/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ function VolumeDetail({ snapshotModal, dispatch, backup, engineimage, eventlog,
172172
const defaultDataLocalityOption = defaultDataLocalitySetting?.definition?.options || []
173173
const defaultDataLocalityValue = defaultDataLocalitySetting?.value || 'disabled'
174174

175-
const defaultSnapshotDataIntegrityOption = defaultSnapshotDataIntegritySetting?.definition?.options.map((item) => ({ key: item.firstUpperCase(), value: item })) || []
175+
const defaultSnapshotDataIntegrityOption = defaultSnapshotDataIntegritySetting?.definition?.options.map((item) => ({ key: item.toLowerCase(), value: item })) || []
176176

177177
if (defaultSnapshotDataIntegrityOption.length > 0) {
178-
defaultSnapshotDataIntegrityOption.unshift({ key: 'Ignored (Follow the global setting)', value: 'ignored' })
178+
defaultSnapshotDataIntegrityOption.unshift({ key: 'ignored (follow the global setting)', value: 'ignored' })
179179
}
180180

181181
const v1DataEngineEnabledSetting = settings.find(s => s.id === 'v1-data-engine')

src/routes/volume/helper/index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ export function getUpdateDataLocalityModalProps(volume, visible, defaultDataLoca
241241

242242
export function getUnmapMarkSnapChainRemovedModalProps(volume, visible, dispatch) {
243243
let option = [
244-
{ key: 'Enabled', value: 'enabled' },
245-
{ key: 'Disabled', value: 'disabled' },
246-
{ key: 'Ignored (Follow the global setting)', value: 'ignored' },
244+
{ key: 'enabled', value: 'enabled' },
245+
{ key: 'disabled', value: 'disabled' },
246+
{ key: 'ignored (follow the global setting)', value: 'ignored' },
247247
]
248248

249249
return {
@@ -305,9 +305,9 @@ export function getUpdateSnapshotDataIntegrityProps(volume, visible, defaultSnap
305305

306306
export function getBulkUnmapMarkSnapChainRemovedModalProps(volumes, visible, dispatch) {
307307
let option = [
308-
{ key: 'Enabled', value: 'enabled' },
309-
{ key: 'Disabled', value: 'disabled' },
310-
{ key: 'Ignored (Follow the global setting)', value: 'ignored' },
308+
{ key: 'enabled', value: 'enabled' },
309+
{ key: 'disabled', value: 'disabled' },
310+
{ key: 'ignored (follow the global setting)', value: 'ignored' },
311311
]
312312

313313
return {
@@ -401,9 +401,9 @@ export function getUpdateBulkDataLocalityModalProps(volumes, visible, defaultDat
401401

402402
export function getUpdateFreezeFilesystemForSnapshotModalProps(volume, visible, dispatch) {
403403
let option = [
404-
{ key: 'Enabled', value: 'enabled' },
405-
{ key: 'Disabled', value: 'disabled' },
406-
{ key: 'Ignored (Follow the global setting)', value: 'ignored' },
404+
{ key: 'enabled', value: 'enabled' },
405+
{ key: 'disabled', value: 'disabled' },
406+
{ key: 'ignored (follow the global setting)', value: 'ignored' },
407407
]
408408

409409
return {
@@ -433,9 +433,9 @@ export function getUpdateFreezeFilesystemForSnapshotModalProps(volume, visible,
433433

434434
export function getUpdateBulkFreezeFilesystemForSnapshotModalProps(volumes, visible, dispatch) {
435435
const option = [
436-
{ key: 'Enabled', value: 'enabled' },
437-
{ key: 'Disabled', value: 'disabled' },
438-
{ key: 'Ignored (Follow the global setting)', value: 'ignored' },
436+
{ key: 'enabled', value: 'enabled' },
437+
{ key: 'disabled', value: 'disabled' },
438+
{ key: 'ignored (follow the global setting)', value: 'ignored' },
439439
]
440440

441441
return {
@@ -613,9 +613,9 @@ export function getUpdateReplicaSoftAntiAffinityModalProps(volume, volumes, upda
613613
})
614614
},
615615
options: [
616-
{ value: 'enabled', label: 'Enabled' },
617-
{ value: 'disabled', label: 'Disabled' },
618-
{ value: 'ignored', label: 'Ignored (Follow the global setting)' },
616+
{ value: 'enabled', label: 'enabled' },
617+
{ value: 'disabled', label: 'disabled' },
618+
{ value: 'ignored', label: 'ignored (follow the global setting)' },
619619
],
620620
fields,
621621
}

src/routes/volume/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ class Volume extends React.Component {
231231
const defaultDataLocalityOption = defaultDataLocalitySetting?.definition?.options || []
232232
const defaultDataLocalityValue = defaultDataLocalitySetting?.value || 'disabled'
233233
const defaultRevisionCounterValue = defaultRevisionCounterSetting?.value === 'true'
234-
const defaultSnapshotDataIntegrityOption = defaultSnapshotDataIntegritySetting?.definition?.options.map((item) => ({ key: item.firstUpperCase(), value: item })) || []
234+
const defaultSnapshotDataIntegrityOption = defaultSnapshotDataIntegritySetting?.definition?.options.map((item) => ({ key: item.toLowerCase(), value: item })) || []
235235
if (defaultSnapshotDataIntegrityOption.length > 0) {
236-
defaultSnapshotDataIntegrityOption.push({ key: 'Ignored (Follow the global setting)', value: 'ignored' })
236+
defaultSnapshotDataIntegrityOption.push({ key: 'ignored (follow the global setting)', value: 'ignored' })
237237
}
238238

239239
const backingImageOptions = backingImages?.filter(image => hasReadyBackingDisk(image)) || []

0 commit comments

Comments
 (0)