Commit c05ea6c3 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '342464-update-button-on-incident-and-alert' into 'master'

Fix serverity and alert sidebar edit button style

See merge request gitlab-org/gitlab!75914
parents 3ee56f67 ebe66e32
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
GlLoadingIcon, GlLoadingIcon,
GlTooltip, GlTooltip,
GlSprintf, GlSprintf,
GlLink, GlButton,
} from '@gitlab/ui'; } from '@gitlab/ui';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { INCIDENT_SEVERITY, ISSUABLE_TYPES, I18N } from './constants'; import { INCIDENT_SEVERITY, ISSUABLE_TYPES, I18N } from './constants';
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
GlSprintf, GlSprintf,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlLink, GlButton,
SeverityToken, SeverityToken,
}, },
inject: ['canUpdate'], inject: ['canUpdate'],
...@@ -150,23 +150,25 @@ export default { ...@@ -150,23 +150,25 @@ export default {
<div class="hide-collapsed"> <div class="hide-collapsed">
<p <p
class="gl-line-height-20 gl-mb-0 gl-text-gray-900 gl-display-flex gl-justify-content-space-between" class="gl-line-height-20 gl-mb-2 gl-text-gray-900 gl-display-flex gl-justify-content-space-between"
> >
{{ $options.i18n.SEVERITY }} {{ $options.i18n.SEVERITY }}
<gl-link <gl-button
v-if="canUpdate" v-if="canUpdate"
category="tertiary"
size="small"
data-testid="editButton" data-testid="editButton"
href="#"
@click="toggleFormDropdown" @click="toggleFormDropdown"
@keydown.esc="hideDropdown" @keydown.esc="hideDropdown"
> >
{{ $options.i18n.EDIT }} {{ $options.i18n.EDIT }}
</gl-link> </gl-button>
</p> </p>
<gl-dropdown <gl-dropdown
:class="dropdownClass" :class="dropdownClass"
block block
:header-text="__('Assign severity')"
:text="selectedItem.label" :text="selectedItem.label"
toggle-class="dropdown-menu-toggle gl-mb-2" toggle-class="dropdown-menu-toggle gl-mb-2"
@keydown.esc.native="hideDropdown" @keydown.esc.native="hideDropdown"
......
...@@ -220,16 +220,17 @@ export default { ...@@ -220,16 +220,17 @@ export default {
class="gl-text-gray-900 gl-mb-2 gl-line-height-20 gl-display-flex gl-justify-content-space-between" class="gl-text-gray-900 gl-mb-2 gl-line-height-20 gl-display-flex gl-justify-content-space-between"
> >
{{ __('Assignee') }} {{ __('Assignee') }}
<a <gl-button
v-if="isEditable" v-if="isEditable"
ref="editButton" ref="editButton"
class="btn-link" category="tertiary"
href="#" size="small"
class="gl-text-black-normal!"
@click="toggleFormDropdown" @click="toggleFormDropdown"
@keydown.esc="hideDropdown" @keydown.esc="hideDropdown"
> >
{{ __('Edit') }} {{ __('Edit') }}
</a> </gl-button>
</p> </p>
<gl-dropdown <gl-dropdown
......
...@@ -100,7 +100,8 @@ export default { ...@@ -100,7 +100,8 @@ export default {
<gl-button <gl-button
v-if="isEditable" v-if="isEditable"
class="gl-text-black-normal!" class="gl-text-black-normal!"
variant="link" category="tertiary"
size="small"
@click="toggleFormDropdown" @click="toggleFormDropdown"
@keydown.esc="hideDropdown" @keydown.esc="hideDropdown"
> >
......
...@@ -4769,6 +4769,9 @@ msgstr "" ...@@ -4769,6 +4769,9 @@ msgstr ""
msgid "Assign reviewer(s)" msgid "Assign reviewer(s)"
msgstr "" msgstr ""
msgid "Assign severity"
msgstr ""
msgid "Assign some issues to this milestone." msgid "Assign some issues to this milestone."
msgstr "" msgstr ""
......
...@@ -60,7 +60,7 @@ RSpec.describe 'Alert details', :js do ...@@ -60,7 +60,7 @@ RSpec.describe 'Alert details', :js do
expect(alert_status).to have_content('Triggered') expect(alert_status).to have_content('Triggered')
find('.btn-link').click find('.gl-button').click
find('.gl-new-dropdown-item', text: 'Acknowledged').click find('.gl-new-dropdown-item', text: 'Acknowledged').click
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