Skip to content
Snippets Groups Projects

Add feature flag for CI variables drawer

Merged Mireya Andres requested to merge ma/ci-variable-drawer-ff into master
3 files
+ 21
14
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -11,7 +11,7 @@ import {
GlLink,
GlSprintf,
} from '@gitlab/ui';
import { s__ } from '~/locale';
import { __, s__ } from '~/locale';
import { DRAWER_Z_INDEX } from '~/lib/utils/constants';
import { getContentWrapperHeight } from '~/lib/utils/dom_utils';
import { helpPagePath } from '~/helpers/help_page_helper';
@@ -27,11 +27,15 @@ import CiEnvironmentsDropdown from './ci_environments_dropdown.vue';
import { awsTokenList } from './ci_variable_autocomplete_tokens';
const i18n = {
header: s__('CiVariables|Add Variable'),
addVariable: s__('CiVariables|Add Variable'),
cancel: __('Cancel'),
environments: __('Environments'),
environmentScopeLinkTitle: ENVIRONMENT_SCOPE_LINK_TITLE,
expandedField: s__('CiVariables|Expand variable reference'),
expandedDescription: EXPANDED_VARIABLES_NOTE,
flags: __('Flags'),
flagsLinkTitle: FLAG_LINK_TITLE,
key: __('Key'),
maskedField: s__('CiVariables|Mask variable'),
maskedDescription: s__(
'CiVariables|Variable will be masked in job logs. Requires values to meet regular expression requirements.',
@@ -40,6 +44,8 @@ const i18n = {
protectedDescription: s__(
'CiVariables|Export variable to pipelines running on protected branches and tags only.',
),
type: __('Type'),
value: __('Value'),
};
export default {
@@ -113,9 +119,13 @@ export default {
@close="close"
>
<template #title>
<h2 class="gl-m-0">{{ $options.i18n.header }}</h2>
<h2 class="gl-m-0">{{ $options.i18n.addVariable }}</h2>
</template>
<gl-form-group :label="__('Type')" label-for="ci-variable-type" class="gl-border-none gl-mb-n5">
<gl-form-group
:label="$options.i18n.type"
label-for="ci-variable-type"
class="gl-border-none gl-mb-n5"
>
<gl-form-select
id="ci-variable-type"
v-model="variableType"
@@ -130,7 +140,7 @@ export default {
<template #label>
<div class="gl-display-flex gl-align-items-center">
<span class="gl-mr-2">
{{ __('Environments') }}
{{ $options.i18n.environments }}
</span>
<gl-link
class="gl-display-flex"
@@ -155,7 +165,7 @@ export default {
<template #label>
<div class="gl-display-flex gl-align-items-center gl-mb-n3">
<span class="gl-mr-2">
{{ __('Flags') }}
{{ $options.i18n.flags }}
</span>
<gl-link
class="gl-display-flex"
@@ -191,13 +201,13 @@ export default {
<gl-form-combobox
v-model="key"
:token-list="$options.awsTokenList"
:label-text="__('Key')"
:label-text="$options.i18n.key"
class="gl-border-none gl-pb-0! gl-mb-n5"
data-testid="pipeline-form-ci-variable-key"
data-qa-selector="ci_variable_key_field"
/>
<gl-form-group
:label="__('Value')"
:label="$options.i18n.value"
label-for="ci-variable-value"
class="gl-border-none gl-mb-n2"
>
@@ -213,10 +223,10 @@ export default {
</gl-form-group>
<div class="gl-display-flex gl-justify-content-end">
<gl-button category="primary" class="gl-mr-3" data-testid="cancel-button" @click="close"
>{{ __('Cancel') }}
>{{ $options.i18n.cancel }}
</gl-button>
<gl-button category="primary" variant="confirm" data-testid="confirm-button"
>{{ __('Add Variable') }}
>{{ $options.i18n.addVariable }}
</gl-button>
</div>
</gl-drawer>
Loading