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