mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
Merge pull request #188 from harvester/mergify/bp/release-harvester-v1.5/pr-185
fix: allow set empty for backupVolumeSnapshotClassName in Setting csi-driver-config (backport #185)
This commit is contained in:
commit
afc3f0d87f
@ -75,7 +75,11 @@ export default {
|
||||
const csiDrivers = this.$store.getters[`${ inStore }/all`](CSI_DRIVER) || [];
|
||||
|
||||
return this.configArr.length >= csiDrivers.length;
|
||||
}
|
||||
},
|
||||
|
||||
allowEmptySnapshotClassNameFeatureEnabled() {
|
||||
return this.$store.getters['harvester-common/getFeatureEnabled']('allowEmptySnapshotClassName');
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -139,7 +143,7 @@ export default {
|
||||
errors.push(this.t('validation.required', { key: this.t('harvester.setting.csiDriverConfig.volumeSnapshotClassName') }, true));
|
||||
}
|
||||
|
||||
if (!config.value.backupVolumeSnapshotClassName) {
|
||||
if (!this.allowEmptySnapshotClassNameFeatureEnabled && !config.value.backupVolumeSnapshotClassName) {
|
||||
errors.push(this.t('validation.required', { key: this.t('harvester.setting.csiDriverConfig.backupVolumeSnapshotClassName') }, true));
|
||||
}
|
||||
});
|
||||
@ -162,6 +166,14 @@ export default {
|
||||
return driver === LONGHORN_DRIVER;
|
||||
},
|
||||
|
||||
isBackupVolumeSnapshotClassNameDisabled(driver) {
|
||||
return driver === LONGHORN_DRIVER || this.allowEmptySnapshotClassNameFeatureEnabled;
|
||||
},
|
||||
|
||||
isBackupVolumeSnapshotClassNameSelectable(driver) {
|
||||
return driver === LONGHORN_DRIVER;
|
||||
},
|
||||
|
||||
add() {
|
||||
this.configArr.push({
|
||||
key: '',
|
||||
@ -227,9 +239,10 @@ export default {
|
||||
v-model:value="driver.value.backupVolumeSnapshotClassName"
|
||||
:mode="mode"
|
||||
required
|
||||
:disabled="disableEdit(driver.key)"
|
||||
:disabled="isBackupVolumeSnapshotClassNameDisabled(driver.key)"
|
||||
:options="getVolumeSnapshotOptions(driver.key)"
|
||||
:label="t('harvester.setting.csiDriverConfig.backupVolumeSnapshotClassName')"
|
||||
@selectable="isBackupVolumeSnapshotClassNameSelectable(driver.key)"
|
||||
@keydown.native.enter.prevent="()=>{}"
|
||||
@update:value="update"
|
||||
/>
|
||||
|
||||
@ -43,7 +43,8 @@ const featuresV141 = [
|
||||
// TODO: add v1.4.2 official release note
|
||||
const featuresV142 = [
|
||||
...featuresV141,
|
||||
'refreshIntervalInSecond'
|
||||
'refreshIntervalInSecond',
|
||||
'allowEmptySnapshotClassName'
|
||||
];
|
||||
|
||||
// TODO: add v1.5.0 official release note
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user