mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Remove vuln count detail for device user, fix padding/margins (#4744)
This commit is contained in:
parent
778de64011
commit
bf4713b742
3 changed files with 19 additions and 9 deletions
|
|
@ -68,7 +68,12 @@ const SoftwareTable = ({
|
|||
|
||||
{software?.length ? (
|
||||
<>
|
||||
{software && <SoftwareVulnCount softwareList={software} />}
|
||||
{software && (
|
||||
<SoftwareVulnCount
|
||||
softwareList={software}
|
||||
deviceUser={deviceUser}
|
||||
/>
|
||||
)}
|
||||
{software && (
|
||||
<TableContainer
|
||||
columns={tableHeaders}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,13 @@ const baseClass = "software-vuln-count";
|
|||
|
||||
interface ISoftwareVulnCountProps {
|
||||
softwareList: ISoftware[];
|
||||
deviceUser?: boolean;
|
||||
}
|
||||
|
||||
const SoftwareVulnCount = ({
|
||||
softwareList,
|
||||
}: ISoftwareVulnCountProps): JSX.Element | null => {
|
||||
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`}
|
||||
</div>
|
||||
<p>
|
||||
Click a vulnerable item below to see the associated Common
|
||||
Vulnerabilites and Exposures (CVEs).
|
||||
</p>
|
||||
{!deviceUser && (
|
||||
<p>
|
||||
Click a vulnerable item below to see the associated Common
|
||||
Vulnerabilites and Exposures (CVEs).
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
) : null;
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
};
|
||||
|
||||
export default SoftwareVulnCount;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue