1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01: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';
const hiddenColumnsSmall = ['Icon', 'createdAt'];
const hiddenColumnsFlagE = ['projects', 'environment'];
export const ApiTokenTable = () => {
const { tokens, loading } = useApiTokens();
@ -65,10 +64,6 @@ export const ApiTokenTable = () => {
condition: isSmallScreen,
columns: hiddenColumnsSmall,
},
{
condition: !uiConfig.flags.E,
columns: hiddenColumnsFlagE,
},
],
setHiddenColumns,
COLUMNS

View File

@ -236,93 +236,73 @@ const ProjectEnvironmentList = () => {
return (
<PageContent header={header} isLoading={loading}>
<ConditionallyRender
condition={uiConfig.flags.E}
show={
<StyledDivContainer>
<ConditionallyRender
condition={Boolean(error)}
show={renderError()}
<StyledDivContainer>
<ConditionallyRender
condition={Boolean(error)}
show={renderError()}
/>
<StyledAlert severity="info">
<strong>Important!</strong> In order for your application to
retrieve configured activation strategies for a specific
environment, the application must use an environment
specific API token. You can look up the environment-specific{' '}
<Link to="/admin/api">API tokens here</Link>.
<br />
<br />
Your administrator can configure an environment-specific API
token to be used in the SDK. If you are an administrator you
can <Link to="/admin/api">create a new API token here</Link>
.
</StyledAlert>
<SearchHighlightProvider value={globalFilter}>
<Table {...getTableProps()} rowHeight="compact">
<SortableTableHeader
headerGroups={headerGroups as any}
/>
<StyledAlert severity="info">
<strong>Important!</strong> In order for your
application to retrieve configured activation
strategies for a specific environment, the
application must use an environment specific API
token. You can look up the environment-specific{' '}
<Link to="/admin/api">API tokens here</Link>.
<br />
<br />
Your administrator can configure an
environment-specific API token to be used in the
SDK. If you are an administrator you can{' '}
<Link to="/admin/api">
create a new API token here
</Link>
.
</StyledAlert>
<SearchHighlightProvider value={globalFilter}>
<Table {...getTableProps()} rowHeight="compact">
<SortableTableHeader
headerGroups={headerGroups as any}
/>
<TableBody {...getTableBodyProps()}>
{rows.map(row => {
prepareRow(row);
return (
<TableRow
hover
{...row.getRowProps()}
>
{row.cells.map(cell => (
<TableCell
{...cell.getCellProps()}
>
{cell.render('Cell')}
</TableCell>
))}
</TableRow>
);
})}
</TableBody>
</Table>
</SearchHighlightProvider>
<TableBody {...getTableBodyProps()}>
{rows.map(row => {
prepareRow(row);
return (
<TableRow hover {...row.getRowProps()}>
{row.cells.map(cell => (
<TableCell {...cell.getCellProps()}>
{cell.render('Cell')}
</TableCell>
))}
</TableRow>
);
})}
</TableBody>
</Table>
</SearchHighlightProvider>
<ConditionallyRender
condition={rows.length === 0}
show={
<ConditionallyRender
condition={rows.length === 0}
condition={globalFilter?.length > 0}
show={
<ConditionallyRender
condition={globalFilter?.length > 0}
show={
<TablePlaceholder>
No environments found matching
&ldquo;
{globalFilter}
&rdquo;
</TablePlaceholder>
}
elseShow={
<TablePlaceholder>
No environments available. Get
started by adding one.
</TablePlaceholder>
}
/>
<TablePlaceholder>
No environments found matching &ldquo;
{globalFilter}
&rdquo;
</TablePlaceholder>
}
elseShow={
<TablePlaceholder>
No environments available. Get started by
adding one.
</TablePlaceholder>
}
/>
<EnvironmentHideDialog
environment={selectedEnvironment}
open={hideDialog}
setOpen={setHideDialog}
onConfirm={onHideConfirm}
/>
</StyledDivContainer>
}
elseShow={
<Alert security="success">
This feature has not been Unleashed for you yet.
</Alert>
}
/>
}
/>
<EnvironmentHideDialog
environment={selectedEnvironment}
open={hideDialog}
setOpen={setHideDialog}
onConfirm={onHideConfirm}
/>
</StyledDivContainer>
</PageContent>
);
};

View File

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

View File

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

View File

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

View File

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

View File

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