From bf4713b7424380617910bdbbed8983efa6d48621 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Wed, 23 Mar 2022 10:57:42 -0400 Subject: [PATCH] Remove vuln count detail for device user, fix padding/margins (#4744) --- .../pages/hosts/SoftwareTab/SoftwareTab.tsx | 7 ++++++- .../SoftwareVulnCount/SoftwareVulnCount.tsx | 18 ++++++++++++------ .../SoftwareTab/SoftwareVulnCount/_styles.scss | 3 +-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/frontend/pages/hosts/SoftwareTab/SoftwareTab.tsx b/frontend/pages/hosts/SoftwareTab/SoftwareTab.tsx index 9a1bc8d987..d1770c9e84 100644 --- a/frontend/pages/hosts/SoftwareTab/SoftwareTab.tsx +++ b/frontend/pages/hosts/SoftwareTab/SoftwareTab.tsx @@ -68,7 +68,12 @@ const SoftwareTable = ({ {software?.length ? ( <> - {software && } + {software && ( + + )} {software && ( { + deviceUser, +}: ISoftwareVulnCountProps): JSX.Element => { const vulnCount = softwareList.reduce((sum, software) => { return software.vulnerabilities ? sum + software.vulnerabilities.length @@ -26,12 +28,16 @@ const SoftwareVulnCount = ({ ? "1 vulnerability detected" : `${vulnCount} vulnerabilities detected`} -

- Click a vulnerable item below to see the associated Common - Vulnerabilites and Exposures (CVEs). -

+ {!deviceUser && ( +

+ Click a vulnerable item below to see the associated Common + Vulnerabilites and Exposures (CVEs). +

+ )} - ) : null; + ) : ( + <> + ); }; export default SoftwareVulnCount; diff --git a/frontend/pages/hosts/SoftwareTab/SoftwareVulnCount/_styles.scss b/frontend/pages/hosts/SoftwareTab/SoftwareVulnCount/_styles.scss index 6d92e0e62b..83b1c77f7c 100644 --- a/frontend/pages/hosts/SoftwareTab/SoftwareVulnCount/_styles.scss +++ b/frontend/pages/hosts/SoftwareTab/SoftwareVulnCount/_styles.scss @@ -7,12 +7,11 @@ overflow: auto; margin-bottom: $pad-large; padding: $pad-large; - padding-bottom: $pad-small; p { padding-left: $pad-large; margin-top: $pad-medium; - margin-bottom: $pad-medium; + margin-bottom: 0; } img {