diff --git a/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx b/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx index 0669f01d5e..fa05953b52 100644 --- a/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx +++ b/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx @@ -64,8 +64,6 @@ export const ArchiveTable = ({ }: IFeaturesArchiveTableProps) => { const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); const isMediumScreen = useMediaQuery(theme.breakpoints.down('lg')); - const { setToastData, setToastApiError } = useToast(); - const [deleteModalOpen, setDeleteModalOpen] = useState(false); const [deletedFeature, setDeletedFeature] = useState(); @@ -73,16 +71,12 @@ export const ArchiveTable = ({ const [revivedFeature, setRevivedFeature] = useState(); const [searchParams, setSearchParams] = useSearchParams(); - const { reviveFeature } = useFeatureArchiveApi(); const [searchValue, setSearchValue] = useState( searchParams.get('search') || '', ); const { uiConfig } = useUiConfig(); - const showEnvironmentLastSeen = Boolean( - uiConfig.flags.lastSeenByEnvironment, - ); const columns = useMemo( () => [ @@ -111,11 +105,7 @@ export const ArchiveTable = ({ Header: 'Seen', accessor: 'lastSeenAt', Cell: ({ value, row: { original: feature } }: any) => { - return showEnvironmentLastSeen ? ( - - ) : ( - - ); + return ; }, align: 'center', maxWidth: 80, @@ -199,7 +189,7 @@ export const ArchiveTable = ({ }, ], //eslint-disable-next-line - [projectId, showEnvironmentLastSeen], + [projectId], ); const { diff --git a/frontend/src/component/common/FeatureArchiveDialog/FeatureArchiveDialog.tsx b/frontend/src/component/common/FeatureArchiveDialog/FeatureArchiveDialog.tsx index c1bc027075..14a0e24d99 100644 --- a/frontend/src/component/common/FeatureArchiveDialog/FeatureArchiveDialog.tsx +++ b/frontend/src/component/common/FeatureArchiveDialog/FeatureArchiveDialog.tsx @@ -331,8 +331,7 @@ export const FeatureArchiveDialog: VFC = ({ 0, )} show={ diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx index ed3a837395..92c257f9da 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx @@ -72,9 +72,7 @@ export const FeatureToggleListTable: VFC = () => { const [searchParams, setSearchParams] = useSearchParams(); const { setToastApiError } = useToast(); const { uiConfig } = useUiConfig(); - const showEnvironmentLastSeen = Boolean( - uiConfig.flags.lastSeenByEnvironment, - ); + const [initialState] = useState(() => ({ sortBy: [ { @@ -138,11 +136,7 @@ export const FeatureToggleListTable: VFC = () => { Header: 'Seen', accessor: 'lastSeenAt', Cell: ({ value, row: { original: feature } }: any) => { - return showEnvironmentLastSeen ? ( - - ) : ( - - ); + return ; }, align: 'center', maxWidth: 80, @@ -206,7 +200,7 @@ export const FeatureToggleListTable: VFC = () => { searchable: true, }, ], - [isFavoritesPinned, showEnvironmentLastSeen], + [isFavoritesPinned], ); const { diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.tsx index b56192828b..9af20ff7e1 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.tsx @@ -33,10 +33,6 @@ export const FeatureOverviewSidePanelDetails = ({ const { uiConfig } = useUiConfig(); const showDependentFeatures = useShowDependentFeatures(feature.project); - const showLastSeenByEnvironment = Boolean( - uiConfig.flags.lastSeenByEnvironment, - ); - const lastSeenEnvironments: ILastSeenEnvironments[] = feature.environments?.map((env) => ({ name: env.name, @@ -57,13 +53,12 @@ export const FeatureOverviewSidePanelDetails = ({ )} - {showLastSeenByEnvironment && ( - - )} + + { @@ -213,13 +210,11 @@ export const PaginatedProjectFeatureToggles = ({ Header: 'Seen', accessor: 'lastSeenAt', Cell: ({ value, row: { original: feature } }: any) => { - return showEnvironmentLastSeen ? ( + return ( - ) : ( - ); }, align: 'center', diff --git a/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx b/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx index 89c45c54ce..b6d5dcb2df 100644 --- a/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx +++ b/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx @@ -133,9 +133,6 @@ export const ProjectFeatureToggles = ({ const { isChangeRequestConfigured } = useChangeRequestsEnabled(projectId); const [showExportDialog, setShowExportDialog] = useState(false); const { uiConfig } = useUiConfig(); - const showEnvironmentLastSeen = Boolean( - uiConfig.flags.lastSeenByEnvironment, - ); const onFavorite = useCallback( async (feature: IFeatureToggleListItem) => { @@ -202,10 +199,8 @@ export const ProjectFeatureToggles = ({ Header: 'Seen', accessor: 'lastSeenAt', Cell: ({ value, row: { original: feature } }: any) => { - return showEnvironmentLastSeen ? ( + return ( - ) : ( - ); }, align: 'center', diff --git a/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx b/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx index 523ca1102b..e136bfb1bc 100644 --- a/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx +++ b/frontend/src/component/project/Project/ProjectHealth/ReportTable/ReportTable.tsx @@ -54,9 +54,7 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => { const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); const isMediumScreen = useMediaQuery(theme.breakpoints.down('lg')); const { uiConfig } = useUiConfig(); - const showEnvironmentLastSeen = Boolean( - uiConfig.flags.lastSeenByEnvironment, - ); + const { featureTypes } = useFeatureTypes(); const data: IReportTableRow[] = useMemo( @@ -89,11 +87,7 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => { Header: 'Seen', accessor: 'lastSeenAt', Cell: ({ value, row: { original: feature } }: any) => { - return showEnvironmentLastSeen ? ( - - ) : ( - - ); + return ; }, align: 'center', maxWidth: 80, @@ -144,7 +138,7 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => { maxWidth: 120, }, ], - [showEnvironmentLastSeen], + [], ); const { diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 41be2d88d3..5193a4d764 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -60,7 +60,6 @@ export type UiFlags = { advancedPlayground?: boolean; customRootRolesKillSwitch?: boolean; strategyVariant?: boolean; - lastSeenByEnvironment?: boolean; doraMetrics?: boolean; variantTypeNumber?: boolean; privateProjects?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index e495b69df9..4e01c543cc 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -88,7 +88,6 @@ exports[`should create default config 1`] = ` "featuresExportImport": true, "filterInvalidClientMetrics": false, "googleAuthEnabled": false, - "lastSeenByEnvironment": false, "maintenanceMode": false, "messageBanner": { "enabled": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index f6810809a7..a73b37b844 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -21,7 +21,6 @@ export type IFlagKey = | 'disableNotifications' | 'advancedPlayground' | 'filterInvalidClientMetrics' - | 'lastSeenByEnvironment' | 'customRootRolesKillSwitch' | 'variantTypeNumber' | 'privateProjects' @@ -106,10 +105,6 @@ const flags: IFlags = { process.env.FILTER_INVALID_CLIENT_METRICS, false, ), - lastSeenByEnvironment: parseEnvVarBoolean( - process.env.LAST_SEEN_BY_ENVIRONMENT, - false, - ), customRootRolesKillSwitch: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_CUSTOM_ROOT_ROLES_KILL_SWITCH, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index 7920390cf0..9d6f743ad9 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -37,7 +37,6 @@ process.nextTick(async () => { embedProxyFrontend: true, anonymiseEventLog: false, responseTimeWithAppNameKillSwitch: false, - lastSeenByEnvironment: true, variantTypeNumber: true, privateProjects: true, dependentFeatures: true,