Commit 455ddb38 authored by Nathan Friend's avatar Nathan Friend

Merge branch 'migrate-feature-flags-config-to-gitlab-ui' into 'master'

Migrate Configure Feature Flags Modal to GitLab UI

See merge request gitlab-org/gitlab!46055
parents bdd3d645 91c43d98
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { import {
GlFormGroup, GlFormGroup,
GlFormInput, GlFormInput,
GlFormInputGroup,
GlModal, GlModal,
GlTooltipDirective, GlTooltipDirective,
GlLoadingIcon, GlLoadingIcon,
...@@ -17,6 +18,7 @@ export default { ...@@ -17,6 +18,7 @@ export default {
components: { components: {
GlFormGroup, GlFormGroup,
GlFormInput, GlFormInput,
GlFormInputGroup,
GlModal, GlModal,
ModalCopyButton, ModalCopyButton,
GlIcon, GlIcon,
...@@ -167,63 +169,47 @@ export default { ...@@ -167,63 +169,47 @@ export default {
</template> </template>
</gl-sprintf> </gl-sprintf>
</callout> </callout>
<div class="form-group"> <gl-form-group :label="$options.translations.apiUrlLabelText" label-for="api-url">
<label for="api_url" class="label-bold">{{ $options.translations.apiUrlLabelText }}</label> <gl-form-input-group id="api-url" :value="unleashApiUrl" readonly type="text" name="api-url">
<div class="input-group"> <template #append>
<input
id="api_url"
:value="unleashApiUrl"
readonly
class="form-control"
type="text"
name="api_url"
/>
<span class="input-group-append">
<modal-copy-button <modal-copy-button
:text="unleashApiUrl" :text="unleashApiUrl"
:title="$options.translations.apiUrlCopyText" :title="$options.translations.apiUrlCopyText"
:modal-id="modalId" :modal-id="modalId"
class="input-group-text"
/> />
</span> </template>
</div> </gl-form-input-group>
</div> </gl-form-group>
<div class="form-group"> <gl-form-group :label="$options.translations.instanceIdLabelText" label-for="instance_id">
<label for="instance_id" class="label-bold">{{ <gl-form-input-group>
$options.translations.instanceIdLabelText <gl-form-input
}}</label>
<div class="input-group">
<input
id="instance_id" id="instance_id"
:value="instanceId" :value="instanceId"
class="form-control"
type="text" type="text"
name="instance_id" name="instance_id"
readonly readonly
:disabled="isRotating" :disabled="isRotating"
/> />
<gl-loading-icon <gl-loading-icon
v-if="isRotating" v-if="isRotating"
class="position-absolute align-self-center instance-id-loading-icon" class="gl-absolute gl-align-self-center gl-right-5 gl-mr-7"
/> />
<div class="input-group-append"> <template #append>
<modal-copy-button <modal-copy-button
:text="instanceId" :text="instanceId"
:title="$options.translations.instanceIdCopyText" :title="$options.translations.instanceIdCopyText"
:modal-id="modalId" :modal-id="modalId"
:disabled="isRotating" :disabled="isRotating"
class="input-group-text"
/> />
</div> </template>
</div> </gl-form-input-group>
</div> </gl-form-group>
<div <div
v-if="hasRotateError" v-if="hasRotateError"
class="text-danger d-flex align-items-center font-weight-normal mb-2" class="gl-text-red-500 gl-display-flex gl-align-items-center gl-font-weight-normal gl-mb-3"
> >
<gl-icon name="warning" class="mr-1" /> <gl-icon name="warning" class="gl-mr-2" />
<span>{{ $options.translations.instanceIdRegenerateError }}</span> <span>{{ $options.translations.instanceIdRegenerateError }}</span>
</div> </div>
<callout <callout
......
---
title: Migrate Configure Feature Flags Modal to GitLab UI
merge_request: 46055
author:
type: added
...@@ -25,7 +25,3 @@ $label-blue: #428bca; ...@@ -25,7 +25,3 @@ $label-blue: #428bca;
.clear-search-input { .clear-search-input {
top: 1px; top: 1px;
} }
.instance-id-loading-icon {
right: 52px;
}
...@@ -99,13 +99,13 @@ describe('Configure Feature Flags Modal', () => { ...@@ -99,13 +99,13 @@ describe('Configure Feature Flags Modal', () => {
}); });
it('should display the api URL in an input box', () => { it('should display the api URL in an input box', () => {
const input = wrapper.find('#api_url'); const input = wrapper.find('#api-url');
expect(input.element.value).toBe('/api/url'); expect(input.attributes('value')).toBe('/api/url');
}); });
it('should display the instance ID in an input box', () => { it('should display the instance ID in an input box', () => {
const input = wrapper.find('#instance_id'); const input = wrapper.find('#instance_id');
expect(input.element.value).toBe('instance-id-token'); expect(input.attributes('value')).toBe('instance-id-token');
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment