Commit 6566e279 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '333810-update-runner-registration-modal' into 'master'

Update runner registration token reset modal

See merge request gitlab-org/gitlab!79136
parents 8eda71fc 73f80a03
......@@ -11,8 +11,10 @@ import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../../constants';
export default {
name: 'RunnerRegistrationTokenReset',
i18n: {
modalTitle: __('Reset registration token'),
modalAction: s__('Runners|Reset token'),
modalCancel: __('Cancel'),
modalCopy: __('Are you sure you want to reset the registration token?'),
modalTitle: __('Reset registration token'),
},
components: {
GlDropdownItem,
......@@ -30,7 +32,7 @@ export default {
default: null,
},
},
modalID: 'token-reset-modal',
modalId: 'token-reset-modal',
props: {
type: {
type: String,
......@@ -111,10 +113,19 @@ export default {
};
</script>
<template>
<gl-dropdown-item v-gl-modal="$options.modalID">
<gl-dropdown-item v-gl-modal="$options.modalId">
{{ __('Reset registration token') }}
<gl-modal
:modal-id="$options.modalID"
size="sm"
:modal-id="$options.modalId"
:action-primary="{
text: $options.i18n.modalAction,
attributes: [{ variant: 'danger' }],
}"
:action-secondary="{
text: $options.i18n.modalCancel,
attributes: [{ variant: 'default' }],
}"
:title="$options.i18n.modalTitle"
@primary="handleModalPrimary"
>
......
......@@ -30900,6 +30900,9 @@ msgstr ""
msgid "Runners|Registration token copied!"
msgstr ""
msgid "Runners|Reset token"
msgstr ""
msgid "Runners|Revision"
msgstr ""
......
......@@ -472,7 +472,7 @@ RSpec.describe "Admin Runners" do
click_on 'Reset registration token'
within_modal do
click_button('OK', match: :first)
click_button('Reset token', match: :first)
end
wait_for_requests
......
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