mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 05:01:43 +00:00
feat: make size editable (#562)
Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
parent
532b6c4d50
commit
e3d30a0eec
@ -51,6 +51,7 @@ const FEATURE_FLAGS = {
|
||||
'v1.6.1': [],
|
||||
'v1.7.0': [
|
||||
'vmMachineTypeAuto',
|
||||
'lhV2VolExpansion',
|
||||
'l2VlanTrunkMode'
|
||||
]
|
||||
};
|
||||
|
||||
@ -267,7 +267,19 @@ export default {
|
||||
|
||||
rebuildStatus() {
|
||||
return this.value.longhornEngine?.status?.rebuildStatus;
|
||||
}
|
||||
},
|
||||
|
||||
isLHV2VolExpansionFeatureEnabled() {
|
||||
return this.$store.getters['harvester-common/getFeatureEnabled']('lhV2VolExpansion');
|
||||
},
|
||||
|
||||
isResizeDisabled() {
|
||||
return (
|
||||
!this.isLHV2VolExpansionFeatureEnabled &&
|
||||
this.value?.isLonghornV2 &&
|
||||
this.isEdit
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
@ -463,7 +475,7 @@ export default {
|
||||
:output-modifier="true"
|
||||
:increment="1024"
|
||||
:mode="mode"
|
||||
:disabled="value?.isLonghornV2 && isEdit"
|
||||
:disabled="isResizeDisabled"
|
||||
required
|
||||
class="mb-20"
|
||||
:suffix="GIBIBYTE"
|
||||
@ -471,7 +483,7 @@ export default {
|
||||
/>
|
||||
|
||||
<Banner
|
||||
v-if="value?.isLonghornV2 && isEdit"
|
||||
v-if="isResizeDisabled"
|
||||
color="warning"
|
||||
>
|
||||
<span>{{ t('harvester.volume.longhorn.disableResize') }}</span>
|
||||
|
||||
@ -136,6 +136,10 @@ export default {
|
||||
pvcs() {
|
||||
return this.$store.getters['harvester/all'](PVC) || [];
|
||||
},
|
||||
|
||||
isLHV2VolExpansionFeatureEnabled() {
|
||||
return this.$store.getters['harvester-common/getFeatureEnabled']('lhV2VolExpansion');
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
@ -270,8 +274,8 @@ export default {
|
||||
},
|
||||
|
||||
isResizeDisabled(volume) {
|
||||
if (this.isCreate) return false;
|
||||
if (volume.newCreateId) return false;
|
||||
if (this.isLHV2VolExpansionFeatureEnabled) return false;
|
||||
if (this.isCreate || volume.newCreateId) return false;
|
||||
|
||||
const isStopped = this.vm.stateDisplay === OFF;
|
||||
const isLonghornV2 = this.isLonghornV2(volume);
|
||||
@ -406,7 +410,7 @@ export default {
|
||||
:label="ucFirst(value.volumeBackups.error.message)"
|
||||
/>
|
||||
<Banner
|
||||
v-if="isLonghornV2(volume) && !isView"
|
||||
v-if="!isLHV2VolExpansionFeatureEnabled && isLonghornV2(volume) && !isView"
|
||||
color="warning"
|
||||
:label="t('harvester.volume.longhorn.disableResize')"
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user