Skip to content

Commit

Permalink
Update some wordings by feedback
Browse files Browse the repository at this point in the history
Signed-off-by: andy.lee <andy.lee@suse.com>
  • Loading branch information
a110605 authored and derekbit committed Jul 15, 2024
1 parent 95871b4 commit 05041a4
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
14 changes: 11 additions & 3 deletions src/components/Snapshot/Snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,17 @@ function SnapshotIcon(props, snapshotProps) {
</div>}><div className="disable-dropdown-menu">Revert</div></Tooltip> }
</Menu.Item> : ''
}
{ props.usercreated && !snapshotObject.removed ? <Menu.Item key="snapshotBackup" className="revert-menu-item">
{ !snapshotProps.disableBackup ? <div style={{ padding: '0px 12px' }}>Backup</div> : <Tooltip title={snapshotProps.disableBackupMessage}><div className="disable-dropdown-menu">Backup</div></Tooltip>}
</Menu.Item> : ''
{ props.usercreated && !snapshotObject.removed ? (
<Menu.Item key="snapshotBackup" className="revert-menu-item">
{ !snapshotProps.disableBackup ? (
<div style={{ padding: '0px 12px' }}>Back Up</div>
) : (
<Tooltip title={snapshotProps.disableBackupMessage}>
<div className="disable-dropdown-menu">Back up</div>
</Tooltip>
)}
</Menu.Item>
) : ''
}
<Menu.Item key="cloneVolumeFromSnapshot">
<div style={{ padding: '0px 12px' }}>Clone Volume</div>
Expand Down
2 changes: 1 addition & 1 deletion src/models/backingImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default {
if (url) {
const resp = yield call(execAction, url)
if (resp && resp.status === 200) {
message.success(`Successfully backup ${payload.name} backing image`)
message.success(`Successfully back up ${payload.name} backing image`)
}
yield delay(1000)
yield put({ type: 'queryBackupBackingImage' })
Expand Down
2 changes: 1 addition & 1 deletion src/routes/backingImage/BackingImageActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function actions({ selected, backupProps, deleteBackingImage, downloadBackingIma

const availableActions = [
{ key: 'updateMinCopies', name: 'Update Minimum Copies Count', disabled: disableAction, tooltip: disableAction ? 'Missing disk with ready state' : '' },
{ key: 'backup', name: ' Backup', disabled: disableAction || backupTargetAvailable === false, tooltip: getBackupActionTooltip() },
{ key: 'backup', name: ' Back Up', disabled: disableAction || backupTargetAvailable === false, tooltip: getBackupActionTooltip() },
{ key: 'download', name: 'Download', disabled: disableAction, tooltip: disableAction ? 'Missing disk with ready state' : '' },
{ key: 'delete', name: 'Delete' },
]
Expand Down
2 changes: 1 addition & 1 deletion src/routes/backingImage/BackingImageBulkActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function bulkActions({ selectedRows, backupProps, deleteBackingImages, downloadS
const allActions = [
{ key: 'delete', name: 'Delete', disabled() { return selectedRows.length === 0 } },
{ key: 'download', name: 'Download', disabled() { return (selectedRows.length === 0 || selectedRows.every(row => !hasReadyBackingDisk(row))) } },
{ key: 'backup', name: 'Backup', disabled() { return selectedRows.length === 0 || backupTargetAvailable === false || selectedRows.every(row => !hasReadyBackingDisk(row)) } },
{ key: 'backup', name: 'Back Up', disabled() { return selectedRows.length === 0 || backupTargetAvailable === false || selectedRows.every(row => !hasReadyBackingDisk(row)) } },
]

return (
Expand Down
21 changes: 10 additions & 11 deletions src/routes/backingImage/RestoreBackupBackingImageModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const modal = ({
}

const modalOpts = {
title: `Restore ${item.name} Backup Backing Image`,
title: 'Restore Backing Image',
visible,
onCancel,
onOk: handleOk,
Expand All @@ -50,16 +50,15 @@ const modal = ({
return (
<ModalBlur {...modalOpts}>
<Form layout="horizontal">
<FormItem label="Secret" hasFeedback {...formItemLayout}>
{getFieldDecorator('secret', {
initialValue: '',
})(<Input />)}
</FormItem>
<FormItem label="Secret Namespace" hasFeedback {...formItemLayout}>
{getFieldDecorator('secretNamespace', {
initialValue: '',
})(<Input />)}
</FormItem>
<FormItem label="Backup" {...formItemLayout}>
{getFieldDecorator('backup', { initialValue: item?.name || '' })(<Input disabled />)}
</FormItem>
<FormItem label="Secret" hasFeedback {...formItemLayout}>
{getFieldDecorator('secret', { initialValue: '' })(<Input />)}
</FormItem>
<FormItem label="Secret Namespace" hasFeedback {...formItemLayout}>
{getFieldDecorator('secretNamespace', { initialValue: '' })(<Input />)}
</FormItem>
</Form>
</ModalBlur>
)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/backingImage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ class BackingImage extends React.Component {
</div>
<div className={style.backupBackingImageTitle}>
<Icon type="file-image" className="ant-breadcrumb anticon" style={{ display: 'flex', alignItems: 'center' }} />
<span style={{ marginLeft: '4px' }}>Backup Backing Image</span>
<span style={{ marginLeft: '4px' }}>Backing Image Backup</span>
</div>
<div id="backupBackingImageTable" style={{ height: '45%', padding: '8px 12px 0px' }}>
<Row gutter={24} style={{ marginBottom: 8 }}>
Expand Down

0 comments on commit 05041a4

Please sign in to comment.