mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-03 01:18:43 +02:00
chore: rename toggle to flag (#8854)
This commit is contained in:
parent
2078dcc46a
commit
7906bfb177
@ -134,7 +134,7 @@ export const NewStrategyVariants: FC<{
|
|||||||
tooltip={
|
tooltip={
|
||||||
<Box>
|
<Box>
|
||||||
<Typography variant='body2'>
|
<Typography variant='body2'>
|
||||||
Variants in feature toggling allow you to serve
|
Variants in feature flagging allow you to serve
|
||||||
different versions of a feature to different
|
different versions of a feature to different
|
||||||
users. This can be used for A/B testing, gradual
|
users. This can be used for A/B testing, gradual
|
||||||
rollouts, and canary releases. Variants provide
|
rollouts, and canary releases. Variants provide
|
||||||
|
@ -59,7 +59,7 @@ test('Import happy path', async () => {
|
|||||||
|
|
||||||
const codeEditorLabel = screen.getByText('Code editor');
|
const codeEditorLabel = screen.getByText('Code editor');
|
||||||
codeEditorLabel.click();
|
codeEditorLabel.click();
|
||||||
const editor = screen.getByLabelText('Exported toggles');
|
const editor = screen.getByLabelText('Exported feature flags');
|
||||||
expect(editor.textContent).toBe('{}');
|
expect(editor.textContent).toBe('{}');
|
||||||
|
|
||||||
screen.getByText('Validate').click();
|
screen.getByText('Validate').click();
|
||||||
@ -92,7 +92,7 @@ test('Block when importing non json content', async () => {
|
|||||||
|
|
||||||
const codeEditorLabel = screen.getByText('Code editor');
|
const codeEditorLabel = screen.getByText('Code editor');
|
||||||
codeEditorLabel.click();
|
codeEditorLabel.click();
|
||||||
const editor = await screen.findByLabelText('Exported toggles');
|
const editor = await screen.findByLabelText('Exported feature flags');
|
||||||
await userEvent.type(editor, 'invalid non json');
|
await userEvent.type(editor, 'invalid non json');
|
||||||
|
|
||||||
const validateButton = screen.getByText('Validate');
|
const validateButton = screen.getByText('Validate');
|
||||||
|
@ -121,7 +121,7 @@ export const ImportArea: FC<{
|
|||||||
}
|
}
|
||||||
elseShow={
|
elseShow={
|
||||||
<StyledTextField
|
<StyledTextField
|
||||||
label='Exported toggles'
|
label='Exported feature flags'
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
onChange={(event) => setImportPayload(event.target.value)}
|
onChange={(event) => setImportPayload(event.target.value)}
|
||||||
value={importPayload}
|
value={importPayload}
|
||||||
|
@ -155,7 +155,7 @@ export function registerPrometheusMetrics(
|
|||||||
});
|
});
|
||||||
const featureFlagUpdateTotal = createCounter({
|
const featureFlagUpdateTotal = createCounter({
|
||||||
name: 'feature_toggle_update_total',
|
name: 'feature_toggle_update_total',
|
||||||
help: 'Number of times a toggle has been updated. Environment label would be "n/a" when it is not available, e.g. when a feature flag is created.',
|
help: 'Number of times a flag has been updated. Environment label would be "n/a" when it is not available, e.g. when a feature flag is created.',
|
||||||
labelNames: [
|
labelNames: [
|
||||||
'toggle',
|
'toggle',
|
||||||
'project',
|
'project',
|
||||||
|
@ -4,28 +4,29 @@ import { sdkContextSchema } from './sdk-context-schema';
|
|||||||
|
|
||||||
export const playgroundRequestSchema = {
|
export const playgroundRequestSchema = {
|
||||||
$id: '#/components/schemas/playgroundRequestSchema',
|
$id: '#/components/schemas/playgroundRequestSchema',
|
||||||
description: 'Data for the playground API to evaluate toggles',
|
description: 'Data for the playground API to evaluate feature flags',
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['environment', 'context'],
|
required: ['environment', 'context'],
|
||||||
properties: {
|
properties: {
|
||||||
environment: {
|
environment: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
example: 'development',
|
example: 'development',
|
||||||
description: 'The environment to evaluate toggles in.',
|
description: 'The environment to evaluate feature flags in.',
|
||||||
},
|
},
|
||||||
projects: {
|
projects: {
|
||||||
description: 'A list of projects to check for toggles in.',
|
description: 'A list of projects to check for feature flags in.',
|
||||||
oneOf: [
|
oneOf: [
|
||||||
{
|
{
|
||||||
type: 'array',
|
type: 'array',
|
||||||
items: { type: 'string' },
|
items: { type: 'string' },
|
||||||
example: ['my-project'],
|
example: ['my-project'],
|
||||||
description: 'A list of projects to check for toggles in.',
|
description:
|
||||||
|
'A list of projects to check for feature flags in.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
enum: [ALL],
|
enum: [ALL],
|
||||||
description: 'Check toggles in all projects.',
|
description: 'Check feature flags in all projects.',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user