add missing Fleet MDM banner on host details page (#9797)

https://github.com/fleetdm/fleet/issues/9794
This commit is contained in:
Roberto Dip 2023-02-10 18:17:12 -03:00 committed by GitHub
parent 793ca1b058
commit 9dc81228df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -654,12 +654,16 @@ const HostDetailsPage = ({
router.push(navPath);
};
const isMdmUnenrolled =
host?.mdm.enrollment_status === "Off" || !host?.mdm.enrollment_status;
return (
<MainContent className={baseClass}>
<div className={`${baseClass}__wrapper`}>
<div className={`${baseClass}__header-links`}>
{host?.platform === "darwin" &&
host?.mdm.enrollment_status === "Off" && (
isMdmUnenrolled &&
config?.mdm.enabled_and_configured && (
<InfoBanner color="yellow" pageLevel>
To change settings and install software, ask the end user to
follow the <strong>Turn on MDM</strong> instructions on their{" "}