Commit 2d6d5621 authored by Savas Vedova's avatar Savas Vedova

Do not render export button when uninitialized

parent 828b1681
...@@ -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