Commit 73f80a03 authored by Miguel Rincon's avatar Miguel Rincon

Update runner registration token reset modal

This change updates the runner registration modal to reduce it's size
and mark it as destructive action.

Changelog: changed
parent ec3e3942
......@@ -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"
>
......
......@@ -30882,6 +30882,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