Skip to content

Commit

Permalink
Remove offline rebuilding alert
Browse files Browse the repository at this point in the history
Signed-off-by: andy.lee <andy.lee@suse.com>
  • Loading branch information
a110605 committed Jul 29, 2024
1 parent a2b2b3a commit e92a259
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
16 changes: 0 additions & 16 deletions src/routes/volume/detail/VolumeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {
needToWaitDone,
frontends,
extractImageVersion,
getOfflineRebuiltStatus,
getOfflineRebuiltStatusWithoutFrontend,
} from '../helper/index'
import styles from './VolumeInfo.less'
import { diskTagColor, nodeTagColor } from '../../../utils/constants'
Expand Down Expand Up @@ -210,20 +208,6 @@ function VolumeInfo({ selectedVolume, snapshotModalState, engineImages, hosts, c
return (
<div>
{errorMsg}
{getOfflineRebuiltStatus(selectedVolume) && <Alert
style={{ marginTop: 5 }}
message="Offline Rebuilding"
description="The volume is being offline rebuilding"
type="warning"
showIcon
/>}
{getOfflineRebuiltStatusWithoutFrontend(selectedVolume) && <Alert
style={{ marginTop: 5 }}
message="Offline Rebuilding"
description={selectedVolume.offlineReplicaRebuildingRequired ? 'The volume rebuilding will be automatically triggered after detachment' : 'Offline Replica Rebuilding is disabled, the volume rebuilding will not be automatically triggered after detachment'}
type="warning"
showIcon
/>}
{restoreProgress}
<div className={styles.row}>
<span className={styles.label}> State:</span>
Expand Down
8 changes: 0 additions & 8 deletions src/routes/volume/helper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,6 @@ export function needToWaitDone(state, replicas) {
return state === '' || state.endsWith('ing') || replicas.findIndex(item => item.mode.toLowerCase() === 'wo') > -1
}

export function getOfflineRebuiltStatus(volume) {
return volume.disableFrontend && volume.dataEngine === 'v2' && volume.offlineReplicaRebuildingRequired && volume.state === 'attached'
}

export function getOfflineRebuiltStatusWithoutFrontend(volume) {
return !volume.disableFrontend && volume.dataEngine === 'v2' && volume.state === 'attached' && volume.robustness === 'degraded'
}

export const frontends = [
{ label: 'Block Device', value: 'blockdev' },
{ label: 'iSCSI', value: 'iscsi' },
Expand Down

0 comments on commit e92a259

Please sign in to comment.