Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ba1ffdd5
Commit
ba1ffdd5
authored
Aug 18, 2020
by
Jeremy Elder
Committed by
Jose Ivan Vargas
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace deprecated buttons in dismiss_button.vue
parent
556f7ced
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
21 deletions
+28
-21
ee/app/assets/javascripts/vue_shared/security_reports/components/dismiss_button.vue
...vue_shared/security_reports/components/dismiss_button.vue
+17
-18
ee/changelogs/unreleased/219838-replace-gl-deprecated-button-with-gl-button-in-ee-app-assets-ja.yml
...-deprecated-button-with-gl-button-in-ee-app-assets-ja.yml
+5
-0
ee/spec/frontend/vue_shared/security_reports/components/dismiss_button_spec.js
...shared/security_reports/components/dismiss_button_spec.js
+3
-3
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/vue_shared/security_reports/components/dismiss_button.vue
View file @
ba1ffdd5
<
script
>
import
{
Gl
Deprecated
Button
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
LoadingButton
from
'
~/vue_shared/components/loading_button.vue
'
;
export
default
{
name
:
'
DismissButton
'
,
components
:
{
GlDeprecatedButton
,
Icon
,
LoadingButton
,
GlButton
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -51,25 +47,28 @@ export default {
<
template
>
<div
class=
"btn-group"
role=
"group"
>
<
loading
-button
<
gl
-button
:loading=
"isDismissing"
:disabled=
"isDismissing || disabled"
:label=
"buttonText"
container-class=
"js-dismiss-btn btn btn-close"
variant=
"warning"
category=
"secondary"
class=
"js-dismiss-btn"
@
click=
"handleDismissClick"
/>
<gl-deprecated-button
>
{{
__
(
buttonText
)
}}
</gl-button>
<gl-button
v-if=
"!isDismissed"
v-gl-tooltip
.
hover
v-gl-tooltip
.
focus
v-gl-tooltip
:disabled=
"disabled"
:title=
"s__('vulnerability|Add comment & dismiss')"
variant=
"close"
:title=
"s__('vulnerability|Add comment and dismiss')"
variant=
"warning"
category=
"secondary"
data-qa-selector=
"dismiss_with_comment_button"
class=
"js-dismiss-with-comment "
:aria-label=
"s__('vulnerability|Add comment and dismiss')"
icon=
"comment"
@
click=
"$emit('openDismissalCommentBox')"
>
<icon
name=
"comment"
/>
</gl-deprecated-button>
/>
</div>
</
template
>
ee/changelogs/unreleased/219838-replace-gl-deprecated-button-with-gl-button-in-ee-app-assets-ja.yml
0 → 100644
View file @
ba1ffdd5
---
title
:
Replace deprecated button with new button
merge_request
:
38695
author
:
type
:
other
ee/spec/frontend/vue_shared/security_reports/components/dismiss_button_spec.js
View file @
ba1ffdd5
import
{
mount
}
from
'
@vue/test-utils
'
;
import
component
from
'
ee/vue_shared/security_reports/components/dismiss_button.vue
'
;
import
LoadingButton
from
'
~/vue_shared/components/loading_button.vue
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
describe
(
'
DismissalButton
'
,
()
=>
{
let
wrapper
;
...
...
@@ -22,7 +22,7 @@ describe('DismissalButton', () => {
});
it
(
'
should emit dismiss vulnerabilty when clicked
'
,
()
=>
{
wrapper
.
find
(
Loading
Button
).
trigger
(
'
click
'
);
wrapper
.
find
(
Gl
Button
).
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
dismissVulnerability
).
toBeTruthy
();
});
...
...
@@ -53,7 +53,7 @@ describe('DismissalButton', () => {
});
it
(
'
should emit revertDismissVulnerabilty when clicked
'
,
()
=>
{
wrapper
.
find
(
Loading
Button
).
trigger
(
'
click
'
);
wrapper
.
find
(
Gl
Button
).
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
revertDismissVulnerability
).
toBeTruthy
();
});
...
...
locale/gitlab.pot
View file @
ba1ffdd5
...
...
@@ -29940,6 +29940,9 @@ msgstr ""
msgid "vulnerability|Add comment & dismiss"
msgstr ""
msgid "vulnerability|Add comment and dismiss"
msgstr ""
msgid "vulnerability|Dismiss vulnerability"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment