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