mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
feat: add feature flag
Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com> (cherry picked from commit 43b30ec3c3057b15d7dcf76ed7f51c8b16625961)
This commit is contained in:
parent
a92f27d80c
commit
8c20ddb440
@ -47,7 +47,8 @@ const featuresV142 = [
|
|||||||
|
|
||||||
// TODO: add v1.5.0 official release note
|
// TODO: add v1.5.0 official release note
|
||||||
const featuresV150 = [
|
const featuresV150 = [
|
||||||
...featuresV142
|
...featuresV142,
|
||||||
|
'VMPersistentState'
|
||||||
];
|
];
|
||||||
|
|
||||||
export const RELEASE_FEATURES = {
|
export const RELEASE_FEATURES = {
|
||||||
|
|||||||
@ -466,7 +466,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="tpmEnabled"
|
v-if="value.persistentStateFeatureEnabled && tpmEnabled"
|
||||||
v-model:value="persistentStateEnabled"
|
v-model:value="persistentStateEnabled"
|
||||||
class="check"
|
class="check"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@ -874,7 +874,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="tpmEnabled"
|
v-if="value.persistentStateFeatureEnabled && tpmEnabled"
|
||||||
v-model:value="persistentStateEnabled"
|
v-model:value="persistentStateEnabled"
|
||||||
class="check"
|
class="check"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@ -276,4 +276,8 @@ export default class HciVmTemplateVersion extends HarvesterResource {
|
|||||||
|
|
||||||
this.spec.vm.spec.template.metadata['labels'] = { ...wasIgnored, ...val };
|
this.spec.vm.spec.template.metadata['labels'] = { ...wasIgnored, ...val };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get persistentStateFeatureEnabled() {
|
||||||
|
return this.$rootGetters['harvester-common/getFeatureEnabled']('VMPersistentState');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1175,6 +1175,10 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
return this.$rootGetters['harvester-common/getFeatureEnabled']('volumeEncryption');
|
return this.$rootGetters['harvester-common/getFeatureEnabled']('volumeEncryption');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get persistentStateFeatureEnabled() {
|
||||||
|
return this.$rootGetters['harvester-common/getFeatureEnabled']('VMPersistentState');
|
||||||
|
}
|
||||||
|
|
||||||
setInstanceLabels(val) {
|
setInstanceLabels(val) {
|
||||||
if ( !this.spec?.template?.metadata?.labels ) {
|
if ( !this.spec?.template?.metadata?.labels ) {
|
||||||
set(this, 'spec.template.metadata.labels', {});
|
set(this, 'spec.template.metadata.labels', {});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user