Skip to content

Commit 92aef90

Browse files
author
Paul Dickerson
committed
chore(public-vcf-aas): add nic feature-flipping for edge gateway
ref: #MANAGER-18386 Signed-off-by: Paul Dickerson <[email protected]>
1 parent 80e756e commit 92aef90

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const FEATURE_FLAGS = {
22
VRACK: 'hpc-vmware-public-vcf-aas:vrack',
33
VRACK_ASSOCIATION: 'hpc-vmware-public-vcf-aas:vrack:association',
4+
EDGE_GATEWAY: 'hpc-vmware-public-vcf-aas:edge-gateway',
45
};

packages/manager/apps/hpc-vmware-public-vcf-aas/src/pages/dashboard/datacentre/DatacentreDashboard.page.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@ import { TRACKING_TABS_ACTIONS } from '@/tracking.constants';
2222
import { VRACK_LABEL } from '../dashboard.constants';
2323
import { FEATURE_FLAGS } from '@/app.constants';
2424
import MessageSuspendedService from '@/components/message/MessageSuspendedService.component';
25-
import { isEdgeCompatibleVDC } from '@/utils/edgeGatewayCompatibility';
25+
// import { isEdgeCompatibleVDC } from '@/utils/edgeGatewayCompatibility'; // TODO: [EDGE] implement when unmocking (testing only)
2626

2727
function DatacentreDashboardPage() {
2828
const { id, vdcId } = useParams();
2929
const { t } = useTranslation('dashboard');
3030
const { data: vcdDatacentre } = useVcdDatacentre(id, vdcId);
3131
const { data: featuresAvailable } = useFeatureAvailability([
3232
FEATURE_FLAGS.VRACK,
33+
FEATURE_FLAGS.EDGE_GATEWAY,
3334
]);
3435
const isVrackFeatureAvailable = featuresAvailable?.[FEATURE_FLAGS.VRACK];
36+
const isEdgeFeatureAvailable =
37+
featuresAvailable?.[FEATURE_FLAGS.EDGE_GATEWAY];
38+
3539
const navigate = useNavigate();
3640

3741
useAutoRefetch({
@@ -72,7 +76,8 @@ function DatacentreDashboardPage() {
7276
title: EDGE_GATEWAY_LABEL,
7377
to: useResolvedPath(subRoutes.edgeGateway).pathname,
7478
trackingActions: TRACKING_TABS_ACTIONS.edgeGateway,
75-
disabled: isEdgeCompatibleVDC(vcdDatacentre?.data), // TODO: [EDGE] inverse condition when unmocking (testing only)
79+
disabled: !isEdgeFeatureAvailable, // TODO: [EDGE] replace by !isEdgeCompatible when unmocking (testing only)
80+
// disabled: !isEdgeCompatibleVDC(vcdDatacentre?.data) // TODO: [EDGE] implement when unmocking (testing only)
7681
},
7782
].filter(({ disabled }) => !disabled);
7883

0 commit comments

Comments
 (0)