diff --git a/changes/issue-2809-host-details-policy-unknown-no-cta b/changes/issue-2809-host-details-policy-unknown-no-cta new file mode 100644 index 0000000000..180a420c7a --- /dev/null +++ b/changes/issue-2809-host-details-policy-unknown-no-cta @@ -0,0 +1 @@ +* When a host's policy status is unknown, there is no CTA to filter hosts by unknown policy status \ No newline at end of file diff --git a/frontend/pages/hosts/HostDetailsPage/HostPoliciesTable/HostPoliciesTableConfig.tsx b/frontend/pages/hosts/HostDetailsPage/HostPoliciesTable/HostPoliciesTableConfig.tsx index 645230437a..6e149fa71c 100644 --- a/frontend/pages/hosts/HostDetailsPage/HostPoliciesTable/HostPoliciesTableConfig.tsx +++ b/frontend/pages/hosts/HostDetailsPage/HostPoliciesTable/HostPoliciesTableConfig.tsx @@ -95,21 +95,25 @@ const generatePolicyTableHeaders = ( disableSortBy: true, Cell: (cellProps) => { return ( - - View all hosts{" "} - link to hosts filtered by policy ID - + <> + {cellProps.row.original.response && ( + + View all hosts{" "} + link to hosts filtered by policy ID + + )} + ); }, }, diff --git a/frontend/pages/hosts/HostDetailsPage/_styles.scss b/frontend/pages/hosts/HostDetailsPage/_styles.scss index 896f732fb3..61ebdcb28b 100644 --- a/frontend/pages/hosts/HostDetailsPage/_styles.scss +++ b/frontend/pages/hosts/HostDetailsPage/_styles.scss @@ -434,6 +434,10 @@ th:first-child { width: 70%; } + + .response__header { + border-right: none; + } } .section--software {