Host Details Page: No CTA for policies that have unknown status (#2841)

This commit is contained in:
RachelElysia 2021-11-08 14:19:50 -08:00 committed by GitHub
parent 7911493d6b
commit 8196fd0117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 15 deletions

View File

@ -0,0 +1 @@
* When a host's policy status is unknown, there is no CTA to filter hosts by unknown policy status

View File

@ -95,21 +95,25 @@ const generatePolicyTableHeaders = (
disableSortBy: true,
Cell: (cellProps) => {
return (
<Link
to={
PATHS.MANAGE_HOSTS +
TAGGED_TEMPLATES.hostsByPolicyRoute(
cellProps.row.original.id,
cellProps.row.original.response === "pass"
? PolicyResponse.PASSING
: PolicyResponse.FAILING
)
}
className={`policy-link`}
>
View all hosts{" "}
<img alt="link to hosts filtered by policy ID" src={Chevron} />
</Link>
<>
{cellProps.row.original.response && (
<Link
to={
PATHS.MANAGE_HOSTS +
TAGGED_TEMPLATES.hostsByPolicyRoute(
cellProps.row.original.id,
cellProps.row.original.response === "pass"
? PolicyResponse.PASSING
: PolicyResponse.FAILING
)
}
className={`policy-link`}
>
View all hosts{" "}
<img alt="link to hosts filtered by policy ID" src={Chevron} />
</Link>
)}
</>
);
},
},

View File

@ -434,6 +434,10 @@
th:first-child {
width: 70%;
}
.response__header {
border-right: none;
}
}
.section--software {