Skip to content

Commit

Permalink
feat: application usage feature flag and cleanup (#4568)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Aug 25, 2023
1 parent 01e1ffd commit 35fe575
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 23 deletions.
2 changes: 1 addition & 1 deletion frontend/src/component/admin/menu/AdminTabsMenu.tsx
Expand Up @@ -21,7 +21,7 @@ const StyledBadgeContainer = styled('div')(({ theme }) => ({
}));

export const AdminTabsMenu: VFC = () => {
const { uiConfig, isPro, isOss } = useUiConfig();
const { isPro, isOss } = useUiConfig();
const { pathname } = useLocation();

const activeTab = pathname.split('/')[2];
Expand Down
Expand Up @@ -3,7 +3,6 @@ import { useMemo, useState } from 'react';
import { useTable, useSortBy, useFlexLayout, Column } from 'react-table';
import { sortTypes } from 'utils/sortTypes';
import { TextCell } from 'component/common/Table/cells/TextCell/TextCell';
import { HighlightCell } from 'component/common/Table/cells/HighlightCell/HighlightCell';
import { IProjectRoleUsageCount } from 'interfaces/project';
import { LinkCell } from 'component/common/Table/cells/LinkCell/LinkCell';

Expand Down
Expand Up @@ -3,7 +3,6 @@ import { PermissionGuard } from 'component/common/PermissionGuard/PermissionGuar
import { ServiceAccountsTable } from './ServiceAccountsTable/ServiceAccountsTable';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { PremiumFeature } from 'component/common/PremiumFeature/PremiumFeature';
import { AdminTabsMenu } from '../menu/AdminTabsMenu';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';

export const ServiceAccounts = () => {
Expand Down
@@ -1,24 +1,4 @@
import { useMemo } from 'react';
import { Avatar, CircularProgress, Icon, Link } from '@mui/material';
import { Warning } from '@mui/icons-material';
import { styles as themeStyles } from 'component/common';
import { PageContent } from 'component/common/PageContent/PageContent';
import { PageHeader } from 'component/common/PageHeader/PageHeader';
import useApplications from 'hooks/api/getters/useApplications/useApplications';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { Search } from 'component/common/Search/Search';
import { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
import {
SortableTableHeader,
Table,
TableBody,
TableCell,
TableRow,
} from '../../common/Table';
import { useGlobalFilter, useSortBy, useTable } from 'react-table';
import { sortTypes } from 'utils/sortTypes';
import { IconCell } from 'component/common/Table/cells/IconCell/IconCell';
import { LinkCell } from 'component/common/Table/cells/LinkCell/LinkCell';
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
import { ApplicationList } from './ApplicationList';
import { OldApplicationList } from './OldApplicationList';
Expand Down
2 changes: 2 additions & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -93,6 +93,7 @@ exports[`should create default config 1`] = `
},
"migrationLock": true,
"multipleRoles": false,
"newApplicationList": false,
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"responseTimeWithAppNameKillSwitch": false,
Expand Down Expand Up @@ -129,6 +130,7 @@ exports[`should create default config 1`] = `
},
"migrationLock": true,
"multipleRoles": false,
"newApplicationList": false,
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"responseTimeWithAppNameKillSwitch": false,
Expand Down
4 changes: 4 additions & 0 deletions src/lib/types/experimental.ts
Expand Up @@ -133,6 +133,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_MULTIPLE_ROLES,
false,
),
newApplicationList: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_NEW_APPLICATION_LIST,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down

0 comments on commit 35fe575

Please sign in to comment.