mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 05:06:05 +08:00
refactor: update feature flag
Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
(cherry picked from commit 1651e201e8)
This commit is contained in:
@@ -140,7 +140,7 @@ export default {
|
||||
return !!spec?.template?.spec?.domain?.devices?.tpm;
|
||||
},
|
||||
|
||||
isPersistentStateEnabled(spec) {
|
||||
isTPMPersistentStateEnabled(spec) {
|
||||
return !!spec?.template?.spec?.domain?.devices?.tpm?.persistent;
|
||||
},
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
accessCredentials: [],
|
||||
efiEnabled: false,
|
||||
tpmEnabled: false,
|
||||
persistentStateEnabled: false,
|
||||
tpmPersistentStateEnabled: false,
|
||||
secureBoot: false,
|
||||
userDataTemplateId: '',
|
||||
saveUserDataAsClearText: false,
|
||||
@@ -368,7 +368,7 @@ export default {
|
||||
const installAgent = this.hasInstallAgent(userData, osType, true);
|
||||
const efiEnabled = this.isEfiEnabled(spec);
|
||||
const tpmEnabled = this.isTpmEnabled(spec);
|
||||
const persistentStateEnabled = this.isPersistentStateEnabled(spec);
|
||||
const tpmPersistentStateEnabled = this.isTPMPersistentStateEnabled(spec);
|
||||
const secureBoot = this.isSecureBoot(spec);
|
||||
const cpuPinning = this.isCpuPinning(spec);
|
||||
|
||||
@@ -401,7 +401,7 @@ export default {
|
||||
this['installUSBTablet'] = installUSBTablet;
|
||||
this['efiEnabled'] = efiEnabled;
|
||||
this['tpmEnabled'] = tpmEnabled;
|
||||
this['persistentStateEnabled'] = persistentStateEnabled;
|
||||
this['tpmPersistentStateEnabled'] = tpmPersistentStateEnabled;
|
||||
this['secureBoot'] = secureBoot;
|
||||
this['cpuPinning'] = cpuPinning;
|
||||
|
||||
@@ -1424,8 +1424,8 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
setPersistentStateEnabled(persistentStateEnabled) {
|
||||
if (persistentStateEnabled) {
|
||||
setTPMPersistentStateEnabled(tpmPersistentStateEnabled) {
|
||||
if (tpmPersistentStateEnabled) {
|
||||
set(this.spec.template.spec.domain.devices, 'tpm', { persistent: true });
|
||||
} else {
|
||||
set(this.spec.template.spec.domain.devices, 'tpm', {});
|
||||
@@ -1555,8 +1555,8 @@ export default {
|
||||
this.setTPM(val);
|
||||
},
|
||||
|
||||
persistentStateEnabled(val) {
|
||||
this.setPersistentStateEnabled(val);
|
||||
tpmPersistentStateEnabled(val) {
|
||||
this.setTPMPersistentStateEnabled(val);
|
||||
},
|
||||
|
||||
installAgent: {
|
||||
|
||||
Reference in New Issue
Block a user