Commit bcd70e13 authored by Mark Florian's avatar Mark Florian

Remove popover in Group Security Dashboard filter

Since we now support all report types, this popover is no longer needed.
The `dashboardDocumentation` prop also no longer needs to be passed down
to the `filters` and `filter` components, hence the various deletions,
including the entire now-unused `report_type_popup` component.

Also remove now-unused translatable strings.
parent d5c30285
......@@ -92,7 +92,7 @@ export default {
<template>
<div>
<filters :dashboard-documentation="dashboardDocumentation" />
<filters />
<vulnerability-count-list />
<vulnerability-chart />
......
......@@ -2,13 +2,11 @@
import { mapGetters, mapActions } from 'vuex';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import ReportTypePopover from './report_type_popover.vue';
export default {
components: {
GlDropdown,
GlDropdownItem,
ReportTypePopover,
Icon,
},
props: {
......@@ -16,10 +14,6 @@ export default {
type: String,
required: true,
},
dashboardDocumentation: {
type: String,
required: true,
},
},
computed: {
...mapGetters('filters', ['getFilter', 'getSelectedOptions', 'getSelectedOptionNames']),
......@@ -51,10 +45,6 @@ export default {
<template>
<div class="dashboard-filter">
<strong class="js-name">{{ filter.name }}</strong>
<report-type-popover
v-if="filterId === 'report_type'"
:dashboard-documentation="dashboardDocumentation"
/>
<gl-dropdown class="d-block mt-1">
<template slot="button-content">
<span class="text-truncate">
......
......@@ -6,12 +6,6 @@ export default {
components: {
DashboardFilter,
},
props: {
dashboardDocumentation: {
type: String,
required: true,
},
},
computed: {
...mapState('filters', ['filters']),
},
......@@ -26,7 +20,6 @@ export default {
:key="filter.id"
class="col-sm-6 col-md-4 col-lg-2 p-2 js-filter"
:filter-id="filter.id"
:dashboard-documentation="dashboardDocumentation"
/>
</div>
</div>
......
<script>
import { GlPopover } from '@gitlab/ui';
import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
GlPopover,
Icon,
},
props: {
dashboardDocumentation: {
type: String,
required: true,
},
},
linkTitle: s__('Security Reports|Security dashboard documentation'),
};
</script>
<template>
<span class="vertical-align-middle text-muted js-help">
<icon id="reports-info" name="question" :aria-label="__('help')" />
<gl-popover
target="reports-info"
placement="right"
triggers="click"
:title="
s__(
'Security Reports|At this time, the security dashboard only supports SAST and dependency scanning.',
)
"
>
<a
v-if="dashboardDocumentation"
target="_blank"
rel="noopener noreferrer"
:title="$options.linkTitle"
:href="dashboardDocumentation"
>
<span class="vertical-align-middle">{{ $options.linkTitle }}</span>
<icon name="external-link" :size="16" class="vertical-align-middle" />
</a>
</gl-popover>
</span>
</template>
......@@ -11,7 +11,7 @@ describe('Filter component', () => {
describe('severity', () => {
beforeEach(() => {
props = { filterId: 'severity', dashboardDocumentation: '' };
props = { filterId: 'severity' };
vm = mountComponentWithStore(Component, { store, props });
});
......@@ -30,20 +30,5 @@ describe('Filter component', () => {
it('should display "Severity" as the option name', () => {
expect(vm.$el.querySelector('.js-name').textContent).toContain('Severity');
});
it('should not display the help popover', () => {
expect(vm.$el.querySelector('.js-help')).toBeNull();
});
});
describe('Report type', () => {
beforeEach(() => {
props = { filterId: 'report_type', dashboardDocumentation: '' };
vm = mountComponentWithStore(Component, { store, props });
});
it('should display the help popover', () => {
expect(vm.$el.querySelector('.js-help')).not.toBeNull();
});
});
});
......@@ -5,13 +5,12 @@ import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper
describe('Filter component', () => {
let vm;
const props = { dashboardDocumentation: '' };
const store = createStore();
const Component = Vue.extend(component);
describe('severity', () => {
beforeEach(() => {
vm = mountComponentWithStore(Component, { store, props });
vm = mountComponentWithStore(Component, { store });
});
afterEach(() => {
......
......@@ -8921,9 +8921,6 @@ msgstr ""
msgid "Security Dashboard|Issue Created"
msgstr ""
msgid "Security Reports|At this time, the security dashboard only supports SAST and dependency scanning."
msgstr ""
msgid "Security Reports|Create issue"
msgstr ""
......@@ -8939,9 +8936,6 @@ msgstr ""
msgid "Security Reports|No Vulnerabilities"
msgstr ""
msgid "Security Reports|Security dashboard documentation"
msgstr ""
msgid "Security Reports|There was an error creating the issue."
msgstr ""
......@@ -12128,9 +12122,6 @@ msgstr ""
msgid "group"
msgstr ""
msgid "help"
msgstr ""
msgid "here"
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