Refactoring feature flags store functions

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-11-12 11:50:44 +01:00
parent 8ba4dbd9e8
commit 021a64a5ec
10 changed files with 39 additions and 28 deletions
+1 -2
View File
@@ -15,7 +15,6 @@ import { ucFirst } from '@shell/utils/string';
import HarvesterResource from '../harvester';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import { HCI } from '../../types';
import { featureEnabled } from '../../utils/feature-flags';
const ALLOW_SYSTEM_LABEL_KEYS = [
'topology.kubernetes.io/zone',
@@ -371,7 +370,7 @@ export default class HciNode extends HarvesterResource {
}
get cpuPinningFeatureEnabled() {
return featureEnabled(this.$rootGetters, 'cpuPinning');
return this.$rootGetters['harvester-common/getFeatureEnabled']('cpuPinning');
}
get isCPUManagerEnabled() {
@@ -13,7 +13,6 @@ import { parseVolumeClaimTemplates } from '@pkg/utils/vm';
import { BACKUP_TYPE } from '../config/types';
import { HCI } from '../types';
import HarvesterResource from './harvester';
import { featureEnabled } from '../utils/feature-flags';
export const OFF = 'Off';
@@ -481,7 +480,7 @@ export default class VirtVm extends HarvesterResource {
}
get cpuPinningFeatureEnabled() {
return featureEnabled(this.$rootGetters, 'cpuPinning');
return this.$rootGetters['harvester-common/getFeatureEnabled']('cpuPinning');
}
get isCpuPinning() {