From ff97dfd733b1d2d932455ee3e134f225de658d55 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Fri, 13 Oct 2023 17:02:48 +0300 Subject: [PATCH] fix: use correct flag name (#5026) Fixes a bug with using the wrong feature name Signed-off-by: andreas-unleash --- .../component/archive/ArchiveTable/ArchiveTable.test.tsx | 8 ++++---- .../ArchivedFeatureReviveConfirm.tsx | 2 +- frontend/src/interfaces/uiConfig.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/component/archive/ArchiveTable/ArchiveTable.test.tsx b/frontend/src/component/archive/ArchiveTable/ArchiveTable.test.tsx index 54c690aab2..ff3da0844a 100644 --- a/frontend/src/component/archive/ArchiveTable/ArchiveTable.test.tsx +++ b/frontend/src/component/archive/ArchiveTable/ArchiveTable.test.tsx @@ -7,8 +7,8 @@ import { DELETE_FEATURE, UPDATE_FEATURE, } from 'component/providers/AccessProvider/permissions'; -import ToastRenderer from '../../common/ToastRenderer/ToastRenderer'; -import { testServerRoute, testServerSetup } from '../../../utils/testServer'; +import ToastRenderer from 'component/common/ToastRenderer/ToastRenderer'; +import { testServerRoute, testServerSetup } from 'utils/testServer'; const mockedFeatures = [ { @@ -54,7 +54,7 @@ const Component = () => { const server = testServerSetup(); -const setupApi = (disableAllEnvsOnRevive = false) => { +const setupApi = (disableEnvsOnRevive = false) => { testServerRoute( server, '/api/admin/projects/default/revive', @@ -66,7 +66,7 @@ const setupApi = (disableAllEnvsOnRevive = false) => { testServerRoute(server, '/api/admin/ui-config', { environment: 'Open Source', flags: { - disableAllEnvsOnRevive, + disableEnvsOnRevive, }, }); }; diff --git a/frontend/src/component/archive/ArchiveTable/ArchivedFeatureActionCell/ArchivedFeatureReviveConfirm/ArchivedFeatureReviveConfirm.tsx b/frontend/src/component/archive/ArchiveTable/ArchivedFeatureActionCell/ArchivedFeatureReviveConfirm/ArchivedFeatureReviveConfirm.tsx index 49fa5d48f7..b292fb522e 100644 --- a/frontend/src/component/archive/ArchiveTable/ArchivedFeatureActionCell/ArchivedFeatureReviveConfirm/ArchivedFeatureReviveConfirm.tsx +++ b/frontend/src/component/archive/ArchiveTable/ArchivedFeatureActionCell/ArchivedFeatureReviveConfirm/ArchivedFeatureReviveConfirm.tsx @@ -28,7 +28,7 @@ export const ArchivedFeatureReviveConfirm = ({ }: IArchivedFeatureReviveConfirmProps) => { const { setToastData, setToastApiError } = useToast(); const { reviveFeatures } = useProjectApi(); - const disableAllEnvsOnRevive = useUiFlag('disableAllEnvsOnRevive'); + const disableAllEnvsOnRevive = useUiFlag('disableEnvsOnRevive'); const onReviveFeatureToggle = async () => { try { diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index b008fa4cf8..6ad1b72456 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -70,7 +70,7 @@ export type UiFlags = { datadogJsonTemplate?: boolean; dependentFeatures?: boolean; internalMessageBanners?: boolean; - disableAllEnvsOnRevive?: boolean; + disableEnvsOnRevive?: boolean; }; export interface IVersionInfo {