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