diff options
Diffstat (limited to 'app/assets/javascripts/runner/components/registration/registration_dropdown.vue')
-rw-r--r-- | app/assets/javascripts/runner/components/registration/registration_dropdown.vue | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/app/assets/javascripts/runner/components/registration/registration_dropdown.vue b/app/assets/javascripts/runner/components/registration/registration_dropdown.vue index bb2a8ddf151..212ad5fa5a0 100644 --- a/app/assets/javascripts/runner/components/registration/registration_dropdown.vue +++ b/app/assets/javascripts/runner/components/registration/registration_dropdown.vue @@ -1,11 +1,5 @@ <script> -import { - GlFormGroup, - GlDropdown, - GlDropdownForm, - GlDropdownItem, - GlDropdownDivider, -} from '@gitlab/ui'; +import { GlDropdown, GlDropdownForm, GlDropdownItem, GlDropdownDivider } from '@gitlab/ui'; import { s__ } from '~/locale'; import RunnerInstructionsModal from '~/vue_shared/components/runner_instructions/runner_instructions_modal.vue'; import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../../constants'; @@ -17,10 +11,8 @@ export default { showInstallationInstructions: s__( 'Runners|Show runner installation and registration instructions', ), - registrationToken: s__('Runners|Registration token'), }, components: { - GlFormGroup, GlDropdown, GlDropdownForm, GlDropdownItem, @@ -45,7 +37,6 @@ export default { data() { return { currentRegistrationToken: this.registrationToken, - instructionsModalOpened: false, }; }, computed: { @@ -64,15 +55,7 @@ export default { }, methods: { onShowInstructionsClick() { - // Rendering the modal on demand, to avoid - // loading instructions prematurely from API. - this.instructionsModalOpened = true; - - this.$nextTick(() => { - // $refs.runnerInstructionsModal is defined in - // the tick after the modal is rendered - this.$refs.runnerInstructionsModal.show(); - }); + this.$refs.runnerInstructionsModal.show(); }, onTokenReset(token) { this.currentRegistrationToken = token; @@ -94,7 +77,6 @@ export default { <gl-dropdown-item @click.capture.native.stop="onShowInstructionsClick"> {{ $options.i18n.showInstallationInstructions }} <runner-instructions-modal - v-if="instructionsModalOpened" ref="runnerInstructionsModal" :registration-token="currentRegistrationToken" data-testid="runner-instructions-modal" @@ -102,9 +84,7 @@ export default { </gl-dropdown-item> <gl-dropdown-divider /> <gl-dropdown-form class="gl-p-4!"> - <gl-form-group class="gl-mb-0" :label="$options.i18n.registrationToken"> - <registration-token :value="currentRegistrationToken" /> - </gl-form-group> + <registration-token input-id="token-value" :value="currentRegistrationToken" /> </gl-dropdown-form> <gl-dropdown-divider /> <registration-token-reset-dropdown-item :type="type" @tokenReset="onTokenReset" /> |