summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/feature_flags/constants.js
blob: f59414ab1a71e75ef296504a6636ab27e545073c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { property } from 'lodash';
import { s__ } from '~/locale';

export const ROLLOUT_STRATEGY_ALL_USERS = 'default';
export const ROLLOUT_STRATEGY_PERCENT_ROLLOUT = 'gradualRolloutUserId';
export const ROLLOUT_STRATEGY_USER_ID = 'userWithId';
export const ROLLOUT_STRATEGY_GITLAB_USER_LIST = 'gitlabUserList';

export const PERCENT_ROLLOUT_GROUP_ID = 'default';

export const DEFAULT_PERCENT_ROLLOUT = '100';

export const ALL_ENVIRONMENTS_NAME = '*';

export const INTERNAL_ID_PREFIX = 'internal_';

export const fetchPercentageParams = property(['parameters', 'percentage']);
export const fetchUserIdParams = property(['parameters', 'userIds']);

export const NEW_VERSION_FLAG = 'new_version_flag';
export const LEGACY_FLAG = 'legacy_flag';

export const NEW_FLAG_ALERT = s__(
  'FeatureFlags|Feature Flags will look different in the next milestone. No action is needed, but you may notice the functionality was changed to improve the workflow.',
);

export const FEATURE_FLAG_SCOPE = 'featureFlags';
export const USER_LIST_SCOPE = 'userLists';