1
0
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:
sjaanus 2023-01-02 15:41:43 +02:00 committed by GitHub
parent c62d775933
commit 8a8cd1bf27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 5 additions and 27 deletions

View File

@ -24,7 +24,7 @@ export const useCreateFeaturePath = (
}
return {
path: getCreateTogglePath(projectId, uiConfig.flags.E),
path: getCreateTogglePath(projectId),
projectId,
};
};

View File

@ -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;

View File

@ -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}

View File

@ -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,

View File

@ -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;

View File

@ -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`;

View File

@ -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,

View File

@ -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,

View File

@ -39,7 +39,6 @@ process.nextTick(async () => {
batchMetrics: true,
anonymiseEventLog: false,
responseTimeWithAppName: true,
changeRequests: true,
variantsPerEnvironment: true,
maintenance: false,
serviceAccounts: true,

View File

@ -27,7 +27,6 @@ export function createTestConfig(config?: IUnleashOptions): IUnleashConfig {
embedProxy: true,
embedProxyFrontend: true,
batchMetrics: true,
changeRequests: true,
variantsPerEnvironment: true,
},
},