mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02:00
Chore/remove flag disable bulk toggle (#10183)
Prompt used:  LLM: Gemini 2.5 Pro (preview) @kwasniew do we still need this kill-switch?
This commit is contained in:
parent
f9ca769179
commit
2ecb4b0a4f
@ -9,7 +9,6 @@ import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
|||||||
import { BulkDisableDialog } from 'component/feature/FeatureToggleList/BulkDisableDialog';
|
import { BulkDisableDialog } from 'component/feature/FeatureToggleList/BulkDisableDialog';
|
||||||
import { BulkEnableDialog } from 'component/feature/FeatureToggleList/BulkEnableDialog';
|
import { BulkEnableDialog } from 'component/feature/FeatureToggleList/BulkEnableDialog';
|
||||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
|
||||||
|
|
||||||
interface IProjectFeaturesBatchActionsProps {
|
interface IProjectFeaturesBatchActionsProps {
|
||||||
selectedIds: string[];
|
selectedIds: string[];
|
||||||
@ -72,10 +71,6 @@ export const ProjectFeaturesBatchActions: FC<
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ConditionallyRender
|
|
||||||
condition={Boolean(uiConfig?.flags?.disableBulkToggle)}
|
|
||||||
show={null}
|
|
||||||
elseShow={
|
|
||||||
<Button
|
<Button
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
size='small'
|
size='small'
|
||||||
@ -83,12 +78,6 @@ export const ProjectFeaturesBatchActions: FC<
|
|||||||
>
|
>
|
||||||
Enable
|
Enable
|
||||||
</Button>
|
</Button>
|
||||||
}
|
|
||||||
/>
|
|
||||||
<ConditionallyRender
|
|
||||||
condition={Boolean(uiConfig?.flags?.disableBulkToggle)}
|
|
||||||
show={null}
|
|
||||||
elseShow={
|
|
||||||
<Button
|
<Button
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
size='small'
|
size='small'
|
||||||
@ -96,8 +85,6 @@ export const ProjectFeaturesBatchActions: FC<
|
|||||||
>
|
>
|
||||||
Disable
|
Disable
|
||||||
</Button>
|
</Button>
|
||||||
}
|
|
||||||
/>
|
|
||||||
<ArchiveButton
|
<ArchiveButton
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
featureIds={selectedIds}
|
featureIds={selectedIds}
|
||||||
|
@ -59,7 +59,6 @@ export type UiFlags = {
|
|||||||
personalAccessTokensKillSwitch?: boolean;
|
personalAccessTokensKillSwitch?: boolean;
|
||||||
demo?: boolean;
|
demo?: boolean;
|
||||||
googleAuthEnabled?: boolean;
|
googleAuthEnabled?: boolean;
|
||||||
disableBulkToggle?: boolean;
|
|
||||||
advancedPlayground?: boolean;
|
advancedPlayground?: boolean;
|
||||||
strategyVariant?: boolean;
|
strategyVariant?: boolean;
|
||||||
doraMetrics?: boolean;
|
doraMetrics?: boolean;
|
||||||
|
@ -918,11 +918,6 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
const { shouldActivateDisabledStrategies } = req.query;
|
const { shouldActivateDisabledStrategies } = req.query;
|
||||||
const { features } = req.body;
|
const { features } = req.body;
|
||||||
|
|
||||||
if (this.flagResolver.isEnabled('disableBulkToggle')) {
|
|
||||||
res.status(403).end();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.transactionalFeatureToggleService.transactional((service) =>
|
await this.transactionalFeatureToggleService.transactional((service) =>
|
||||||
service.bulkUpdateEnabled(
|
service.bulkUpdateEnabled(
|
||||||
projectId,
|
projectId,
|
||||||
@ -950,11 +945,6 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
const { shouldActivateDisabledStrategies } = req.query;
|
const { shouldActivateDisabledStrategies } = req.query;
|
||||||
const { features } = req.body;
|
const { features } = req.body;
|
||||||
|
|
||||||
if (this.flagResolver.isEnabled('disableBulkToggle')) {
|
|
||||||
res.status(403).end();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.transactionalFeatureToggleService.transactional((service) =>
|
await this.transactionalFeatureToggleService.transactional((service) =>
|
||||||
service.bulkUpdateEnabled(
|
service.bulkUpdateEnabled(
|
||||||
projectId,
|
projectId,
|
||||||
|
@ -17,7 +17,6 @@ export type IFlagKey =
|
|||||||
| 'migrationLock'
|
| 'migrationLock'
|
||||||
| 'demo'
|
| 'demo'
|
||||||
| 'googleAuthEnabled'
|
| 'googleAuthEnabled'
|
||||||
| 'disableBulkToggle'
|
|
||||||
| 'advancedPlayground'
|
| 'advancedPlayground'
|
||||||
| 'filterInvalidClientMetrics'
|
| 'filterInvalidClientMetrics'
|
||||||
| 'disableMetrics'
|
| 'disableMetrics'
|
||||||
@ -105,10 +104,6 @@ const flags: IFlags = {
|
|||||||
process.env.GOOGLE_AUTH_ENABLED,
|
process.env.GOOGLE_AUTH_ENABLED,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
disableBulkToggle: parseEnvVarBoolean(
|
|
||||||
process.env.DISABLE_BULK_TOGGLE,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
filterInvalidClientMetrics: parseEnvVarBoolean(
|
filterInvalidClientMetrics: parseEnvVarBoolean(
|
||||||
process.env.FILTER_INVALID_CLIENT_METRICS,
|
process.env.FILTER_INVALID_CLIENT_METRICS,
|
||||||
false,
|
false,
|
||||||
|
Loading…
Reference in New Issue
Block a user