Commit 6cfe3f10 authored by Clement Ho's avatar Clement Ho

Merge branch 'btn-group-secure-group-dashboard' into 'master'

Btn group secure group dashboard

See merge request gitlab-org/gitlab-ee!9220
parents 3263a096 e5fe9186
...@@ -42,6 +42,10 @@ ...@@ -42,6 +42,10 @@
color: $text; color: $text;
border-color: $border; border-color: $border;
&.btn-border-color {
border-color: $border-color;
}
> .icon { > .icon {
color: $text; color: $text;
} }
......
...@@ -61,13 +61,13 @@ export default { ...@@ -61,13 +61,13 @@ export default {
</script> </script>
<template> <template>
<div> <div class="btn-group">
<button <button
key="more-info" key="more-info"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('Security Reports|More info')" :aria-label="s__('Security Reports|More info')"
:title="s__('Security Reports|More info')" :title="s__('Security Reports|More info')"
class="btn btn-secondary btn-icon js-more-info" class="btn btn-inverted btn-info btn-secondary btn-border-color btn-icon js-more-info"
type="button" type="button"
@click="openModal({ vulnerability })" @click="openModal({ vulnerability })"
> >
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
:aria-label="s__('Security Reports|Create issue')" :aria-label="s__('Security Reports|Create issue')"
:loading="isCreatingIssue" :loading="isCreatingIssue"
:title="s__('Security Reports|Create issue')" :title="s__('Security Reports|Create issue')"
container-class="btn btn-inverted btn-success prepend-left-8 js-create-issue" container-class="btn btn-inverted btn-success btn-border-color js-create-issue"
type="button" type="button"
@click="handleCreateIssue" @click="handleCreateIssue"
> >
...@@ -90,12 +90,16 @@ export default { ...@@ -90,12 +90,16 @@ export default {
<loading-button <loading-button
v-if="isDismissed" v-if="isDismissed"
key="revert-dismissal" key="revert-dismissal"
:label="s__('Security Reports|Revert dismissal')" v-gl-tooltip
:aria-label="s__('Security Reports|Undo dismiss')"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
container-class="btn btn-inverted btn-warning prepend-left-8 js-revert-dismissal" :title="s__('Security Reports|Undo dismiss')"
container-class="btn btn-inverted btn-warning btn-border-color js-revert-dismissal"
type="button" type="button"
@click="handleRevertDismissal" @click="handleRevertDismissal"
/> >
<icon name="repeat" />
</loading-button>
<loading-button <loading-button
v-else v-else
key="dismiss-vulnerability" key="dismiss-vulnerability"
...@@ -103,7 +107,7 @@ export default { ...@@ -103,7 +107,7 @@ export default {
:aria-label="s__('Security Reports|Dismiss vulnerability')" :aria-label="s__('Security Reports|Dismiss vulnerability')"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
:title="s__('Security Reports|Dismiss vulnerability')" :title="s__('Security Reports|Dismiss vulnerability')"
container-class="btn btn-inverted btn-warning prepend-left-8 js-dismiss-vulnerability" container-class="btn btn-inverted btn-warning btn-border-color js-dismiss-vulnerability"
type="button" type="button"
@click="handleDismissVulnerability" @click="handleDismissVulnerability"
> >
......
---
title: Convert buttons to button group on Group Security Dashboard
merge_request: 9220
author:
type: changed
...@@ -36,8 +36,8 @@ describe('Security Dashboard Action Buttons', () => { ...@@ -36,8 +36,8 @@ describe('Security Dashboard Action Buttons', () => {
vm.$destroy(); vm.$destroy();
}); });
it('should render three buttons', () => { it('should render three buttons in a button group', () => {
expect(vm.$el.querySelectorAll('.btn')).toHaveLength(3); expect(vm.$el.querySelectorAll('.btn-group .btn')).toHaveLength(3);
}); });
describe('More Info Button', () => { describe('More Info Button', () => {
...@@ -138,8 +138,8 @@ describe('Security Dashboard Action Buttons', () => { ...@@ -138,8 +138,8 @@ describe('Security Dashboard Action Buttons', () => {
vm.$destroy(); vm.$destroy();
}); });
it('should render two buttons', () => { it('should render two buttons in a button group', () => {
expect(vm.$el.querySelectorAll('.btn')).toHaveLength(2); expect(vm.$el.querySelectorAll('.btn-group .btn')).toHaveLength(2);
}); });
it('should not render the dismiss vulnerability button', () => { it('should not render the dismiss vulnerability button', () => {
......
...@@ -8103,9 +8103,6 @@ msgstr "" ...@@ -8103,9 +8103,6 @@ msgstr ""
msgid "Security Reports|No Vulnerabilities" msgid "Security Reports|No Vulnerabilities"
msgstr "" msgstr ""
msgid "Security Reports|Revert dismissal"
msgstr ""
msgid "Security Reports|Security dashboard documentation" msgid "Security Reports|Security dashboard documentation"
msgstr "" msgstr ""
...@@ -8121,6 +8118,9 @@ msgstr "" ...@@ -8121,6 +8118,9 @@ msgstr ""
msgid "Security Reports|There was an error reverting this dismissal." msgid "Security Reports|There was an error reverting this dismissal."
msgstr "" msgstr ""
msgid "Security Reports|Undo dismiss"
msgstr ""
msgid "Security Reports|We've found no vulnerabilities for your group" msgid "Security Reports|We've found no vulnerabilities for your group"
msgstr "" msgstr ""
......
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