mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
UI Flags cleanup (#2778)
This commit is contained in:
parent
c62d775933
commit
8a8cd1bf27
@ -24,7 +24,7 @@ export const useCreateFeaturePath = (
|
||||
}
|
||||
|
||||
return {
|
||||
path: getCreateTogglePath(projectId, uiConfig.flags.E),
|
||||
path: getCreateTogglePath(projectId),
|
||||
projectId,
|
||||
};
|
||||
};
|
||||
|
@ -13,11 +13,9 @@ export const FeatureNotFound = () => {
|
||||
const { classes: styles } = useStyles();
|
||||
const { uiConfig } = useUiConfig();
|
||||
|
||||
const createFeatureTogglePath = getCreateTogglePath(
|
||||
projectId,
|
||||
uiConfig.flags.E,
|
||||
{ name: featureId }
|
||||
);
|
||||
const createFeatureTogglePath = getCreateTogglePath(projectId, {
|
||||
name: featureId,
|
||||
});
|
||||
|
||||
if (!archivedFeatures) {
|
||||
return null;
|
||||
|
@ -517,12 +517,7 @@ export const ProjectFeatureToggles = ({
|
||||
<PageHeader.Divider sx={{ marginLeft: 0 }} />
|
||||
<ResponsiveButton
|
||||
onClick={() =>
|
||||
navigate(
|
||||
getCreateTogglePath(
|
||||
projectId,
|
||||
uiConfig.flags.E
|
||||
)
|
||||
)
|
||||
navigate(getCreateTogglePath(projectId))
|
||||
}
|
||||
maxWidth="960px"
|
||||
Icon={Add}
|
||||
|
@ -7,11 +7,9 @@ export const defaultValue: IUiConfig = {
|
||||
slogan: 'The enterprise ready feature toggle service.',
|
||||
flags: {
|
||||
P: false,
|
||||
C: false,
|
||||
E: false,
|
||||
RE: false,
|
||||
EEA: false,
|
||||
CO: false,
|
||||
SE: false,
|
||||
T: false,
|
||||
UNLEASH_CLOUD: false,
|
||||
|
@ -29,20 +29,16 @@ export interface IProclamationToast {
|
||||
}
|
||||
|
||||
export interface IFlags {
|
||||
C: boolean;
|
||||
P: boolean;
|
||||
E: boolean;
|
||||
RE: boolean;
|
||||
EEA?: boolean;
|
||||
OIDC?: boolean;
|
||||
CO?: boolean;
|
||||
SE?: boolean;
|
||||
T?: boolean;
|
||||
UNLEASH_CLOUD?: boolean;
|
||||
UG?: boolean;
|
||||
ENABLE_DARK_MODE_SUPPORT?: boolean;
|
||||
embedProxyFrontend?: boolean;
|
||||
changeRequests?: boolean;
|
||||
variantsPerEnvironment?: boolean;
|
||||
networkView?: boolean;
|
||||
maintenance?: boolean;
|
||||
|
@ -4,7 +4,6 @@ export const getTogglePath = (projectId: string, featureToggleName: string) => {
|
||||
|
||||
export const getCreateTogglePath = (
|
||||
projectId: string,
|
||||
newPath: boolean = false,
|
||||
query?: Record<string, string>
|
||||
) => {
|
||||
const path = `/projects/${projectId}/create-toggle`;
|
||||
|
@ -71,7 +71,6 @@ exports[`should create default config 1`] = `
|
||||
"ENABLE_DARK_MODE_SUPPORT": false,
|
||||
"anonymiseEventLog": false,
|
||||
"batchMetrics": false,
|
||||
"changeRequests": false,
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
"maintenance": false,
|
||||
@ -90,7 +89,6 @@ exports[`should create default config 1`] = `
|
||||
"ENABLE_DARK_MODE_SUPPORT": false,
|
||||
"anonymiseEventLog": false,
|
||||
"batchMetrics": false,
|
||||
"changeRequests": false,
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
"maintenance": false,
|
||||
|
@ -11,10 +11,6 @@ const flags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY,
|
||||
true,
|
||||
),
|
||||
changeRequests: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUESTS,
|
||||
false,
|
||||
),
|
||||
embedProxyFrontend: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY_FRONTEND,
|
||||
true,
|
||||
|
@ -39,7 +39,6 @@ process.nextTick(async () => {
|
||||
batchMetrics: true,
|
||||
anonymiseEventLog: false,
|
||||
responseTimeWithAppName: true,
|
||||
changeRequests: true,
|
||||
variantsPerEnvironment: true,
|
||||
maintenance: false,
|
||||
serviceAccounts: true,
|
||||
|
@ -27,7 +27,6 @@ export function createTestConfig(config?: IUnleashOptions): IUnleashConfig {
|
||||
embedProxy: true,
|
||||
embedProxyFrontend: true,
|
||||
batchMetrics: true,
|
||||
changeRequests: true,
|
||||
variantsPerEnvironment: true,
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user