fix: reset filesystem (#559)

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
Yiya Chen 2025-10-17 12:15:58 +08:00 committed by GitHub
parent cd128d0444
commit f22644e058
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@ import LabelValue from '@shell/components/LabelValue';
import { BadgeState } from '@components/BadgeState'; import { BadgeState } from '@components/BadgeState';
import { Banner } from '@components/Banner'; import { Banner } from '@components/Banner';
import LabeledSelect from '@shell/components/form/LabeledSelect'; import LabeledSelect from '@shell/components/form/LabeledSelect';
import { RadioGroup, RadioButton } from '@components/Form/Radio'; import { RadioGroup } from '@components/Form/Radio';
import HarvesterDisk from '../../mixins/harvester-disk'; import HarvesterDisk from '../../mixins/harvester-disk';
import Tags from '../../components/DiskTags'; import Tags from '../../components/DiskTags';
import { HCI } from '../../types'; import { HCI } from '../../types';
@ -30,7 +30,6 @@ export default {
BadgeState, BadgeState,
Banner, Banner,
RadioGroup, RadioGroup,
RadioButton,
ModalWithCard, ModalWithCard,
Tags, Tags,
}, },
@ -184,12 +183,11 @@ export default {
}, },
forceFormattedDisabled() { forceFormattedDisabled() {
const lastFormattedAt = this.blockDevice?.status?.deviceStatus?.fileSystem?.LastFormattedAt;
const fileSystem = this.blockDevice?.status?.deviceStatus?.fileSystem.type; const fileSystem = this.blockDevice?.status?.deviceStatus?.fileSystem.type;
const systems = ['ext4', 'XFS']; const systems = ['ext4', 'XFS'];
if (lastFormattedAt || this.blockDevice?.childParts?.length > 0) { if (this.blockDevice?.childParts?.length > 0) {
return true; return true;
} else if (systems.includes(fileSystem)) { } else if (systems.includes(fileSystem)) {
return false; return false;
@ -446,7 +444,7 @@ export default {
/> />
</div> </div>
<div <div
v-if="(value.isNew && isLonghornV1 && !isFormatted) || isCorrupted" v-if="(value.isNew && isLonghornV1) || isCorrupted"
class="col span-6" class="col span-6"
> >
<RadioGroup <RadioGroup
@ -459,15 +457,6 @@ export default {
:disabled="forceFormattedDisabled" :disabled="forceFormattedDisabled"
tooltip-key="harvester.host.disk.forceFormatted.toolTip" tooltip-key="harvester.host.disk.forceFormatted.toolTip"
> >
<template #1="{option, listeners}">
<RadioButton
:label="option.label"
:val="option.value"
:value="value.forceFormatted"
:disabled="forceFormattedDisabled && !value.forceFormatted"
v-on="listeners"
/>
</template>
</RadioGroup> </RadioGroup>
</div> </div>
<div <div