1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-04 13:48:56 +02:00

Remove E flag (#2832)

This commit is contained in:
sjaanus 2023-01-11 09:00:26 +02:00 committed by GitHub
parent da193e7aa0
commit 11d5a157c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 62 additions and 94 deletions

View File

@ -29,7 +29,6 @@ import { useConditionallyHiddenColumns } from 'hooks/useConditionallyHiddenColum
import { TimeAgoCell } from 'component/common/Table/cells/TimeAgoCell/TimeAgoCell'; import { TimeAgoCell } from 'component/common/Table/cells/TimeAgoCell/TimeAgoCell';
const hiddenColumnsSmall = ['Icon', 'createdAt']; const hiddenColumnsSmall = ['Icon', 'createdAt'];
const hiddenColumnsFlagE = ['projects', 'environment'];
export const ApiTokenTable = () => { export const ApiTokenTable = () => {
const { tokens, loading } = useApiTokens(); const { tokens, loading } = useApiTokens();
@ -65,10 +64,6 @@ export const ApiTokenTable = () => {
condition: isSmallScreen, condition: isSmallScreen,
columns: hiddenColumnsSmall, columns: hiddenColumnsSmall,
}, },
{
condition: !uiConfig.flags.E,
columns: hiddenColumnsFlagE,
},
], ],
setHiddenColumns, setHiddenColumns,
COLUMNS COLUMNS

View File

@ -236,29 +236,22 @@ const ProjectEnvironmentList = () => {
return ( return (
<PageContent header={header} isLoading={loading}> <PageContent header={header} isLoading={loading}>
<ConditionallyRender
condition={uiConfig.flags.E}
show={
<StyledDivContainer> <StyledDivContainer>
<ConditionallyRender <ConditionallyRender
condition={Boolean(error)} condition={Boolean(error)}
show={renderError()} show={renderError()}
/> />
<StyledAlert severity="info"> <StyledAlert severity="info">
<strong>Important!</strong> In order for your <strong>Important!</strong> In order for your application to
application to retrieve configured activation retrieve configured activation strategies for a specific
strategies for a specific environment, the environment, the application must use an environment
application must use an environment specific API specific API token. You can look up the environment-specific{' '}
token. You can look up the environment-specific{' '}
<Link to="/admin/api">API tokens here</Link>. <Link to="/admin/api">API tokens here</Link>.
<br /> <br />
<br /> <br />
Your administrator can configure an Your administrator can configure an environment-specific API
environment-specific API token to be used in the token to be used in the SDK. If you are an administrator you
SDK. If you are an administrator you can{' '} can <Link to="/admin/api">create a new API token here</Link>
<Link to="/admin/api">
create a new API token here
</Link>
. .
</StyledAlert> </StyledAlert>
<SearchHighlightProvider value={globalFilter}> <SearchHighlightProvider value={globalFilter}>
@ -270,14 +263,9 @@ const ProjectEnvironmentList = () => {
{rows.map(row => { {rows.map(row => {
prepareRow(row); prepareRow(row);
return ( return (
<TableRow <TableRow hover {...row.getRowProps()}>
hover
{...row.getRowProps()}
>
{row.cells.map(cell => ( {row.cells.map(cell => (
<TableCell <TableCell {...cell.getCellProps()}>
{...cell.getCellProps()}
>
{cell.render('Cell')} {cell.render('Cell')}
</TableCell> </TableCell>
))} ))}
@ -294,16 +282,15 @@ const ProjectEnvironmentList = () => {
condition={globalFilter?.length > 0} condition={globalFilter?.length > 0}
show={ show={
<TablePlaceholder> <TablePlaceholder>
No environments found matching No environments found matching &ldquo;
&ldquo;
{globalFilter} {globalFilter}
&rdquo; &rdquo;
</TablePlaceholder> </TablePlaceholder>
} }
elseShow={ elseShow={
<TablePlaceholder> <TablePlaceholder>
No environments available. Get No environments available. Get started by
started by adding one. adding one.
</TablePlaceholder> </TablePlaceholder>
} }
/> />
@ -316,13 +303,6 @@ const ProjectEnvironmentList = () => {
onConfirm={onHideConfirm} onConfirm={onHideConfirm}
/> />
</StyledDivContainer> </StyledDivContainer>
}
elseShow={
<Alert security="success">
This feature has not been Unleashed for you yet.
</Alert>
}
/>
</PageContent> </PageContent>
); );
}; };

View File

@ -7,7 +7,6 @@ export const defaultValue: IUiConfig = {
slogan: 'The enterprise ready feature toggle service.', slogan: 'The enterprise ready feature toggle service.',
flags: { flags: {
P: false, P: false,
E: false,
RE: false, RE: false,
EEA: false, EEA: false,
SE: false, SE: false,

View File

@ -30,7 +30,6 @@ export interface IProclamationToast {
export interface IFlags { export interface IFlags {
P: boolean; P: boolean;
E: boolean;
RE: boolean; RE: boolean;
EEA?: boolean; EEA?: boolean;
SE?: boolean; SE?: boolean;

View File

@ -67,7 +67,6 @@ exports[`should create default config 1`] = `
"isEnabled": [Function], "isEnabled": [Function],
}, },
"flags": { "flags": {
"E": false,
"ENABLE_DARK_MODE_SUPPORT": false, "ENABLE_DARK_MODE_SUPPORT": false,
"anonymiseEventLog": false, "anonymiseEventLog": false,
"batchMetrics": false, "batchMetrics": false,
@ -85,7 +84,6 @@ exports[`should create default config 1`] = `
}, },
"flagResolver": FlagResolver { "flagResolver": FlagResolver {
"experiments": { "experiments": {
"E": false,
"ENABLE_DARK_MODE_SUPPORT": false, "ENABLE_DARK_MODE_SUPPORT": false,
"anonymiseEventLog": false, "anonymiseEventLog": false,
"batchMetrics": false, "batchMetrics": false,
@ -152,7 +150,6 @@ exports[`should create default config 1`] = `
"ui": { "ui": {
"environment": "Open Source", "environment": "Open Source",
"flags": { "flags": {
"E": true,
"ENABLE_DARK_MODE_SUPPORT": false, "ENABLE_DARK_MODE_SUPPORT": false,
}, },
}, },

View File

@ -105,7 +105,6 @@ function loadUI(options: IUnleashOptions): IUIConfig {
}; };
ui.flags = { ui.flags = {
E: true,
ENABLE_DARK_MODE_SUPPORT: false, ENABLE_DARK_MODE_SUPPORT: false,
}; };
return mergeAll([ui, uiO]); return mergeAll([ui, uiO]);

View File

@ -4,7 +4,6 @@ export type IFlags = Partial<typeof flags>;
export type IFlagKey = keyof IFlags; export type IFlagKey = keyof IFlags;
const flags = { const flags = {
E: false,
ENABLE_DARK_MODE_SUPPORT: false, ENABLE_DARK_MODE_SUPPORT: false,
anonymiseEventLog: false, anonymiseEventLog: false,
embedProxy: parseEnvVarBoolean( embedProxy: parseEnvVarBoolean(