diff --git a/changes/issue-6021-host-details-policy-banners b/changes/issue-6021-host-details-policy-banners new file mode 100644 index 0000000000..a8c3ce87dd --- /dev/null +++ b/changes/issue-6021-host-details-policy-banners @@ -0,0 +1 @@ +* Update failing policy banner to include CTA for device user, hide no response banner from device user \ No newline at end of file diff --git a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx index a118ac8822..e762bf837b 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx @@ -560,7 +560,14 @@ const HostDetailsPage = ({ Details Software Schedule - Policies + + {titleData.issues.failing_policies_count > 0 && ( + + {titleData.issues.failing_policies_count} + + )} + Policies + { - const { policyList } = policyProps; - + deviceUser?: boolean; +} +const PolicyFailingCount = ({ + policyList, + deviceUser, +}: IPolicyFailingCountProps): JSX.Element | null => { const failCount = policyList.reduce((sum, policy) => { return policy.response === "fail" ? sum + 1 : sum; }, 0); @@ -24,7 +27,8 @@ const PolicyFailingCount = (policyProps: {

Click a policy below to see if there are steps you can take to resolve the issue - {failCount > 1 ? "s" : ""}. + {failCount > 1 ? "s" : ""}.{" "} + {deviceUser && " Once resolved, click “Refetch” above to confirm."}

) : null; diff --git a/frontend/pages/hosts/details/cards/Policies/Policies.tsx b/frontend/pages/hosts/details/cards/Policies/Policies.tsx index 398147cec9..314f63f87b 100644 --- a/frontend/pages/hosts/details/cards/Policies/Policies.tsx +++ b/frontend/pages/hosts/details/cards/Policies/Policies.tsx @@ -61,9 +61,9 @@ const Policies = ({ {policies.length > 0 && ( <> {failingResponses?.length > 0 && ( - + )} - {noResponses?.length > 0 && ( + {noResponses?.length > 0 && !deviceUser && (

This host is not updating the response for some policies. Check