Clarify MDM status tooltips (#47675)
**Related issue:** Resolves #46245 # Checklist for submitter ## Testing - [x] QA'd all new/changed functionality manually <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Refined MDM enrollment status filter tooltip text for improved clarity on enrollment states. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
+10
-33
@@ -13,6 +13,7 @@ import {
|
||||
BootstrapPackageStatus,
|
||||
IMdmSolution,
|
||||
MDM_ENROLLMENT_STATUS_UI_MAP,
|
||||
MdmEnrollmentStatus,
|
||||
MdmProfileStatus,
|
||||
IMdmProfile,
|
||||
MdmEnrollmentFilterValue,
|
||||
@@ -30,6 +31,7 @@ import {
|
||||
import { ScriptBatchHostCountV1 } from "services/entities/scripts";
|
||||
|
||||
import {
|
||||
MDM_STATUS_TOOLTIP,
|
||||
PLATFORM_LABEL_DISPLAY_NAMES,
|
||||
PLATFORM_TYPE_ICONS,
|
||||
isPlatformLabelNameFromAPI,
|
||||
@@ -402,45 +404,20 @@ const HostsFilterBlock = ({
|
||||
const renderMDMEnrollmentFilterBlock = () => {
|
||||
if (!mdmEnrollmentStatus) return null;
|
||||
|
||||
const matchedStatus = Object.entries(MDM_ENROLLMENT_STATUS_UI_MAP).find(
|
||||
([, v]) => v.filterValue === mdmEnrollmentStatus
|
||||
);
|
||||
const label = `MDM status: ${
|
||||
Object.values(MDM_ENROLLMENT_STATUS_UI_MAP).find(
|
||||
(status) => status.filterValue === mdmEnrollmentStatus
|
||||
)?.displayName
|
||||
matchedStatus?.[1].displayName ?? mdmEnrollmentStatus
|
||||
}`;
|
||||
|
||||
// More narrow tooltip than other MDM tooltip
|
||||
const MDM_STATUS_PILL_TOOLTIP: Record<string, React.ReactNode> = {
|
||||
automatic: (
|
||||
<span>
|
||||
MDM was turned on <br />
|
||||
automatically. IT admins <br />
|
||||
can block end users <br />
|
||||
from turning MDM off.
|
||||
</span>
|
||||
),
|
||||
manual: (
|
||||
<span>
|
||||
MDM was turned on <br />
|
||||
manually. End users <br />
|
||||
can turn MDM off.
|
||||
</span>
|
||||
),
|
||||
unenrolled: undefined, // no tooltip specified
|
||||
pending: (
|
||||
<span>
|
||||
Hosts ordered using Apple <br />
|
||||
Business (AB). <br />
|
||||
They will automatically enroll <br />
|
||||
to Fleet and turn on MDM <br />
|
||||
when they're unboxed.
|
||||
</span>
|
||||
),
|
||||
};
|
||||
const apiStatus = matchedStatus?.[0] as MdmEnrollmentStatus | undefined;
|
||||
|
||||
return (
|
||||
<FilterPill
|
||||
label={label}
|
||||
tooltipDescription={MDM_STATUS_PILL_TOOLTIP[mdmEnrollmentStatus]}
|
||||
tooltipDescription={
|
||||
apiStatus ? MDM_STATUS_TOOLTIP[apiStatus] : undefined
|
||||
}
|
||||
onClear={() => handleClearFilter(["mdm_enrollment_status"])}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -363,25 +363,31 @@ export const MDM_STATUS_TOOLTIP: Record<
|
||||
> = {
|
||||
"On (automatic)": (
|
||||
<span>
|
||||
MDM was turned on automatically. IT admins can block end users from
|
||||
turning MDM off.
|
||||
MDM was turned on automatically (Apple ADE, Windows Autopilot, or
|
||||
fully-managed Android). IT admins can block end users from turning MDM
|
||||
off.
|
||||
</span>
|
||||
),
|
||||
"On (manual)": (
|
||||
<span>MDM was turned on manually. End users can turn MDM off.</span>
|
||||
<span>
|
||||
On Apple hosts, the enrollment profile was installed manually. Windows
|
||||
hosts were enrolled without Autopilot. End users can turn MDM off.
|
||||
</span>
|
||||
),
|
||||
"On (personal)": (
|
||||
<span>
|
||||
MDM was turned on by signing in with Managed Apple Account on iOS/iPadOS,
|
||||
or by creating a work profile on Android. End users can turn MDM off.
|
||||
MDM was turned on by signing in with a Managed Apple Account on
|
||||
iOS/iPadOS, or by adding a work profile on Android. End users can turn MDM
|
||||
off.
|
||||
</span>
|
||||
),
|
||||
"On (company-owned)": null,
|
||||
Off: undefined, // no tooltip specified
|
||||
Pending: (
|
||||
<span>
|
||||
Hosts ordered via Apple Business <br /> (AB). These will automatically
|
||||
enroll to Fleet <br /> and turn on MDM when they're unboxed.
|
||||
Hosts ordered via Apple Business (AB).
|
||||
<br /> These will automatically enroll to Fleet <br /> and turn on MDM
|
||||
when they're unboxed.
|
||||
</span>
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user