mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-18 13:48:58 +02:00
fix: prod guard and flags snapshot
This commit is contained in:
parent
7e6ef0539f
commit
2766f446dd
@ -10,7 +10,10 @@ export const ChildrenTooltip: FC<{
|
||||
tooltip={
|
||||
<>
|
||||
{childFeatures.map((child) => (
|
||||
<StyledLink to={`/projects/${project}/features/${child}`}>
|
||||
<StyledLink
|
||||
key={`${project}-${child}`}
|
||||
to={`/projects/${project}/features/${child}`}
|
||||
>
|
||||
<div>{child}</div>
|
||||
</StyledLink>
|
||||
))}
|
||||
|
@ -49,7 +49,7 @@ export const FeatureToggleSwitch: VFC<FeatureToggleSwitchProps> = ({
|
||||
? `Disable feature in ${environmentName}`
|
||||
: `Enable feature in ${environmentName}`
|
||||
}
|
||||
checked={isChecked}
|
||||
checked={value}
|
||||
environmentId={environmentName}
|
||||
projectId={projectId}
|
||||
permission={UPDATE_FEATURE_ENVIRONMENT}
|
||||
|
@ -69,12 +69,13 @@ export const useFeatureToggleSwitch: UseFeatureToggleSwitchType = (
|
||||
return next();
|
||||
}
|
||||
|
||||
if (isProdGuardEnabled(config.environmentType || '')) {
|
||||
if (!isProdGuardEnabled(config.environmentType || '')) {
|
||||
return next();
|
||||
}
|
||||
|
||||
setProdGuardModalState({
|
||||
open: true,
|
||||
label: `${
|
||||
!newState ? 'Disable' : 'Enable'
|
||||
} Environment`,
|
||||
label: `${!newState ? 'Disable' : 'Enable'} Environment`,
|
||||
loading: false,
|
||||
onClose: () => {
|
||||
setProdGuardModalState((prev) => ({
|
||||
@ -92,9 +93,6 @@ export const useFeatureToggleSwitch: UseFeatureToggleSwitchType = (
|
||||
next();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return next();
|
||||
};
|
||||
|
||||
const ensureActiveStrategies: Middleware = (next) => {
|
||||
|
@ -90,6 +90,7 @@ exports[`should create default config 1`] = `
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
"featureNamingPattern": false,
|
||||
"featureSwitchRefactor": false,
|
||||
"featuresExportImport": true,
|
||||
"filterInvalidClientMetrics": false,
|
||||
"googleAuthEnabled": false,
|
||||
@ -135,6 +136,7 @@ exports[`should create default config 1`] = `
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
"featureNamingPattern": false,
|
||||
"featureSwitchRefactor": false,
|
||||
"featuresExportImport": true,
|
||||
"filterInvalidClientMetrics": false,
|
||||
"googleAuthEnabled": false,
|
||||
|
Loading…
Reference in New Issue
Block a user