Commit 1ef426a0 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '228891-hide-csv-export-button-when-unconfigured' into 'master'

Do not render export button when uninitialized

See merge request gitlab-org/gitlab!36843
parents b08af190 2d6d5621
...@@ -101,7 +101,10 @@ export default { ...@@ -101,7 +101,10 @@ export default {
<template #header> <template #header>
<header class="page-title-holder flex-fill d-flex align-items-center"> <header class="page-title-holder flex-fill d-flex align-items-center">
<h2 class="page-title flex-grow">{{ s__('SecurityReports|Security Dashboard') }}</h2> <h2 class="page-title flex-grow">{{ s__('SecurityReports|Security Dashboard') }}</h2>
<csv-export-button :vulnerabilities-export-endpoint="vulnerabilitiesExportEndpoint" /> <csv-export-button
v-if="!shouldShowEmptyState"
:vulnerabilities-export-endpoint="vulnerabilitiesExportEndpoint"
/>
<gl-button <gl-button
class="page-title-controls ml-2" class="page-title-controls ml-2"
:variant="toggleButtonProps.variant" :variant="toggleButtonProps.variant"
......
---
title: Do not render export button when instance level security dashbaord is uninitialized
merge_request: 36843
author:
type: fixed
...@@ -108,6 +108,10 @@ describe('First Class Instance Dashboard Component', () => { ...@@ -108,6 +108,10 @@ describe('First Class Instance Dashboard Component', () => {
expect(findEmptyState().props()).toEqual({}); expect(findEmptyState().props()).toEqual({});
}); });
it('does not render the export button', () => {
expect(findCsvExportButton().exists()).toBe(false);
});
it('does not render the vulnerability list', () => { it('does not render the vulnerability list', () => {
expect(findInstanceVulnerabilities().exists()).toBe(false); expect(findInstanceVulnerabilities().exists()).toBe(false);
}); });
......
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